Skip to main content
When an error occurs, our API will return an appropriate HTTP status code along with a descriptive error message.

HTTP Status Codes

The Rime Finance API uses standard HTTP status codes to indicate the success or failure of API requests.
Status CodeTypeDescription
200OKEverything worked as expected.
400Bad RequestThe request was unacceptable, often due to missing a required parameter.
401UnauthorizedNo valid API key provided.
402Request FailedThe parameters were valid but the request failed.
403ForbiddenThe API key doesn’t have permissions to perform the request.
404Not FoundThe requested resource doesn’t exist.
409ConflictThe request conflicts with another request (perhaps due to using the same idempotent key).
424External Dependency FailedThe request couldn’t be completed due to a failure in a dependency external to Rime.
429Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504Server ErrorsSomething went wrong on Rime’s end. (These are rare.)

Error Response Format

Errors are always returned as JSON, with a top-level error object that always includes a code, status and message value. For example:
JSON
{
  "error": {
    "code": "invalid_request",
    "message": "Missing required parameter: amount",
    "status": 400,
    "details": {
      "param": "amount",
      "type": "missing_field"
    }
  }
}

Error Response Fields

  • error.code: A machine-readable code identifying the error
  • error.message: A human-readable message providing more details about the error
  • error.status: The HTTP status code
  • error.details: Additional information about the error (when available)

Best Practices

  1. Always check status codes - Check for more than just 200 OK, handle other status codes appropriately
  2. 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)
I