Post
Topic
Board Bitcoin Technical Support
Re: Req: Python MtGox auth example
by
rokj
on 20/04/2012, 20:25:09 UTC
Thanks for your help. Your code is working and I finally find out the reason Smiley

My .NET code generate nonce like this:
Code:
string parameters = "nonce=" + DateTime.Now.Ticks.ToString();
it'll generate a 18 length value like 634705522019762907

In Python code, it generate nonce like this:
Code:
string parameters = "nonce=" + DateTime.Now.Ticks.ToString();
which will generate 16 length value like 133492738213800

In like case, as it always smaller than the last .NET nonce in one account, then MtGox regards it as invalid and can't get authorization.

I simply added more zero to "int(time.time()*1000000000)" and it then works.
(or If I using one account for Python only, then it have no such problem also.)

Again, thanks for your code Smiley

No problem!  Wink

Argh ... and totally forgot to write this frustration with nonce also (have had same problems when doing it in PHP and then in Python).

Bold your message or something, I am sure someone else will also have the same experience in the future.  Smiley