gferrin / bitfinex

node.js wrapper for bitfinex cryptocurrency exchange
26 stars 20 forks source link

there is a bug in the bitfinex.js #6

Closed no13bus closed 9 years ago

no13bus commented 9 years ago

when I use this code:

bitfinex.new_order("ltcusd", '0.01', '5', "all", "sell", "exchange limit", 
    function(err, res, order_id){
        console.log(err);
        console.log(res);
        console.log(order_id);
});

it has the error: [Error: Nonce is too small.] So i modify the code here.

gferrin commented 9 years ago

Hi, this is sort of a miss leading error. I can guarantee you that the current nonce generation function produces an adequately large nonce. This error usually crops up when your using the same API keys to run two separate processes. Check out this Bitcointalk discussion.

no13bus commented 9 years ago

sorry,it is my fault.Today I find that what you said is the reason of my error. Recently did you do some trades about the bitfinex?Can I communicate with you about the bitfinex api? It's tasks me to get the user's balance and the price about 2.5~3s. Is there some methods to decrease the response time? By the way, I run the programs in the VPS(Linode Tokoy). Thanks very much again.

gferrin commented 9 years ago

There is no method that I know of which decreases response time. I believe the bitfinex team is based in France, so perhaps try a server in Europe and see if that speeds things up. I'm based in the US and in my experience requests have never taken that long to get completed.