kmadac / bitstamp-python-client

Python package to communicate with bitstamp.net
MIT License
143 stars 70 forks source link

Invalid Signature error returned #9

Closed kmadac closed 10 years ago

kmadac commented 10 years ago

I'm receiving Invalid Signature error when I used any call from Trading class even my authorization data are correct.

kmadac commented 10 years ago

I found that nonce property in Trading class was called twice and because it returns every time different nonce value, it caused that nonce used for generating the message was different than nonce sent in http request.

SmileyChris commented 10 years ago

Good spotting, this is an example of why it's not a good idea to do magic inside a property :P I should have just made a method called get_nonce()

SmileyChris commented 10 years ago

(ps: this is the kind of thing that should have a bugfix version bump -- 2.0.1? ;))

kmadac commented 10 years ago

I wondered about the the same solution. I'm going to replace property nonce with method get_nonce() and prepare also new test for this issue.