Closed Kinzowa closed 3 years ago
Just to mention that my code is executed periodically but loops are closed 1 or 2 minutes after execution. In a previous execution I noticed that the NetworkError: 1006
message was absent but the ping-pong keepalive missing
was trigged 2 times (maybe the 2 markets from the delivery API).
Please let me know if you need further informations
@Kinzowa can you remove the raise e
and replace it with print(str(e))
, this should stop your code from throwing, and ccxt will automatically reconnect on disconnects
Thank you frosty I will do this.
@Kinzowa can you remove the
raise e
and replace it withprint(str(e))
, this should stop your code from throwing, and ccxt will automatically reconnect on disconnects
Unfortunnately it seems that ccxt doesn't reconnect on disconnect because my program stop receiving the streams. Do you think it could be due to do_stuff()
in my code that is blocking the loop ?
while True:
try:
ob = await client.watch_order_book(symbol)
if ob:
do_stuff()
await client.sleep(1000)
except Exception as e:
traceback.print_exc()
raise e
I close this issue because it get better now
@Kinzowa I am curious what you changed that improved this? I am occasionally running into this too.
@Kinzowa I am curious what you changed that improved this? I am occasionally running into this too.
Not sure what is the reason errors are mostly gone, altough are still some. As suggested by Frosty I silent them and ccxt reconnects. Also I changed the loop design of my code to make it less blocking (just one over tens loop is blocking). But to be honnest I have no idea if it has something to do with the error. Good luck
Hello,
I would like to share a problem I encounter when monitoring order books of markets in the spot, future and delivery API at Binance. It happens that exceptions are thrown with the messages bellow. Please find a short extract of the loops and client initialization (1 per API).
During this code execution there were 6 markets from the spot API, 2 markets from the delivery API and 4 markets from the future API. Because there are 4 iterations per error messages it could be a problem with the 4 markets of the future API.
Help would be appreciated,
Best Kinzowa
This is the error I get :