CyberPunkMetalHead / Binance-volatility-trading-bot

This is a fully functioning Binance trading bot that measures the volatility of every coin on Binance and places trades with the highest gaining coins If you like this project consider donating though the Brave browser to allow me to continuously improve the script.
MIT License
3.41k stars 775 forks source link

Timestamp for this request was 1000ms ahead of the server's time #28

Closed mwerre1 closed 3 years ago

mwerre1 commented 3 years ago

APIError(code=-1021): Timestamp for this request was 1000ms ahead of the server's time.

jsbots commented 3 years ago

Just sync time of your OS with time servers, solved for me.

ghost commented 3 years ago

if you're on windows, syncing with time.nist.gov solved the issue for me.

Eugnis commented 3 years ago

If you run in WSL2, it's known bug. Run sudo hwclock -s Fixed with latest windows 10 insiders build

gabtech722 commented 3 years ago

Testing bot on testnet and just got this error:

TRXUSDT has gained 15.023% in the last 5 minutes, calculating volume in USDT preparing to buy 698.8 TRXUSDT Traceback (most recent call last): File "/initrd/mnt/dev_save/BUGHUNTER/BINANCE/Binance-volatility-trading-bot/Binance-Detect.py", line 356, in orders, last_price, volume = buy() File "/initrd/mnt/dev_save/BUGHUNTER/BINANCE/Binance-volatility-trading-bot/Binance-Detect.py", line 228, in buy test_order = client.create_test_order(symbol=coin, side='BUY', type='MARKET', quantity=volume[coin]) File "/usr/local/lib/python3.8/dist-packages/binance/client.py", line 1578, in create_test_order return self._post('order/test', True, data=params) File "/usr/local/lib/python3.8/dist-packages/binance/client.py", line 240, in _post return self._request_api('post', path, signed, version, kwargs) File "/usr/local/lib/python3.8/dist-packages/binance/client.py", line 202, in _request_api return self._request(method, uri, signed, kwargs) File "/usr/local/lib/python3.8/dist-packages/binance/client.py", line 197, in _request return self._handle_response() File "/usr/local/lib/python3.8/dist-packages/binance/client.py", line 230, in _handle_response raise BinanceAPIException(self.response) binance.exceptions.BinanceAPIException: APIError(code=-1021): Timestamp for this request was 1000ms ahead of the server's time.

L0Y4L commented 3 years ago

Same for me @gabtech722

m3a4s commented 3 years ago

when Market looks ok, bot is running...

this error comes out:

Traceback (most recent call last): File "c:/Users/pc/Desktop/TradingTry/Binance Detect Moonings.py", line 597, in orders, last_price, volume = buy() File "c:/Users/pc/Desktop/TradingTry/Binance Detect Moonings.py", line 294, in buy volume, last_price = convert_volume() File "c:/Users/pc/Desktop/TradingTry/Binance Detect Moonings.py", line 255, in convert_volume volatile_coins, number_of_coins, last_price = wait_for_price() File "c:/Users/pc/Desktop/TradingTry/Binance Detect Moonings.py", line 139, in wait_for_price if historical_prices[hsp_head]['BNB' + PAIR_WITH]['time'] > datetime.now() - timedelta(minutes=float(TIME_DIFFERENCE / RECHECK_INTERVAL)): KeyError: 'BNBUSDT'

what's the solution ?