DH
4 min read·Updated 2026-06-14

Errors

The error shape, the status codes, and when to retry.

Error model

Every error response uses the same JSON shape: a stable error code and a human-readable message. Branch on the HTTP status and the error code, never on the message text — messages may change.

Error body
json
{
  "error": "bad_request",
  "message": "Unknown sort field: foo"
}

Status codes

The API uses a small, predictable set of status codes.

400 Bad Request

Validation failed — an unknown parameter, bad value, or malformed date/range. Fix the request before retrying.

client

401 Unauthorized

Missing, malformed, or revoked developer key. Do not retry; correct the X-API-Key header.

client

404 Not Found

Unknown route, network, asset, or wallet. The path or identifier does not resolve.

client

500 Server Error

Unexpected server-side failure.

server

Retries and backoff

Retry only on transient server-side errors. 4xx responses are caused by the request and will keep failing until you change it.

Retry policy

Retry 500 responses with exponential backoff and jitter, capped at a few attempts. Never retry 400, 401, or 404 — they fail the same way until you change the request.