-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Describe the bug
When running the PMM Simple Controller (controllers/market_making/pmm_simple.py) with the Binance Perpetual connector, there is a critical delay (about 2 minutes) between actual balance changes and their recognition by Hummingbot.
This delay occurs because Binance Perpetual only emits the ACCOUNT_UPDATE WebSocket event when an actual position changes, not when balances are simply reserved or released (e.g., during order cancellation and replacement).
As a result, the bot’s internal balance data (_account_available_balances) remains outdated until _status_polling_loop_fetch_updates() runs again, which happens only once every 120 seconds when user data stream is considered "healthy".
During this time, all executors that call validate_sufficient_balance() fail repeatedly, generating hundreds of error logs.
Steps to reproduce
Run pmm_simple controller with binance_perpetual.
total_amount_quote sets the total amount of funds in the current account
Let executors place orders normally.
When orders are cancelled and needs to be refreshed, the controller calls validate_sufficient_balance().
Since the balance is not updated yet, it keeps failing for around 120 seconds until _status_polling_loop_fetch_updates() refreshes the account info.
part controller config yml
connector_name: binance_perpetual
controller_name: pmm_simple
controller_type: market_making
cooldown_time: 60
executor_refresh_time: 3600
time_limit: 3600
total_amount_quote: 200000
trading_pair: PAXG-USDT
position_mode: HEDGE
Release version
v2.9.0
Type of installation
Docker
Attach required files
this is log
2025-10-27 09:56:01,602 - 17 - hummingbot.strategy.script_strategy_base - INFO - (PAXG-USDT) Canceling the limit order x-nbQe1H39SPGUT6422011824a7ffc57. [clock=2025-10-27 09:56:01+00:00]
2025-10-27 09:56:01,602 - 17 - hummingbot.strategy.script_strategy_base - INFO - (PAXG-USDT) Canceling the limit order x-nbQe1H39SPGUT6422011824ad2fc57. [clock=2025-10-27 09:56:01+00:00]
2025-10-27 09:56:01,603 - 17 - hummingbot.strategy.script_strategy_base - INFO - (PAXG-USDT) Canceling the limit order x-nbQe1H39SPGUT6422011824b22fc57. [clock=2025-10-27 09:56:01+00:00]
2025-10-27 09:56:01,643 - 17 - hummingbot.strategy_v2.executors.position_executor.position_executor - ERROR - Not enough budget to open position.
2025-10-27 09:56:01,644 - 17 - hummingbot.strategy_v2.executors.position_executor.position_executor - ERROR - Not enough budget to open position.
...
2025-10-27 09:57:59,895 - 17 - hummingbot.strategy_v2.executors.position_executor.position_executor - ERROR - Not enough budget to open position.
2025-10-27 09:58:00,970 - 17 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT BUY order x-nbQe1H39BPGUT64220ef44766cfc57 for 2.751 to OPEN a PAXG-USDT position at 3934.5900.
2025-10-27 09:58:00,971 - 17 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1761559080.0, "type": "OrderType.LIMIT", "trading_pair": "PAXG-USDT", "amount": "2.751", "price": "3934.5900", "order_id": "x-nbQe1H39BPGUT64220ef44766cfc57", "creation_timestamp": 1761559080.0, "exchange_order_id": "1248104625", "leverage": 50, "position": "OPEN", "event_name": "BuyOrderCreatedEvent", "event_source": "binance_perpetual"}