Perpetual MM: Unable to use Bybit_perp as price_source_derivative
Describe the bug
While testing price source as external market on derivative strategies, the bot would return an error of __init__() missing 1 required positional argument: 'session'
Steps To Reproduce
- Create Perpetual market-making strategy
- Set price source to
external_marketand select Bybit perpetuals - Start the bot
Screenshots
start the bot and you would see the error on the left UI panel:

2021-10-14 20:07:50,235 - 5396 - hummingbot.client.hummingbot_application - ERROR - Unknown error during initialization.
Traceback (most recent call last):
File "C:\Users\Ralph\github\dev\hummingbot\strategy\perpetual_market_making\start.py", line 69, in start
ext_market = create_paper_trade_market(price_source_exchange, [asset_trading_pair])
File "C:\Users\Ralph\github\dev\hummingbot\connector\exchange\paper_trade\__init__.py", line 27, in create_paper_trade_market
obt_obj = obt_class(**obt_kwargs)
TypeError: __init__() missing 1 required positional argument: 'session'
Release version dev-0.45.0
Attachments perp-test.zip
WARNING: Do NOT publish any exchange API keys or your wallet's private key. Whoever has access to them may steal your assets!
Optional: your discord username:
┆Issue is synchronized with this Clickup task by Unito
Issue Update: Upon testing this issue. It's noted that it has been observed in current v1.4.0
Steps to reproduce:
- Clone current production version
- Start Client and create password
- Create perpetual market making strategy
- Configure
price_sourcetoexternal marketand choosebybit perpetual - Start strategy and observe output and log pane
2022-06-16 06:31:03,556 - 663268 - hummingbot.client.hummingbot_application - ERROR - Unknown error during initialization.
Traceback (most recent call last):
File "/home/ubuntu/Hummingbot/pull_request/master/hummingbot/connector/exchange/paper_trade/__init__.py", line 21, in get_order_book_tracker
return tracker_class(**tracker_kwargs)
TypeError: __init__() missing 1 required positional argument: 'session'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/Hummingbot/pull_request/master/hummingbot/strategy/perpetual_market_making/start.py", line 61, in start
ext_market = create_paper_trade_market(price_source_exchange, [asset_trading_pair])
File "/home/ubuntu/Hummingbot/pull_request/master/hummingbot/connector/exchange/paper_trade/__init__.py", line 35, in create_paper_trade_market
tracker = get_order_book_tracker(connector_name=exchange_name, trading_pairs=trading_pairs)
File "/home/ubuntu/Hummingbot/pull_request/master/hummingbot/connector/exchange/paper_trade/__init__.py", line 31, in get_order_book_tracker
raise Exception(f"Connector {connector_name} OrderBookTracker class not found ({exception})")
Exception: Connector bybit_perpetual OrderBookTracker class not found (__init__() missing 1 required positional argument: 'session')
Severity: P2 Bounty: 50,000 (https://hummingbot.org/maintenance/bugs/) Rationale: Bug related to certified exchange
Update Sep, 3, 2022, I wasn't able to reproduct the issue on master branch
Tested on both Dev1.7.0 and Master v1.6.0 this issue has not been observed. closing ticket. Test performed:
- Compiled latest Master v1.6 and Dev 1.7
- Started bot and created passowrd
- Connected Binane_perp API
- Created Perp_MM Strategy
- Set Bybit_perpetual as external source
- Started bot
- Did not observe issue
