There are several similar errors related with the same issue: some computers lose the time sync after some days.
One of the most common errors is:
Error: binance {“code”:-1021,”msg”:”Timestamp for this request was 1000ms ahead of the server’s time.“}
This is a similar error caused by the same issue:
{ InvalidNonce: binance {“code”:-1021,”msg”:”Timestamp for this request is outside of the recvWindow.“}
at binance.throwExactlyMatchedException (C:\snapshot\v18build\node_modules\ccxt.pro\node_modules\ccxt\js\base\Exchange.js:523:19)
at binance.handleErrors (C:\snapshot\v18build\node_modules\ccxt.pro\node_modules\ccxt\js\binance.js:1906:26)
at module.exports.handleRestResponse.response.text.then (C:\snapshot\v18build\node_modules\ccxt.pro\node_modules\ccxt\js\base\Exchange.js:618:18)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7) constructor: [Function: InvalidNonce], name: ‘InvalidNonce’ }
Fetching my trades again.{“name”:”InvalidNonce”}
Error
at errorHandler (C:\snapshot\v18build\ctx\js\binance.js:0:0)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
In order to fix it, just download Time Sync tool and leave the program running before starting the bot.
Henry Li 21 May, 2022
thank you a lot for your help. It is a great help. I fix this problem with your help