Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

[cex.io ]unable to sell: Nonce must be incremented #630

Closed
jordisk opened this issue Mar 18, 2017 · 5 comments · May be fixed by ferreiramarcelo/gekko#30
Closed

[cex.io ]unable to sell: Nonce must be incremented #630

jordisk opened this issue Mar 18, 2017 · 5 comments · May be fixed by ferreiramarcelo/gekko#30

Comments

@jordisk
Copy link

jordisk commented Mar 18, 2017

Hi,

I'm trying the bot with a real money trading and I got this error.

2017-03-18 12:09:50 (INFO):	Attempting to SELL 0.38605 ETH at cex.io
2017-03-18 12:09:50 (DEBUG):	SELL 0.38605 ETH @ 36.5015 EUR
2017-03-18 12:09:50 (INFO):	Wanted to buy ETH but the amount is too small (0.000000000000) at cex.io
2017-03-18 12:09:50 (INFO):	Attempting to SELL 0.38605 ETH at cex.io
2017-03-18 12:09:50 (DEBUG):	SELL 0.38605 ETH @ 36.5015 EUR
2017-03-18 12:09:50 (ERROR):	unable to sell: Nonce must be incremented
2017-03-18 12:09:50 (ERROR):	unable to sell: There was an error while placing your order: Invalid amount

The api has full permissions and I've also created a new api/secret pair and still fails.

Any ideas?

Many thanks!

@askmike
Copy link
Owner

askmike commented Mar 18, 2017

Will ook into this! Cex.io code is pretty old and has not been tested in a while I think.

@jordisk
Copy link
Author

jordisk commented Mar 18, 2017

Thanks @askmike! I've noticed that the minimum amount to trade in cex.io is 0.5 ETH. I've transferred more founds but the error persists.

2017-03-18 13:40:06 (DEBUG):	cex.io returned an error, retrying.. Nonce must be incremented waiting for 10000 ms
2017-03-18 13:40:06 (INFO):	Attempting to SELL 0.58605 ETH at cex.io
2017-03-18 13:40:06 (DEBUG):	SELL 0.58604999 ETH @ 36.5008 EUR
2017-03-18 13:40:06 (DEBUG):	cex.io returned an error, retrying.. Nonce must be incremented waiting for 10000 ms
2017-03-18 13:40:06 (DEBUG):	SELL order placed.  Order ID 3763296657
2017-03-18 13:40:16 (INFO):	Attempting to BUY 0.5362240180114984 ETH at cex.io
2017-03-18 13:40:16 (DEBUG):	BUY 0.53622401 ETH @ 39.79679999 EUR
2017-03-18 13:40:16 (INFO):	Attempting to SELL 0.000001 ETH at cex.io
2017-03-18 13:40:16 (DEBUG):	SELL 0.000001 ETH @ 36.5008 EUR
2017-03-18 13:40:16 (ERROR):	unable to sell: There was an error while placing your order: Invalid amount
2017-03-18 13:40:16 (ERROR):	unable to buy: Nonce must be incremented
2017-03-18 13:40:24 (DEBUG):	Requested / trade data from CEX.io ...
2017-03-18 13:40:25 (DEBUG):	Processing 1 new trades. From 2017-03-18 12:40:06 UTC to 2017-03-18 12:40:06 UTC. (a few seconds)
2017-03-18 13:40:44 (DEBUG):	Requested / trade data from CEX.io ...
2017-03-18 13:40:45 (DEBUG):	No new trades.

@askmike askmike changed the title unable to sell: Nonce must be incremented on cex.io [cex.io ]unable to sell: Nonce must be incremented Mar 18, 2017
@hrehman200
Copy link

I believe that you are sending nonce value which is lesser than or equal to nonce value you sent in the past.

I was facing same issue. I was using unix_timestamp as nonce in each request. My code was running fine on a server in timezone GMT-9. However, when i tested the code on my local machine (GMT+5), the server started giving nonce issues. This is obviously due to the fact that I was using nonce (unix_timestamp of my server) which was less than the nonce (unix_timestamp of my local machine).

I added increment of 2 days to my server timestamp and this error disappeared.

@askmike
Copy link
Owner

askmike commented Aug 9, 2017

I am using this library which automatically updates the nonce. I think this specific error is caused by @jordisk using the same API key for different tools (especially since there is only one bug report since march).

@askmike
Copy link
Owner

askmike commented Jul 9, 2018

Unfortunately cex.io is not enabled anymore..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants