Documentation
Errors
One error envelope shared by every product on the platform.
Envelope
Failures always answer with an error object carrying a stable machine-readable code and a human-readable message. Branch on code, never on the message text.
400 Bad Request
{
"error": {
"code": "invalid_currency",
"message": "Unknown currency code: XYZ."
}
}Codes you should handle
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_currency | A currency or asset code is not quoted. |
| 400 | invalid_amount | The amount is missing, zero or negative. |
| 401 | invalid_api_key | Missing, unknown, disabled or revoked key. |
| 403 | product_access_denied | The key belongs to a different product. |
| 403 | subscription_inactive | No active subscription for this product. |
| 429 | rate_limit_exceeded | Per-minute limit reached. Retry-After applies. |
| 429 | monthly_limit_exceeded | Monthly quota reached until the period resets. |
| 503 | rates_unavailable | Upstream rates are momentarily unavailable. |
Retrying safely
Every endpoint is a GET and therefore idempotent, so retries are safe. Back off with jitter on 429 and 503, and treat a monthly quota rejection as terminal until the period resets.