Connectors - Improve messages for maker-only order rejections
Describe the bug
While reviewing bot logs from Kalshi perpetual and Binance spot, LIMIT_MAKER orders were correctly rejected because they would execute immediately. However, Hummingbot displayed these expected rejections as NETWORK errors with full tracebacks. Binance also showed a warning to check the API key and network connection, which can lead users to troubleshoot the wrong problem.
kalshi_perpetual
2026-09-21 13:12:34,935 - 17 - hummingbot.connector.derivative.kalshi_perpetual.kalshi_perpetual_derivative.KalshiPerpetualDerivative - NETWORK - Error submitting buy LIMIT_MAKER order to Kalshi_perpetual for 0.000100 BTC-USD 85221.
Traceback (most recent call last):
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 462, in _create_order
await self._place_order_and_process_update(order=order, **kwargs,)
File "/home/hummingbot/hummingbot/connector/derivative/kalshi_perpetual/kalshi_perpetual_derivative.py", line 333, in _place_order_and_process_update
exchange_order_id, update_timestamp = await self._place_order(
^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
File "/home/hummingbot/hummingbot/connector/derivative/kalshi_perpetual/kalshi_perpetual_derivative.py", line 318, in _place_order
response = await self._api_post(
^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
limit_id=CONSTANTS.CREATE_ORDER_LIMIT_ID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 907, in _api_post
return await self._api_request(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 946, in _api_request
request_result = await rest_assistant.execute_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<8 lines>...
)
^
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 48, in execute_request
response = await self.execute_request_and_get_response(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 101, in execute_request_and_get_response
raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. "
f"Error: {error_text}")
OSError: Error executing request POST https://external-api.kalshi.com/trade-api/v2/margin/orders. HTTP status is 400. Error: {"error":{"code":"invalid_order","message":"invalid order","details":"post only cross"}}
binance spot
2026-09-21 12:36:20,557 - 16 - hummingbot.connector.exchange.binance.binance_exchange.BinanceExchange - NETWORK - Error submitting buy LIMIT_MAKER order to Binance for 0.00008000 BTC-FDUSD 85412.38000000.
Traceback (most recent call last):
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 462, in _create_order
await self._place_order_and_process_update(order=order, **kwargs,)
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 479, in _place_order_and_process_update
exchange_order_id, update_timestamp = await self._place_order(
^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
File "/home/hummingbot/hummingbot/connector/exchange/binance/binance_exchange.py", line 196, in _place_order
order_result = await self._api_post(
^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
is_auth_required=True)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 907, in _api_post
return await self._api_request(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hummingbot/hummingbot/connector/exchange_py_base.py", line 946, in _api_request
request_result = await rest_assistant.execute_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<8 lines>...
)
^
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 48, in execute_request
response = await self.execute_request_and_get_response(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "/home/hummingbot/hummingbot/core/web_assistant/rest_assistant.py", line 101, in execute_request_and_get_response
raise IOError(f"Error executing request {method.name} {url}. HTTP status is {response.status}. "
f"Error: {error_text}")
OSError: Error executing request POST https://api.binance.com/api/v3/order. HTTP status is 400. Error: {"code":-2010,"msg":"Order would immediately match and take."}
2026-09-21 12:36:20,558 - 16 - hummingbot.connector.exchange.binance.binance_exchange.BinanceExchange - WARNING - Failed to submit BUY order to Binance. Check API key and network connection.
2026-09-21 12:36:20,559 - 16 - hummingbot.strategy_v2.executors.position_executor.position_executor - ERROR - Open order failed x-MG43PCSNBBCFD65bfd7f435f726bb8. Retrying 0/10
2026-09-21 12:36:20,559 - 16 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1789994180.0, "order_id": "x-MG43PCSNBBCFD65bfd7f435f726bb8", "order_type": "OrderType.LIMIT_MAKER", "error_message": "Error executing request POST https://api.binance.com/api/v3/order. HTTP status is 400. Error: {\"code\":-2010,\"msg\":\"Order would immediately match and take.\"}",
"error_type": "OSError", "event_name": "MarketOrderFailureEvent", "event_source": "binance"}
2026-09-21 12:36:20,560 - 16 - hummingbot.connector.client_order_tracker - INFO - Order x-MG43PCSNBBCFD65bfd7f435f726bb8 has failed. Order Update: OrderUpdate(trading_pair='BTC-FDUSD', update_timestamp=1789994180.0, new_state=<OrderState.FAILED: 6>, client_order_id='x-MG43PCSNBBCFD65bfd7f435f726bb8', exchange_order_id=None, misc_updates={'error_message': 'Error executing
request POST https://api.binance.com/api/v3/order. HTTP status is 400. Error: {"code":-2010,"msg":"Order would immediately match and take."}', 'error_type': 'OSError'})Code inspection of development at 0d6cd8527 found the same generic placement-failure path in Binance perpetual and several other connectors. Backpack already adds a clearer maker-only warning, but still reaches the same network-error handler afterward. The supplied tracebacks confirm the behavior on Kalshi perpetual and Binance spot; the other connectors were inspected in code only.
Improve the user-facing message for recognized maker-only rejections so it clearly explains that the order was rejected because it would execute immediately. I think we can keep the technical details available in debug logs and preserve the order-failure notification used by the strategy. This is a UX enhancement to error reporting, the exchange's maker-only protection is working as expected
Steps to reproduce
- Use a connector that supports LIMIT_MAKER orders, such as Kalshi perpetual or Binance.
- Submit a LIMIT_MAKER buy at or above the best ask, or a sell at or below the best bid.
- When the exchange rejects the submission because it would execute immediately, check the bot logs.
- Observe the NETWORK error and full traceback for the expected rejection, including the misleading API-key/network warning shown on Binance.
Release version
dev-2.17
Type of installation
Source
Attach required files
n/a
Source: hummingbot/hummingbot