#7409·hummingbot

dydx v4 - Getting ValueError, Mnemonic words count is not valid (0)

Author: rapcmiaCreated Feb 3, 2025Updated Sep 22, 2026
Labelsbugdydx_perpetual v4

Describe the bug

After successfully connected dydx_v4_perpetual and setup a simple v2 strategy (bollinger_bands and pmm_simpl), observed that its getting an error of Error adding controller: Mnemonic words count is not valid (0). No orders created

Image

2025-02-03 19:43:04,795 - 41289 - hummingbot.strategy.script_strategy_base - ERROR - Error adding controller: Mnemonic words count is not valid (0)
Traceback (most recent call last):
  File "/home/rapcomia/github/hummingbot/hummingbot/stg-dydx/hummingbot/strategy/strategy_v2_base.py", line 223, in add_controller
    controller = config.get_controller_class()(config, self.market_data_provider, self.actions_queue)
  File "/home/rapcomia/github/hummingbot/hummingbot/stg-dydx/controllers/market_making/pmm_simple.py", line 23, in __init__
    super().__init__(config, *args, **kwargs)
  File "/home/rapcomia/github/hummingbot/hummingbot/stg-dydx/hummingbot/strategy_v2/controllers/market_making_controller_base.py", line 226, in __init__
    self.market_data_provider.initialize_rate_sources([ConnectorPair(
  File "/home/rapcomia/github/hummingbot/hummingbot/stg-dydx/hummingbot/data_feed/market_data_provider.py", line 77, in initialize_rate_sources
    self._rate_sources[connector_pair.connector_name] = self.get_non_trading_connector(
  File "/home/rapcomia/github/hummingbot/hummingbot/stg-dydx/hummingbot/data_feed/market_data_provider.py", line 196, in get_non_trading_connector
    connector = connector_class(**init_params)
  File "/home/rapcomia/github/hummingbot/hummingbot/stg-dydx/hummingbot/connector/derivative/dydx_v4_perpetual/dydx_v4_perpetual_derivative.py", line 57, in __init__
    self._tx_client: DydxPerpetualV4Client = self._create_tx_client()
  File "/home/rapcomia/github/hummingbot/hummingbot/stg-dydx/hummingbot/connector/derivative/dydx_v4_perpetual/dydx_v4_perpetual_derivative.py", line 701, in _create_tx_client
    return DydxPerpetualV4Client(
  File "/home/rapcomia/github/hummingbot/hummingbot/stg-dydx/hummingbot/connector/derivative/dydx_v4_perpetual/data_sources/dydx_v4_data_source.py", line 36, in __init__
    self._private_key = PrivateKey.from_mnemonic(secret_phrase)
  File "/home/rapcomia/github/hummingbot/hummingbot/stg-dydx/hummingbot/connector/derivative/dydx_v4_perpetual/data_sources/keypairs.py", line 142, in from_mnemonic
    seed_bytes = Bip39SeedGenerator(mnemonic).Generate()
  File "/home/rapcomia/miniconda3/envs/dydx-hummingbot/lib/python3.10/site-packages/bip_utils/bip/bip39/bip39_seed_generator.py", line 70, in __init__
    Bip39MnemonicValidator(lang).Validate(mnemonic)
  File "/home/rapcomia/miniconda3/envs/dydx-hummingbot/lib/python3.10/site-packages/bip_utils/utils/mnemonic/mnemonic_validator.py", line 60, in Validate
    self.m_mnemonic_decoder.Decode(mnemonic)
  File "/home/rapcomia/miniconda3/envs/dydx-hummingbot/lib/python3.10/site-packages/bip_utils/bip/bip39/bip39_mnemonic_decoder.py", line 71, in Decode
    mnemonic_bin_str = self.__DecodeAndVerifyBinaryStr(mnemonic)
  File "/home/rapcomia/miniconda3/envs/dydx-hummingbot/lib/python3.10/site-packages/bip_utils/bip/bip39/bip39_mnemonic_decoder.py", line 119, in __DecodeAndVerifyBinaryStr
    raise ValueError(f"Mnemonic words count is not valid ({mnemonic_obj.WordsCount()})")
ValueError: Mnemonic words count is not valid (0)

Note: Run tests on v1 strategy perpetual_maket_making works ok ✅ Image

Steps to reproduce

  1. Connect dydx_v4_perpetual
  2. Setup any of v2 strategies or script (recommended: bollinger_bands)
  3. Start the strategy and observe logs for the behavior

Release version

2.3.0

Type of installation

Source

Attach required files

02032025.zip