Closed Animouse31 closed 1 year ago
There could be so many reasons, without a logfile and version nr i cant help you!
Escepically if you use "ping_interval=1, ping_timeout=5, close_timeout=5," and play with restart timeout there are a few possibilities to break the function...
Escepically if you use "ping_interval=1, ping_timeout=5, close_timeout=5," and play with restart timeout there are a few possibilities to break the function...
I just know about it. What is the ideal ping_interval, ping_timeout, and close_timeout? Should I leave it blank (default)?
it depends on your needs of "real time data", how much data you process and it must fit to peak times... sometimes binance traffic is 3-5 times higher as in the usual days. setting it to low timeouts maybe initiate more websocket restarts than neccessary which also leads to more interruptions and more lost data... maybe you should look also to stream_buffer length, fifo/lifo stack too to optimize your access to the data and manage restarts or a buffer clear to just delete the buffer (if to much is on the stack) and avoid the restart overhead.
close_timeout is the time how long a socket has time to close... i think this can be also 1 - waiting longer has no real benefit and delays the restart...
and... i used the best settings for default to have most stable connection for most usecases. you should have a reason to touch this.
I close this, just post the log file if the error remains and i will reopen.
Version of this library.
--- Call Binance WebSocket API Manager - Mark Index Prices
ws_price = BinanceWebSocketApiManager(exchange="binance.com-futures", high_performance=True, # debug=False, throw_exception_if_unrepairable=True, restart_timeout=15,)
Create Streams
ws_price.create_stream('markPrice', SYMBOLS, output='dict', # Options: 'raw_data', 'dict', 'UnicornFy' api_key=API_KEY, api_secret=API_SECRET, stream_buffer_name='price', ping_interval=1, ping_timeout=5, close_timeout=5, stream_buffer_maxlen=STREAM_BUFFER_MAXLEN)
while True:
Get Streams
Solution to Issue cannot be found in the documentation or other Issues and also occurs in the latest version of this library.
Hardware?
Local server/workstation
Operating System?
Windows
Python version?
Python3.8
Installed packages
No response
Logging output
No response
Processing method?
stream_buffer
Used endpoint?
binance.com-futures
Issue
Since 2 days ago, my markPrice stream has been troubled. First, it sent an error message something like illegal activity. And then, since yesterday I haven't received any markPrice message, including different streams like markPrice@1s and !markPrice@arr.
I wonder if Binance server is troubled? Or are there some changes that I don't know?