code, key and message:
Codes are grouped by domain:
General Errors
Authentication Errors
Account / Access Errors
API Key Errors
Trading Errors
Returned by deposit, withdrawal, inventory, and market endpoints.Asynchronous Trade Failure Codes
The errors above are returned synchronously when a call is rejected. A withdrawal that was accepted but later fails carries a separate, smaller, stable code instead: onItem.error (and on Trade.error when the whole trade failed for one shared cause), typed as TradeFailureCode. These are not numeric API error codes; they appear on the trade object and in callbacks.
Trade.error is typed as TradeErrorCode, on deposits as well as withdrawals. It can hold any value above plus these trade-level outcomes:
canceled and declined items carry no code: the status is the reason. A declined withdrawal is buyer fault: items bought from a marketplace are refunded minus the penalty the marketplace kept, and items AssetPay fills from its own stock are refunded in full. See Withdrawals → Per-Item Failure Reasons for handling guidance.
Wallet / Funding Errors
Mostly returned by crypto wallet endpoints, but several apply to trading flows too.Crypto Errors
Returned by the/client/crypto/* and /secure/crypto/* endpoints. See Crypto Deposits & Cashouts.
Callback / Webhook Errors
Risk Management Errors
Identity Verification Errors
Handling Errors
Checksuccess first, then handle based on the error code or key:
requestId from the response. It helps us trace the exact request in our logs.