Time synchronization with Binance

See original GitHub issue

I’m seeing a number if reports with ZenBot, Gekko and the CCXT projects of Binance users getting a Response Code 400 due to their internal system clocks skewing by more than 1 second. Apparently Binance required the timestamps on all signed requests to be within 1000ms of their internal time. The issue arises for Windows users where time syncrhronization is either turned off, or whose clocks have a large skew (as the time sync service in windows only updates once a day).

For this reason it may be a good idea to implement an NIST time sync based service directly into the binance module and use an internal clock for generating timestamps over the system clock.

For reference see the following issues

https://github.com/askmike/gekko/issues/1663 https://github.com/ccxt/ccxt/issues/936

I will admit that I am unsure of the feasibility of this task, but probably we shouldn’t ever update the computer’s system time as part of the process.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
emirhanyasincommented, May 11, 2021

Hi, I am trying to sync my pc time to binance time using ntp, but I do not know which url should I use? Can someone help?

0reactions
cmrochecommented, Jan 22, 2018

@aarongarvey we only have the fix in the development branch, just sorting out the responses, but so far it looks like it isn’t causing any problems. I tested locally and was able to place test orders with the correction factor.

I’ll monitor in gekko , but it seems to be functional.

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Binance: "Timestamp for this request is 1000ms ahead of the ...
To solve timestamp issues make sure the timestamp that is sent towards Binance is a synchronized UTC timestamp (this might require a timesynch ......
Read more >
How to resolve Binance's Timestamp ahead of Server's time ...
1. I ensured the Windows Time of my laptop from which I am creating the API is running by following this · 2....
Read more >
FAQ — python-binance 0.2.0 documentation
Check that your system time is in sync. See this issue for some sample code to check the difference between your local time...
Read more >
How to buy SYNC Network (SYNC) Guide - Binance
1. There are several crypto wallets to choose from within the Ethereum network and Metamask appears to be the most integrated. If you...
Read more >
SYNC Network Price | SYNC Price Index, Live Chart and USD ...
The live price of SYNC Network is $ 0.0051849 per (SYNC / USD) today with a current market cap of $ 614,873.39 USD....
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