Skip to main content

place_order_to_subaccount

Error CodeModuleError NameWhen It Occurs
1builder_code_registryEINVALID_AMOUNTBuilder fees <= 0
1tp_sl_utilsEINVALID_TP_SL_PARAMETERSInvalid TP/SL parameters
1order_placement_utilsEINVALID_MATCH_COUNTMatch count validation error
1clearinghouse_perpEINVALID_ARGUMENTInvalid argument
2clearinghouse_perpEINVALID_SIZE_IS_ZEROSize == 0 in settlement
2builder_code_registryEBUILDER_NOT_REGISTEREDBuilder not registered
2async_matching_engineEINVALID_TP_SL_FOR_REDUCE_ONLYTP/SL with reduce_only
3clearinghouse_perpEINVALID_SIZE_IS_TOO_LARGESize too large
3dex_accountsENOT_SUBACCOUNT_OWNER_OR_LACKS_PERP_TRADING_PERMISSIONSSigner lacks trading permissions
3async_matching_engineEINVALID_TP_SL_WITH_TRIGGER_CONDITIONTP/SL with stop_price
4builder_code_registryEINVALID_MAX_FEEBuilder fees exceed max fee
4perp_market_configESIZE_NOT_RESPECTING_MIN_SIZESize < min_size
4perp_engineEMARKET_HALTEDExchange is not open
4clearinghouse_perpEINVALID_PRICE_IS_ZEROPrice == 0
4async_matching_engineEINVALID_STOP_PRICEInvalid stop_price
5clearinghouse_perpEINVALID_PRICE_IS_TOO_LARGEPrice too large
5pending_order_trackerE_INVALID_REDUCE_ONLY_ORDERInvalid reduce-only order
5async_matching_engineEINVALD_WORK_UNITS_PER_TRIGGERInvalid work units
6perp_market_configEPRICE_NOT_RESPECTING_TICKER_SIZEPrice not multiple of ticker_size
6clearinghouse_perpEINVALID_SETTLE_RESULTInvalid settlement result
7clearinghouse_perpESELF_TRADE_NOT_ALLOWEDTaker == maker
8pending_order_trackerEMAX_FIXED_SIZED_PENDING_REQS_HITMax fixed-size pending requests exceeded
8clearinghouse_perpENOT_REDUCE_ONLYNot reduce-only when expected
8dex_accountsESUBACCOUNT_IS_NOT_ACTIVESubaccount is inactive
10perp_market_configEINVALID_PRICEPrice == 0
10pending_order_trackerEINVALID_TP_SL_SIZEInvalid TP/SL size
11perp_market_configEINVALID_SIZESize == 0
12perp_market_configEORDER_SIZE_TOO_LARGEPrice × size too large

cancel_client_order_to_subaccount

Error CodeModuleError NameWhen It Occurs
2pending_order_trackerE_MARKET_NOT_FOUNDMarket not found in account’s pending orders
3pending_order_trackerE_INVALID_ORDER_CLEANUP_SIZEInvalid order cleanup size (size mismatch or price×size mismatch)
4perp_engineEMARKET_HALTEDExchange is not open
5async_matching_engineEINVALD_WORK_UNITS_PER_TRIGGERInvalid work units (should not occur with DEFAULT_WORK_UNITS_PER_TRIGGER=5)

place_bulk_orders_to_subaccount

Error CodeModuleError NameWhen It Occurs
1clearinghouse_perpEINVALID_ARGUMENTPrices/sizes length mismatch in get_effective_price_and_size
3clearinghouse_perpEINVALID_SIZE_IS_TOO_LARGETotal size exceeds I64_MAX
3dex_accountsENOT_SUBACCOUNT_OWNER_OR_LACKS_PERP_TRADING_PERMISSIONSSigner lacks trading permissions
4perp_market_configESIZE_NOT_RESPECTING_MIN_SIZEAny size < min_size
4perp_engineEMARKET_HALTEDExchange is not open
5clearinghouse_perpEINVALID_PRICE_IS_TOO_LARGEEffective price exceeds I64_MAX
5async_matching_engineEINVALD_WORK_UNITS_PER_TRIGGERInvalid work units
6perp_market_configEPRICE_NOT_RESPECTING_TICKER_SIZEAny price not multiple of ticker_size
8dex_accountsESUBACCOUNT_IS_NOT_ACTIVESubaccount is inactive
10perp_market_configEINVALID_PRICEAny price == 0
11perp_market_configEINVALID_SIZEAny size == 0
12perp_market_configEORDER_SIZE_TOO_LARGEAny price × size too large
13perp_market_configEPRICE_SIZES_LENGTH_MISMATCHPrices length != sizes length

cancel_bulk_order_to_subaccount

Error CodeModuleError NameWhen It Occurs
3dex_accountsENOT_SUBACCOUNT_OWNER_OR_LACKS_PERP_TRADING_PERMISSIONSSigner lacks trading permissions
4perp_engineEMARKET_HALTEDExchange is not open
8dex_accountsESUBACCOUNT_IS_NOT_ACTIVESubaccount is inactive