Time synchronization with Binance
See original GitHub issueI’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:
- Created 6 years ago
- Comments:12 (3 by maintainers)
Top Related StackOverflow Question
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?
@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