Error Codes

Canonical PAX API error catalog — 98 codes across 15 groups. All errors return the envelope {"error":{"code","message","trace_id","details?"}}. Auto-generated from packages/core/src/errors.ts on every deploy.

Error response format

{
  "error": {
    "code":     "TIER_LIMIT_EXCEEDED",
    "message":  "order notional 50.00 exceeds tier max_order_usdt 10",
    "trace_id": "a98efc1d-7db7-4ee2-bba6-afe481418c11",
    "details":  { "tier": "self_serve", "cap": "10" }
  }
}

The HTTP status is bound to the code via the shared error catalog — the same code always returns the same status. Reference the trace_id when contacting support.

400 — client errors

HTTPCodeDescription
400BAD_REQUESTMalformed request body or query
400VALIDATION_FAILEDPayload did not pass schema validation
400IDEMPOTENCY_KEY_MISSINGIdempotency-Key header required on writes
400IDEMPOTENCY_KEY_MALFORMEDIdempotency-Key must be 24-char base62
409IDEMPOTENCY_BODY_MISMATCHIdempotency key reused with different body
400URN_MALFORMEDIdentifier not a canonical URN
400URN_INVALID_DOMAINIdentifier URN domain unrecognized
400URN_INVALID_SLUGIdentifier URN slug malformed
400URN_SLUG_TOO_LONGIdentifier URN slug exceeds 128 chars
400ID_MALFORMEDIdentifier not a canonical prefixed id
400ID_INVALID_KINDIdentifier prefix unrecognized

401 — authentication

HTTPCodeDescription
401AUTH_REQUIREDMissing credentials
401AUTH_INVALIDCredentials rejected
401WRONG_ENV_KEYKey's tier flag does not match the requested capability (e.g. self_serve key attempting an over-cap trade)
401TIMESTAMP_SKEWHMAC timestamp outside ±300s window
401NONCE_REUSEDHMAC nonce already seen within TTL
401SIGNATURE_INVALIDHMAC signature does not match request
401TOKEN_EXPIREDOAuth access token expired
401TOKEN_REVOKEDOAuth access token revoked
401TOKEN_INVALIDOAuth access token could not be verified
400PKCE_INVALIDPKCE code_verifier did not match code_challenge
400AUTH_CODE_EXPIREDOAuth authorization code has expired
400AUTH_CODE_CONSUMEDOAuth authorization code has already been used
400REDIRECT_URI_MISMATCHredirect_uri does not match the value bound at authorize time
401REFRESH_TOKEN_REUSEDRefresh token reuse detected — token family revoked

403 — authorization

HTTPCodeDescription
403SCOPE_MISSINGRequired scope not present on credential
403SCOPE_NOT_ALLOWEDRequested scope is not in the app allowed_scopes list
403STEP_UP_MFA_REQUIREDHigh-friction scope requires step-up MFA verification
403BUILDER_NOT_APPROVEDBuilder identity is not in approved status
403APP_NOT_APPROVEDApp is not in approved status
403APP_DISABLEDApp has been disabled by owner or admin
403DELEGATION_MISSINGon_behalf_of requires signed delegation grant
403DELEGATION_EXPIREDDelegation grant has expired
403JURISDICTION_BLOCKEDThis action is not permitted in this jurisdiction
404SANDBOX_ONLYEndpoint only available in sandbox environment
404PROD_ONLYEndpoint disabled in sandbox environment

404

HTTPCodeDescription
404NOT_FOUNDResource not found

409 — conflict

HTTPCodeDescription
409ALREADY_EXISTSResource with that identifier already exists
409STATE_CONFLICTRequested transition not valid from current state
409IDEMPOTENCY_IN_FLIGHTA prior request with the same key is still processing

422 — semantic

HTTPCodeDescription
422RISK_LIMIT_BREACHOrder would breach a configured risk limit
422BUILDER_FEE_ABOVE_CAPRequested builder_fee_bps exceeds apps.builder_fee_cap_bps
422MARKET_HALTEDMarket currently halted by circuit breaker
422MARKET_CLOSEDMarket is past close time
422MARKET_NOT_APPROVEDMarket template proposal is not yet approved
422MARKET_TEMPLATE_UNKNOWNTemplate id not found
422MARKET_TEMPLATE_PARAM_INVALIDTemplate param failed validation
422ORACLE_ADAPTER_UNKNOWNOracle adapter not registered
422ORACLE_DISAGREEMENTOracle adapters disagreed beyond max deviation
422RESOLUTION_LOCKEDResolution challenge window still open
422DISPUTE_ALREADY_OPENA dispute is already open on this market
422ANTI_ABUSE_BLOCKEDTrade flagged by anti-abuse rules (wash/self/related-party)
422OPERATOR_AGREEMENT_MISSINGOperator requires signed agreement before this action

