hummingbot icon indicating copy to clipboard operation
hummingbot copied to clipboard

Perpetual MM: Unable to use Bybit_perp as price_source_derivative

Open rapcmia opened this issue 5 years ago • 4 comments

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

  1. Create Perpetual market-making strategy
  2. Set price source to external_market and select Bybit perpetuals
  3. Start the bot

Screenshots start the bot and you would see the error on the left UI panel: image

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

rapcmia avatar Oct 14 '21 12:10 rapcmia

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_source to external market and choose bybit 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')

image logs_conf_perpetual_market_making_1.log

arnelhbot avatar Jun 16 '22 06:06 arnelhbot

Severity: P2 Bounty: 50,000 (https://hummingbot.org/maintenance/bugs/) Rationale: Bug related to certified exchange

rapcmia avatar Aug 22 '22 06:08 rapcmia

Update Sep, 3, 2022, I wasn't able to reproduct the issue on master branch

vibecodingengine avatar Sep 04 '22 00:09 vibecodingengine

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

image

arnelhbot avatar Sep 06 '22 10:09 arnelhbot