Title: n00by development question: "key amount should be a decimal string" Post by: esillen on June 28, 2014, 10:38:36 AM I started writing for the Bitfinex api yesterday and I've been struggling quite hard with this.
I am using jndok's python implementation at http://jndok.net/bitfinexapi.html I added my pyblic and secret keys and wrote this line of code at the end: rep = place_order(0.001, 589.0, 'sell', 'limit', exchange='bitfinex') And I thought that would do it but the reply I get 'Key amount should be a decimal string' and the order is not placed. I also tried to print the reply code I get from the server and it is 400. What does this mean? Thankful for help! I have python 2.7, Windows 8. Title: Re: n00by development question: "key amount should be a decimal string" Post by: Dare on June 29, 2014, 09:52:11 PM I've never used that API, but from the error it sounds like you're sending a float instead of decimal string (e.g. 0.001 instead of "0.001"). Try quoting the numbers in your API call, or use Python's float-to-string function if the value is dynamic, and see if that helps.
|