API Bitfinex question: "key amount should be a decimal string"? I started writing code for the Bitfinex api yesterday and I've been struggling quite a lot with this.
I am using jndok's python implementation. 

I added my pyblic and secret keys and wrote this line of code at the end with python 2.7 on Windows 8:

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.

How can this be resolved?
You are submitting a float value. Float values are not totaly accurate:

&gt;&gt;&gt; 0.9 
0.90000000000000002


Thats why the specification requires a Decimal datatype:

&gt;&gt;&gt; from decimal import Decimal
&gt;&gt;&gt; Decimal("0.001")