TRADEHUBTESTNET

Error codes

Every rejection has error.code, retryable and hint; when a fix is certain also suggested_args, and when only the person can act, human_action_url. Codes to retry later also carry retry_after (seconds); over REST they come with HTTP 429 or 503 and a Retry-After header. TradeHub never answers with a bare 500.

CodeWhoMeaningWhat to do
INVALID_PARAMSchange the callAn argument is missing, of the wrong type or out of range; error.rule names it.Fix that argument as error.hint says and call again.
PREVIEW_EXPIREDchange the callThe preview is older than 30 seconds, was already used, or belongs to another agent.Preview again and execute within 30 seconds.
PRICE_MOVEDchange the callThe mark moved more than the allowed drift between preview and execution.Preview again at the new price.
RATE_LIMITEDretry laterToo many calls: the per-agent rate, the daily account quota or the anonymous per-IP limit.Wait retry_after seconds. Closing, cancelling and the emergency stop are never limited.
CLIENT_ORDER_ID_REQUIREDchange the callexecute_previewed_order needs your own client_order_id.Pass a unique client_order_id; reuse it only to retry the same order.
TOO_MANY_PENDINGretry laterThis agent already has the maximum number of orders waiting for approval.Wait for the person to decide; do not resubmit.
REQUEST_NOT_FOUNDdo not retryNo such order request for this agent.Check the request_id.
REQUEST_NOT_PENDINGdo not retryThe request was already decided, executed or expired.Read it with get_order_request_status.
APPROVAL_EXPIREDchange the callNobody approved the order in time.Preview and execute again if still wanted.
ORDER_NOT_FOUNDdo not retryNo such resting order that this caller may touch.List orders with get_my_open_orders.
NO_POSITIONdo not retryNo open position in that symbol on that venue that this caller may close.List positions with get_my_open_positions.
REJECTEDdo not retryRejected for an unspecified reason.Read error.hint; ask the person if unclear.
AUTH_REQUIREDchange the callThis tool or venue needs an account; without one only public market data is available.Connect to /mcp with OAuth or use an API key; on the sandbox, POST /v1/trial gives a 24-hour key.
INSUFFICIENT_SCOPEthe person must actThe API key or the app's sign-in lacks a scope this tool needs; error.required lists them.Ask the person for a key or sign-in with those scopes.
SCOPE_INSUFFICIENTthe person must actThis agent's trading permissions do not allow this kind of action (e.g. it is read-only).Ask the person to change the agent's permissions on the Web.
KILL_NOT_ALLOWEDdo not retryOnly first-party clients and the user's own keys may use the emergency stop.Ask the person to stop trading on the Web or in Telegram.
APPROVAL_NOT_ALLOWEDdo not retryAgents can never approve orders; only a person on the Web or Telegram can.Tell the person an order is waiting.
AGENT_PAUSEDthe person must actThe agent is paused (five rejections in a row, or a stop).Ask the person to resume it on the Web; check why orders were rejected first.
AGENT_REVOKEDdo not retryThe person revoked this agent.Stop trading.
MANDATE_NOT_FOUNDthe person must actThis agent has no trading permissions.Ask the person to create one on the Web.
MANDATE_EXPIREDthe person must actThe agent's trading permissions have expired.Ask the person to renew it on the Web.
MANDATE_SYMBOLthe person must actThis agent's permissions do not include this symbol.Use an allowed symbol or ask the person.
MANDATE_ACTIONthe person must actThis agent's permissions do not allow this action (e.g. shorts).Ask the person.
MANDATE_VENUEthe person must actThis agent's permissions do not include this venue.Use an allowed venue or ask the person.
MANDATE_LEVERAGEchange the callLeverage is above this agent's permitted limit.Use error.suggested_args (the limit).
MANDATE_RISKchange the callLoss at the stop is above this agent's permitted share of equity.Use error.suggested_args (a smaller size_base) or move the stop closer.
MANDATE_NOTIONAL_EXCEEDEDchange the callThe order's value is above this agent's permitted USD limit.Use error.suggested_args (a smaller size_base).
MANDATE_POSITIONSchange the callThis agent's permitted number of open positions is reached.Close a position first.
MANDATE_DAILY_LOSSthe person must actThis agent's daily loss budget is used up.Stop until tomorrow (UTC).
MANDATE_DAILY_ORDERSthe person must actThis agent's daily number of orders is used up.Stop until tomorrow (UTC).
RISK_ACCOUNT_STATEretry laterThe account's state could not be read for the risk checks.Retry shortly.
RISK_POSITIONchange the callLoss at the stop is above the person's per-trade share of equity.Use error.suggested_args (a smaller size_base) or move the stop closer.
RISK_DAILYthe person must actThe daily loss limit is reached.Stop trading until it resets.
RISK_WEEKLYthe person must actThe weekly loss limit is reached.Stop trading until it resets.
RISK_MONTHLYthe person must actThe monthly loss limit is reached.Stop trading until it resets.
RISK_DRAWDOWNthe person must actThe drawdown from peak equity is at its limit.Stop trading; tell the person.
RISK_CONCURRENTchange the callThe maximum number of open positions is reached.Close a position first.
RISK_LEVERAGEchange the callLeverage is above the person's limit.Use error.suggested_args (the limit).
RISK_SYMBOLthe person must actThe person's limits do not allow this symbol.Use another symbol or ask.
RISK_MARGINchange the callNot enough free margin for this order.Reduce size_base or leverage.
STOP_LOSS_REQUIREDchange the callEvery opening order needs a stop-loss.Add stop_loss.
STOP_LOSS_NOT_TIGHTERchange the callA held position's stop can only move toward the price (and must stay on the loss side of the mark).Pick a price between the current stop and the mark; to exit, close the position.
STOP_LOSS_WRONG_SIDEchange the callThe stop is on the wrong side of the entry.Put it below entry for a buy, above for a sell.
PLATFORM_SYMBOLdo not retryTradeHub does not trade this symbol.Use a listed symbol (see tradehub.json).
PLATFORM_LEVERAGEchange the callLeverage is above TradeHub's cap.Use error.suggested_args (the cap).
PLATFORM_RISKchange the callLoss at the stop is above TradeHub's per-trade cap.Use error.suggested_args (a smaller size_base).
PLATFORM_PRICE_BANDchange the callA limit price crosses the mark by more than the price band, or a market order is larger than the book inside the band.Use error.suggested_args (a price inside the band, or a smaller size_base).
PLATFORM_SIZEchange the callThe size rounds down to zero at the venue's step.Use a larger size_base.
PLATFORM_VENUEthe person must actThe venue is not connected for this user.Use a connected venue, or ask the person to connect it on the Web.
PLATFORM_HALTEDretry laterTradeHub's operators stopped new positions for everyone; closing still works.Do not open positions until it is lifted.
TRADING_HALTEDthe person must actTrading is stopped for this account (emergency stop); closing still works.Only the person can resume, on the Web.
VENUE_MARGINchange the callNot enough free margin on this venue.Use error.suggested_args or lower leverage.
VENUE_UNAVAILABLEretry laterThe exchange did not answer or is failing.Retry later; see get_venue_health.
VENUE_OUTCOME_UNKNOWNchange the callThe exchange call started but TradeHub could not confirm how it ended.Check get_order_request_status or get_my_open_positions before acting; repeating execute_previewed_order with the same client_order_id never places a second order.
INTERNAL_ERRORretry laterTradeHub itself failed unexpectedly; nothing was decided about your call.Retry after retry_after seconds; an order retried with the same client_order_id is never placed twice. If it keeps failing, stop and give the person error.trace_id.
ORDER_VOIDEDdo not retryThe order was cancelled before it reached the exchange because the agent, its permissions or the account changed (paused, revoked, stopped).Check get_my_trading_permissions before trying again.
UNSUPPORTEDdo not retryThis exchange does not support that operation.Use another venue or tool.
NOT_FILLEDchange the callA market order found nothing to fill within the price band when it reached the exchange; nothing was opened.Check the book (get_order_book), then preview again.
TOO_MANY_TRIGGERSchange the callThis agent already has 5 trigger entries armed or waiting for approval.Cancel one it no longer needs with cancel_open_order(order_id=req_…), then place this one.
TAKE_PROFIT_SIDEchange the callA take-profit must be on the profit side: above the entry (or the mark, for one on a held position) for a long, below for a short.Pick a price beyond error.limit on the profit side and call again.
VENUE_REJECTEDdo not retryThe exchange rejected the order.Read error.hint; do not retry unchanged.
STOP_LOSS_FAILEDthe person must actThe order filled but the stop could not be placed; TradeHub closed the position.Tell the person; check get_my_open_positions.
SANDBOX_MARGINchange the callNot enough play money in the sandbox.Reduce size_base, or reset the sandbox on the Web.
REDUCE_ONLY_REJECTEDdo not retryThe exchange refused the reduce-only close.Check the position and retry.
LEVERAGE_NOT_SETretry laterThe exchange did not accept the leverage setting.Retry, or use lower leverage.
STOP_UNCONFIRMEDthe person must actThe exchange did not confirm the stop order.Check get_my_open_orders.
PRICE_REQUIREDchange the callA limit order needs a price.Add price, or use order_type market.
HYPERLIQUID_REJECTEDdo not retryHyperliquid rejected the order.Read error.hint.
HYPERLIQUID_ERRORretry laterHyperliquid returned an error.Retry later.
PAPER_LEVERAGEchange the callLeverage above the test venue's maximum.Lower leverage.
PAPER_LOT_SIZEchange the callSize not on the test venue's step.Round size_base.
PAPER_REDUCE_ONLYdo not retryThe test venue refused a reduce-only order.Check the position.
PAPER_REJECTEDdo not retryThe test venue rejected the order.Read error.hint.
ACCOUNT_REFUSEDthe person must actThe exchange account's credentials were refused when connecting it.Check the key or API wallet and connect it again on the Web.
KEY_CAN_WITHDRAWthe person must actThe exchange key can withdraw funds; TradeHub refuses such keys.Create a key without withdrawal rights.
HYPERLIQUID_KEY_REJECTEDthe person must actHyperliquid does not recognise this API wallet for the account.Approve the API wallet on Hyperliquid first.
BYBIT_ACCOUNT_MODEthe person must actBybit needs a unified account in one-way mode.Change it on Bybit.
OKX_ACCOUNT_MODEthe person must actOKX account mode not supported.Change it on OKX.
OKX_POSITION_MODEthe person must actOKX needs one-way (net) position mode.Change it on OKX.

TradeHub never asks for withdrawal permissions.