Testnetsats and USDhb here have no value.
Skip to content
Open testnet app
Copy page

Errors ​

Every non-2xx body is {"error": "<human message>", "code": "<machine code>"} (the 428 confirmation response carries a few extra fields). Match on code, never on the prose: the message may change; the code will not.

code is drawn from a closed enum that evolves additively: a new refusal class adds a member, but no member is ever renamed or removed (a contract test fails CI on a break). So a client can safely switch on it, and an unknown code means a newer server, so handle it as a generic failure and don't crash.

Status codes ​

statusmeaning
400validation / insufficient balance or margin
401missing or unknown key
403compliance refusal, insufficient scope, or a program refusal
404unknown market / order / account, or a route not served here
409idempotency or uniqueness conflict
428confirmation required (first-seen withdrawal destination)
429rate limited (see Rate limits)
501feature not wired for this deployment
503deposits halted (never affects withdrawals) or a transient or deployment-level unavailability

The code vocabulary ​

The full set, from the spec's ErrorCode enum (the REST reference links it, and /openapi.json carries it verbatim):

codestatusretryable
body_too_large413no
compliance_refused403no
confirmation_required428no
conflict409no
deposits_halted503yes
feature_unavailable501no
idempotency_key_reused409no
insufficient_balance400no
insufficient_margin400no
insufficient_scope403no
internal500no
market_halted400, 409no
not_found404no
oi_cap400, 409no
oracle_stale400, 409no
position_limit400, 409no
rate_limited429yes
reduce_only400, 409no
referral_forbidden403no
session_limit403no
size_not_whole_contracts400no
token_rail_unavailable503no
tvl_cap409no
unauthorized401no
unavailable503yes
usdhb_capacity409no
usdhb_dust409no
usdhb_mints_halted409no
usdhb_oracle_stale409no
usdhb_quote_expired409no
usdhb_requote409no
usdhb_whole_units409no
validation400no

The status a given code rides can vary with context; the code is the stable signal. Build against code. A retryable code means the identical request may succeed later (back off first; honor Retry-After on a 429); every other code needs a changed request or a changed account state. The table is generated from the spec's x-hardbasis-errors map in /openapi.json, which carries the same statuses and retry flag per code.

Last updated 2026-11-03

Program policy v1 · numbers current as of 2026-11-26

Testnet: test sats have no value. Nothing on this page is an offer, a solicitation, or advice.