ccxt icon indicating copy to clipboard operation
ccxt copied to clipboard

bybit unable use watch_my_trades and watch_orders for SOL/USDC:USDC

Open guesshaha opened this issue 1 year ago • 1 comments

Operating System

Linux guess 5.15.153.1-microsoft-standard-WSL2 #1 SMP 2024 x86_64 x86_64 x86_64 GNU/Linux

Programming Languages

Python

CCXT Version

4.3.51

Description

I want to watch my trade and watch my order for SOL/USDC:USDC in bybit , but can not and will produce error, and for USDT this error will not occur, can you help me solve this

Traceback (most recent call last): File "", line 215, in watch_my_trade_loop trade_list = await self.exchange.watch_my_trades(self.symbol) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "python3.11/site-packages/ccxt/pro/bybit.py", line 891, in watch_my_trades await self.authenticate(url) File "python3.11/site-packages/ccxt/pro/bybit.py", line 1804, in authenticate return await future ^^^^^^^^^^^^ File "/python3.11/site-packages/ccxt/async_support/base/ws/fast_client.py", line 26, in handler self.handle_message(message) File "/python3.11/site-packages/ccxt/async_support/base/ws/aiohttp_client.py", line 34, in handle_message self.handle_text_or_binary_message(message.data) File "/python3.11/site-packages/ccxt/async_support/base/ws/aiohttp_client.py", line 29, in handle_text_or_binary_message self.on_message_callback(self, decoded) File "python3.11/site-packages/ccxt/pro/bybit.py", line 1927, in handle_message if topic.find(keys[i]) >= 0: ^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'find'

Code

  order_info_list = await self.exchange.watch_orders(self.symbol)
  trade_list = await self.exchange.watch_my_trades(self.symbol)

guesshaha avatar Jun 25 '24 03:06 guesshaha

Hello @guesshaha, thanks for reporting it we will take a look and let you know.

carlosmiei avatar Jun 25 '24 10:06 carlosmiei

similar (same?) problem with many other products

e.g. try

res = await ccxtpro.bybit({'newUpdates': False}).watch_trades("BTC/USD:BTC-241227")

version is '4.3.75'

dudalev avatar Aug 06 '24 14:08 dudalev

@dudalev can you please open a new issue? delivery futures are a different market type so I think we should handle them separately .

Edit: I will link the PR here nvm

carlosmiei avatar Aug 06 '24 14:08 carlosmiei