Comments (4)
@adshao thoughts ?
from go-binance.
@Krisa Sorry for the late reply. Yes, I agree with you, an optional parameter useServerTime
in https://github.com/jaggedsoft/node-binance-api#troubleshooting is more acceptable and useful in some cases than directly calling ntp synchronization in #125.
from go-binance.
To support this feature, we could set useServerTime
in https://github.com/adshao/go-binance/blob/master/client.go#L191 as a per request option.
from go-binance.
@adshao The problem of useServerTime
in the node binance library is that it does a one time request when the client is initialized and... that's it. If the app is running multiple days, we can easily get out of sync again. That's the opposite of #125, and not really better either.
I'd be more in favour of exposing the timeOffset
here https://github.com/jaggedsoft/node-binance-api/blob/d011f5845a91c06a0f4ef32ff08bed31d53cb29e/node-binance-api.js#L1207 (or rather TimeOffset
) in the Client https://github.com/adshao/go-binance/blob/master/client.go#L172 which can be overwritten. A function BinanceClient.NewSetTimeOffsetService().Do(context.Background())
could also accessory set this TimeOffset, but that would be nothing more than querying Binance time and putting it into TimeOffset. Actually node-binance is also having such function here https://github.com/jaggedsoft/node-binance-api/blob/d011f5845a91c06a0f4ef32ff08bed31d53cb29e/node-binance-api.js#L1979 (additionally to the init param)
from go-binance.
Related Issues (20)
- UserData socket closes every 2 minutes HOT 2
- Create order response error on 32bit platforms HOT 1
- Get all SymbolTickers without providing a symbol or []symbols
- Earn and Funding endpoints not covered
- Futures Testnet - Kline not working
- "Sleep" at the first operation
- Futures Client: Constant listenKeyExpired HOT 1
- how to get permission? HOT 2
- Crypto Box? HOT 1
- <APIError> code=-1106, msg=Parameter 'reduceonly' sent when not required. HOT 1
- how to keep listenKey alive? HOT 1
- when listenKey expired get error:json: cannot unmarshal string into Go struct field WsUserDataEvent.E of type int64 HOT 2
- can not get balance
- unexpected end of JSON input
- is threre subToMaster or masterToSub method?
- is there demo code to use subtoSub?
- something wrong happened when I get account asset? HOT 3
- [feat] support biance non-global HOT 2
- Support Query Margin Available Inventory
- Please do a new release HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-binance.