Author

Topic: n00by development question: "key amount should be a decimal string" (Read 1327 times)

hero member
Activity: 508
Merit: 500
Techwolf on #bitcoin and Reddit
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.
newbie
Activity: 1
Merit: 0
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.
Jump to: