ccxt
ccxt copied to clipboard
CoinbasePro: watchOrderBook trigger frequency out of sync with exchange
While cctx wiki says In real-time mode CCXT Pro will return the result as soon as each new delta arrives from the exchange.
, I've monitored that for CoinbasePro(not sure if other exchange having this issue or not), watchOrderBook would only be triggered after multiple batches of deltas arrive from the exchange. I'm wondering if this is expected or things need to be fixed here?
what language and what code are you using?
what language and what code are you using?
Python 3.8 and latest cctx code base.
The way that I watch order updates strictly follows the structure on wiki as below
async def main():
exchange = ccxtpro.coinbasepro({'newUpdates': True})
while True:
orderbook = await exchange.watch_order_book('BTC/USD')
print(1)
await exchange.close()
run(main())
I also inserted printout(print(2)
) right here. And once I start the program, instead of getting the output like 1 2 1 2 1 2 ...
, I'm always getting more 2
s than 1
s like 1 2 2 2 1 2 1 2 2 2 1 2 1 2 2 1 ...
I confirmed this issue. @frosty00 , could this be due to the issue you mentioned of subscriptions getting overwritten when messages come in very fast?