place_order_to_subaccount
| Error Code | Module | Error Name | When It Occurs |
|---|---|---|---|
| 1 | builder_code_registry | EINVALID_AMOUNT | Builder fees <= 0 |
| 1 | tp_sl_utils | EINVALID_TP_SL_PARAMETERS | Invalid TP/SL parameters |
| 1 | order_placement_utils | EINVALID_MATCH_COUNT | Match count validation error |
| 1 | clearinghouse_perp | EINVALID_ARGUMENT | Invalid argument |
| 2 | clearinghouse_perp | EINVALID_SIZE_IS_ZERO | Size == 0 in settlement |
| 2 | builder_code_registry | EBUILDER_NOT_REGISTERED | Builder not registered |
| 2 | async_matching_engine | EINVALID_TP_SL_FOR_REDUCE_ONLY | TP/SL with reduce_only |
| 3 | clearinghouse_perp | EINVALID_SIZE_IS_TOO_LARGE | Size too large |
| 3 | dex_accounts | ENOT_SUBACCOUNT_OWNER_OR_LACKS_PERP_TRADING_PERMISSIONS | Signer lacks trading permissions |
| 3 | async_matching_engine | EINVALID_TP_SL_WITH_TRIGGER_CONDITION | TP/SL with stop_price |
| 4 | builder_code_registry | EINVALID_MAX_FEE | Builder fees exceed max fee |
| 4 | perp_market_config | ESIZE_NOT_RESPECTING_MIN_SIZE | Size < min_size |
| 4 | perp_engine | EMARKET_HALTED | Exchange is not open |
| 4 | clearinghouse_perp | EINVALID_PRICE_IS_ZERO | Price == 0 |
| 4 | async_matching_engine | EINVALID_STOP_PRICE | Invalid stop_price |
| 5 | clearinghouse_perp | EINVALID_PRICE_IS_TOO_LARGE | Price too large |
| 5 | pending_order_tracker | E_INVALID_REDUCE_ONLY_ORDER | Invalid reduce-only order |
| 5 | async_matching_engine | EINVALD_WORK_UNITS_PER_TRIGGER | Invalid work units |
| 6 | perp_market_config | EPRICE_NOT_RESPECTING_TICKER_SIZE | Price not multiple of ticker_size |
| 6 | clearinghouse_perp | EINVALID_SETTLE_RESULT | Invalid settlement result |
| 7 | clearinghouse_perp | ESELF_TRADE_NOT_ALLOWED | Taker == maker |
| 8 | pending_order_tracker | EMAX_FIXED_SIZED_PENDING_REQS_HIT | Max fixed-size pending requests exceeded |
| 8 | clearinghouse_perp | ENOT_REDUCE_ONLY | Not reduce-only when expected |
| 8 | dex_accounts | ESUBACCOUNT_IS_NOT_ACTIVE | Subaccount is inactive |
| 10 | perp_market_config | EINVALID_PRICE | Price == 0 |
| 10 | pending_order_tracker | EINVALID_TP_SL_SIZE | Invalid TP/SL size |
| 11 | perp_market_config | EINVALID_SIZE | Size == 0 |
| 12 | perp_market_config | EORDER_SIZE_TOO_LARGE | Price × size too large |
cancel_client_order_to_subaccount
| Error Code | Module | Error Name | When It Occurs |
|---|---|---|---|
| 2 | pending_order_tracker | E_MARKET_NOT_FOUND | Market not found in account’s pending orders |
| 3 | pending_order_tracker | E_INVALID_ORDER_CLEANUP_SIZE | Invalid order cleanup size (size mismatch or price×size mismatch) |
| 4 | perp_engine | EMARKET_HALTED | Exchange is not open |
| 5 | async_matching_engine | EINVALD_WORK_UNITS_PER_TRIGGER | Invalid work units (should not occur with DEFAULT_WORK_UNITS_PER_TRIGGER=5) |
place_bulk_orders_to_subaccount
| Error Code | Module | Error Name | When It Occurs |
|---|---|---|---|
| 1 | clearinghouse_perp | EINVALID_ARGUMENT | Prices/sizes length mismatch in get_effective_price_and_size |
| 3 | clearinghouse_perp | EINVALID_SIZE_IS_TOO_LARGE | Total size exceeds I64_MAX |
| 3 | dex_accounts | ENOT_SUBACCOUNT_OWNER_OR_LACKS_PERP_TRADING_PERMISSIONS | Signer lacks trading permissions |
| 4 | perp_market_config | ESIZE_NOT_RESPECTING_MIN_SIZE | Any size < min_size |
| 4 | perp_engine | EMARKET_HALTED | Exchange is not open |
| 5 | clearinghouse_perp | EINVALID_PRICE_IS_TOO_LARGE | Effective price exceeds I64_MAX |
| 5 | async_matching_engine | EINVALD_WORK_UNITS_PER_TRIGGER | Invalid work units |
| 6 | perp_market_config | EPRICE_NOT_RESPECTING_TICKER_SIZE | Any price not multiple of ticker_size |
| 8 | dex_accounts | ESUBACCOUNT_IS_NOT_ACTIVE | Subaccount is inactive |
| 10 | perp_market_config | EINVALID_PRICE | Any price == 0 |
| 11 | perp_market_config | EINVALID_SIZE | Any size == 0 |
| 12 | perp_market_config | EORDER_SIZE_TOO_LARGE | Any price × size too large |
| 13 | perp_market_config | EPRICE_SIZES_LENGTH_MISMATCH | Prices length != sizes length |
cancel_bulk_order_to_subaccount
| Error Code | Module | Error Name | When It Occurs |
|---|---|---|---|
| 3 | dex_accounts | ENOT_SUBACCOUNT_OWNER_OR_LACKS_PERP_TRADING_PERMISSIONS | Signer lacks trading permissions |
| 4 | perp_engine | EMARKET_HALTED | Exchange is not open |
| 8 | dex_accounts | ESUBACCOUNT_IS_NOT_ACTIVE | Subaccount is inactive |

