HTTP Status Codes
The Rime Finance API uses standard HTTP status codes to indicate the success or failure of API requests.Status Code | Type | Description |
---|---|---|
200 | OK | Everything worked as expected. |
400 | Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 | Unauthorized | No valid API key provided. |
402 | Request Failed | The parameters were valid but the request failed. |
403 | Forbidden | The API key doesn’t have permissions to perform the request. |
404 | Not Found | The requested resource doesn’t exist. |
409 | Conflict | The request conflicts with another request (perhaps due to using the same idempotent key). |
424 | External Dependency Failed | The request couldn’t be completed due to a failure in a dependency external to Rime. |
429 | Too Many Requests | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests. |
500, 502, 503, 504 | Server Errors | Something went wrong on Rime’s end. (These are rare.) |
Error Response Format
Errors are always returned as JSON, with a top-levelerror
object that always includes a code
, status
and message
value. For example:
JSON
Error Response Fields
error.code
: A machine-readable code identifying the errorerror.message
: A human-readable message providing more details about the errorerror.status
: The HTTP status codeerror.details
: Additional information about the error (when available)
Best Practices
- Always check status codes - Check for more than just
200 OK
, handle other status codes appropriately - Implement retries with exponential backoff - Throttling your request speeds and retries can help with rate limits (
429 Too Many Requests
) and server errors (500, 502, 503, 504
)