Open Eternal-Sunshine opened 8 months ago
Hello @Eternal-Sunshine, yes I think it might be related to that (the addition of a new market), do you think that you occasionally run await exchange.loadMarkets(true)
to refresh the cache with the markets?
yes we do force reload of the market every 6 hours to automatically sync new coin's in all ccxt instances.
Earlier this unhandled error used to come after some days since server restarts. but today. this error is coming even after server restarts. making it completely impossible to trade on bybit.
@Eternal-Sunshine Does it always happen with the same (missing) market?
No, It happens with different symbols at different point of time. Here is another error stack of same signature.
Error Fetching tickers for bybit BadSymbol: bybit does not have market symbol ACEUSDT at bybit.market (/var/www/.../node_modules/ccxt/dist/cjs/src/bybit.js:1256:15) at bybit.fetchTickers (/var/www/.../node_modules/ccxt/dist/cjs/src/bybit.js:2164:38) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5)
Can someone look at it please. My guess is it's fix is simple. Just ignore the symbol which is throwing error and parse other coins tickers which are parsable and present in markets dictionary. Failing entire fetchTickers() because it is unable to parse a single coin in it is the faulty logic.
@Eternal-Sunshine We will try to deploy a fix
@Eternal-Sunshine Actually, I can't reproduce this issue, are you calling fetchTickers with or without symbols?
Without symbol. It happens when system keeps running for sometime. Probably when exchange adds or removes a symbol. Not sure.
@Eternal-Sunshine Can you please try to upgrade your ccxt version to the latest to see if the issue persists? right now I can't reproduce it
Operating System
Multiple OS
Programming Languages
JavaScript
CCXT Version
4.1.58
Description
There is an unhandled error inside bybit fetchTickers(). When I start the server it runs without issue for some days. but after few days it starts failing with unhandled error in ccxt. Attaching below the error stacktrace.
I am calling fetchTickers() in interval for serveral other exchanges and none of the other exchanges throws this error. My guess is after fews days when bybit ads/remove any coin pair then this error starts to happen and is related with bybit fetchTickers exchange response parsing logic.
Please provide some help in this regard.
Code