message for control flow. Use HTTP status and error.code for programmatic handling.
A request that fails before it can be parsed does not get the envelope. A
missing or wrong Content-Type header returns 415, malformed JSON returns
400, and an unknown or missing body field returns 422, each with a
plain-text body. Branch on the HTTP status first, then on error.code when a
JSON body is present.
Error Codes
error.code is one of a fixed set of upper-case values. The ones you are most
likely to handle:
Withdrawal-specific codes such as
UNSUPPORTED_WITHDRAWAL_ROUTE are described
on Single withdrawals.
Common Status Codes
Retry Guidance
For a signed withdrawal retry, keep the exact body and its business
idempotency_key, then generate a new timestamp, nonce, and signature for the
new HTTP attempt. See Withdrawals. Do not apply generic
retry logic that changes the withdrawal body.
Required Headers
UseX-Api-Key on authenticated endpoints. Use Content-Type: application/json on JSON writes. Use Idempotency-Key on order create, cancel, and replace requests.