429

HTTPCodeDescription
429RATE_LIMITEDRate limit exceeded, retry after Retry-After
429TIER_LIMIT_EXCEEDEDOrder or daily notional exceeds api_key tier caps
403TIER_UPGRADE_REQUIREDThis endpoint requires a higher trust tier
429SANDBOX_KEY_DAILY_LIMITThis IP has already minted a sandbox key today
401PASSWORD_INCORRECTCurrent password does not match
422PASSWORD_TOO_WEAKNew password does not meet strength requirements

webhook subsystem

HTTPCodeDescription
400WEBHOOK_URL_INVALIDWebhook URL must be a valid https URL with no userinfo/fragment
400WEBHOOK_SECRET_INVALIDWebhook signing secret is malformed or missing
401WEBHOOK_TIMESTAMP_SKEWWebhook signature timestamp outside tolerance window
401WEBHOOK_SIGNATURE_INVALIDWebhook signature does not verify against the presented body
422WEBHOOK_EVENT_UNKNOWNWebhook event_type not present in canonical catalog

subaccounts / delegation

HTTPCodeDescription
409SUBACCOUNT_LABEL_TAKENA subaccount with this label already exists
409SUBACCOUNT_HAS_BALANCECannot close subaccount with nonzero balance
409SUBACCOUNT_HAS_POSITIONSCannot close subaccount with open positions
409SUBACCOUNT_HAS_OPEN_ORDERSCannot close subaccount with open orders
403SUBACCOUNT_FROZENSubaccount is frozen
403DELEGATION_SCOPE_MISMATCHPartner API key lacks required delegation:trade scope
422DELEGATION_DAILY_CAP_EXCEEDEDDelegation daily notional cap exceeded
422INSUFFICIENT_BALANCEBalance is insufficient for this operation

composer

HTTPCodeDescription
400TEMPLATE_SCHEMA_INVALIDTemplate params_schema is malformed
400TEMPLATE_DISPLAY_KEY_MISSINGdisplay_defaults references a key not in params_schema
409PROPOSAL_STATE_INVALIDProposal state transition not valid
422COMBO_COMPONENT_HALTEDCombo derived market has a halted component
403COMPLIANCE_GATE_BLOCKEDCompliance gate blocked market creation

liquidity/RFQ

HTTPCodeDescription
400QUOTE_EXPIRED_IN_PASTQuote expires_at_ms must be in the future
400QUOTE_SIZE_INVALIDQuote size is invalid (must be > 0)
409RFQ_NOT_OPENRFQ is not open for new quotes
422RFQ_QUOTE_OUT_OF_BOUNDSRFQ quote price outside min/max bounds
422INCENTIVE_BUDGET_EXCEEDEDIncentive budget for this period is exhausted

widget / data / MCP

HTTPCodeDescription
404MCP_TOOL_UNKNOWNMCP tool name not registered
403MCP_SCOPE_MISSINGMCP tool call missing required scope
501MCP_NOT_IMPLEMENTEDMCP tool has no upstream implementation yet
403WIDGET_ORIGIN_BLOCKEDWidget embed origin is blocked
403DATA_TIER_EXCEEDEDData query exceeds allowed tier
422DATA_RANGE_TOO_LARGE_FOR_TIERRequested range exceeds tier maximum

oracle / resolution

HTTPCodeDescription
502ORACLE_ADAPTER_ERROROracle adapter fetch failed
403ORACLE_BOND_INSUFFICIENTOracle provider bond below configured minimum
422RESOLUTION_EVIDENCE_MISSINGResolution requires evidence and none was attached
409RESOLUTION_CHALLENGE_OPENCannot finalize while a challenge window is open

marketplace

HTTPCodeDescription
403LISTING_NOT_APPROVEDMarketplace listing has not been approved
409BOUNTY_ALREADY_CLAIMEDBounty has already been claimed

500 — / 502 / 503 / 504

HTTPCodeDescription
500INTERNAL_ERRORAn internal error occurred
502UPSTREAM_ERRORUpstream service returned an error
504UPSTREAM_TIMEOUTUpstream service timeout
503MAINTENANCEService temporarily in maintenance

Canonical source

This table is generated from packages/core/src/errors.ts. To propose a new code, PR that file; do not edit this HTML directly. See OpenAPI spec for which codes each endpoint can return.