CyberPunkMetalHead / binance-trading-bot-new-coins

This Binance trading bot detects new coins as soon as they are listed on the Binance exchange and automatically places sell and buy orders. It comes with trailing stop loss and other features. If you like this project please consider donating via Brave.
MIT License
1.46k stars 270 forks source link

Error on buy order #51

Open turvak opened 2 years ago

turvak commented 2 years ago

The script found the new coin but returned this error - trying a real purchase not a test: New coins detected: [{'symbol': 'ILVUSDT', 'price': '587.00000000'}, {'symbol': 'ILVBUSD', 'price': '598.00000000'}, {'symbol': 'ILVBNB', 'price': '1.74000000'}, {'symbol': 'ILVBTC', 'price': '0.01580000'}] Preparing to buy ILVUSDT 3 APIError(code=-1021): Timestamp for this request is outside of the recvWindow. New coin detected, but ILVBUSD is currently in portfolio, or USDT does not match New coin detected, but ILVBNB is currently in portfolio, or USDT does not match New coin detected, but ILVBTC is currently in portfolio, or USDT does not match

Lautaro-L commented 2 years ago

That might be because the clock on your PC is out of sync or internet delay, the api has a parameter, recWindow that can be used to increase the time margin, is something that can be added to the bot

turvak commented 2 years ago

I'm in NZ so does that mean I need to set my computer clock to another timezone?

Lautaro-L commented 2 years ago

Nono that's not the problem, sometimes the clock gets out of sync for a second at most and that what causes problems, or maybe the order is arriving too late at the server