Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Feeds Stopped #50

Closed
pingu2k4 opened this issue Feb 8, 2018 · 3 comments
Closed

Live Feeds Stopped #50

pingu2k4 opened this issue Feb 8, 2018 · 3 comments

Comments

@pingu2k4
Copy link

pingu2k4 commented Feb 8, 2018

I am subscribed to live feeds for orderbook, candles and user account data. Just observed the data stop coming through.

All websockets are done through the RetryTaskController. No internet drop out at all.

It appears that Binance itself just stopped... Is there anything we could maybe do to subscribe to get a notification in this event?

Here is the end of my log:

[dbug] 08/02/2018 00:28:34 +00:00
DepthWebSocketClient: "{"lastUpdateId":61381760,"bids":[["7784.02000000","0.00027300",[]],["7784.01000000","0.00350000",[]],["7784.00000000","0.00350000",[]],["7783.99000000","0.00300000",[]],["7783.98000000","0.00650000",[]],["7783.97000000","0.00970900",[]],["7783.96000000","0.00650000",[]],["7783.95000000","0.00650000",[]],["7783.94000000","0.00650000",[]],["7783.93000000","0.00650000",[]],["7783.92000000","0.70000000",[]],["7783.91000000","0.10684500",[]],["7783.90000000","0.00350000",[]],["7783.84000000","0.00300000",[]],["7783.82000000","0.00650000",[]],["7783.81000000","0.50900500",[]],["7776.57000000","0.00280000",[]],["7775.17000000","1.13837300",[]],["7774.43000000","0.04803000",[]],["7774.01000000","0.00259000",[]]],"asks":[["7789.90000000","0.18342100",[]],["7790.00000000","0.06768000",[]],["7794.87000000","0.00650000",[]],["7794.88000000","0.88799100",[]],["7794.91000000","2.69621300",[]],["7796.21000000","0.00280000",[]],["7797.24000000","0.00280000",[]],["7800.28000000","0.00280000",[]],["7800.75000000","0.00280000",[]],["7801.77000000","0.00280000",[]],["7809.93000000","0.46100000",[]],["7809.94000000","0.60375000",[]],["7810.00000000","0.22260000",[]],["7812.77000000","0.00280000",[]],["7818.97000000","0.04721300",[]],["7818.98000000","1.13246500",[]],["7819.00000000","9.24307000",[]],["7819.30000000","0.04564300",[]],["7819.32000000","0.01120000",[]],["7822.61000000","0.00378800",[]]]}"
[dbug] 08/02/2018 00:29:10 +00:00
CandlestickWebSocketClient: "{"e":"kline","E":1518049747510,"s":"BTCUSDT","k":{"t":1518049680000,"T":1518049694788,"s":"BTCUSDT","i":"1m","f":14776398,"L":14776497,"o":"7790.00000000","c":"7784.02000000","h":"7794.91000000","l":"7783.81000000","v":"8.15356400","n":100,"x":true,"q":"63515.48081620","V":"6.60431900","Q":"51454.16786924","B":"0"}}"
[dbug] 08/02/2018 00:29:10 +00:00
CandlestickCache (BTCUSDT): Updating candlestick (open time: 08/02/2018 00:28:00). [thread: 24]
[dbug] 08/02/2018 00:32:11 +00:00
SingleUserDataWebSocketClient.OnKeepAliveTimer: User stream keep alive ("4jmcGH7DngUB0DTpVszE5ZqhKPRUTnvuRvAoNz2TpXtlY2emz4siNpdfRJu0"). [thread: 23]
[dbug] 08/02/2018 00:32:11 +00:00
BinanceHttpClient.RequestAsync: [PUT] "/api/v1/userDataStream?listenKey=4jmcGH7DngUB0DTpVszE5ZqhKPRUTnvuRvAoNz2TpXtlY2emz4siNpdfRJu0"
[dbug] 08/02/2018 00:32:12 +00:00
BinanceHttpClient: "{}"

@sonvister
Copy link
Owner

@pingu2k4, at the moment, no data is your event notification. You can use a watchdog timer that is reset when any data is received that, when expires, will abort streaming by cancelling the controller and then you can begin streaming again.

I am looking into adding the watchdog timer feature internally that would abort the web socket receive after a configurable time and throw an exception.

@dharders
Copy link

If this was related to the recent Binance outage (the timing fits), they just added a new API endpoint to check if the API is down for "maintenance".

Link to Official Docs

GET /wapi/v3/systemStatus.html

Response:

{ 
    "status": 0,              // 0: normal,1:system maintenance
    "msg": "normal"           // normal or system maintenance
}

This together with a watchdog timer would be perfect

sonvister added a commit that referenced this issue Feb 26, 2018
@sonvister
Copy link
Owner

The WatchdogTimer utility is available to execute an action if not kicked for a configurable time interval. It is incorporated into the newer managers and will abort the stream if no data has been received [to that manager]. The BinanceWebSocketStreamController also adds a system status check during the connection retry pausing to wait indefinitely during maintenance. There are IRetryTaskController events for pausing and resuming that are raised during connection retry (the delay associated with pausing will be longer during maintenance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants