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

See original GitHub issue
CLIENT.get_my_trades(symbol="BNBETH", recvWindow=100000)
CLIENT.get_my_trades(symbol="BNBETH")

Both give the same error. The strange thing is that I don’t get this error with get_aggregate_trades function, only with get_my_trades.

I made sure my internet time is synced.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13

github_iconTop GitHub Comments

23reactions
MrRobotXXcommented, May 31, 2019

from control panel > date and time > internet time change the server to >>>> time.nist.gov it worked with me

8reactions
nadirdogancommented, Feb 28, 2018

This is my solution for timestamps issue. The code made equal windows time to binance server time.

from binance.client import Client client = Client(‘api_key’, ‘api_secret’) import time import win32api gt = client.get_server_time() aa = str(gt) bb = aa.replace(“{‘serverTime’: “,””) aa = bb.replace(“}”,“”) gg=int(aa) ff=gg-10799260 uu=ff/1000 yy=int(uu) tt=time.localtime(yy) win32api.SetSystemTime(tt[0],tt[1],0,tt[2],tt[3],tt[4],tt[5],0)

“The integer 10799260 for adjusting time zone and fine tuning for miliseconds.”

Read more comments on GitHub >

github_iconTop Results From Across the Web

APIError(code=-1021): Timestamp for this request ... - GitHub
BinanceAPIException: APIError(code=-1021): Timestamp for this request was 1000ms ahead of the server's time. I am able to successfully run the ...
Read more >
Binance order: Timestamp for this request was 1000ms ahead ...
"BinanceAPIException: APIError(code=-1021): Timestamp for this request was 1000ms ahead of the server's time." I already checked the difference ...
Read more >
"code":-1021,"msg":"Timestamp for this request is 1000ms ...
"code":-1021,"msg":"Timestamp for this request is 1000ms ahead of the server's time %s. ... Hello, I have 10 python accounts running on my aws ......
Read more >
Binance API Error Code =-1021 Time Stamp for this ... - Reddit
Binance API Error Code =-1021 Time Stamp for this request was 1000ms ahead of server time. In the log, it is said that:...
Read more >
ccxt-dev/ccxt - Gitter
base.errors.InvalidNonce: binance {"code":-1021,"msg":"Timestamp for this request was 1000ms ahead of the server's time.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found