Errors and Error Codes
API error response format and codes
The Lirium API uses standard HTTP status codes and returns detailed error information in the response body.
Error Response Format
All error responses have the following structure:
{
"error_code": "expired_order",
"error_msg": "The order has expired and cannot be confirmed",
"request_id": "20210301123456789012"
}Most error responses also include a request_id to help correlate the failure with server-side logs. Some errors carry additional context fields relevant to the specific failure — for example quote_amount_too_high includes max_amount and requested_amount.
Error Codes Reference
| Error Code | Description | HTTP Status |
|---|---|---|
auth_required | HTTP Authorization failed for the request | 401 |
body_parse_error | The body of the request is an invalid JSON or has invalid/missing required fields | 400 |
conflict | The entity you tried to create already exists | 409 |
destination_unable_to_receive | The destination is unable to receive. Either because the account is blocked or simply does not have the product required | 400 |
duplicate_reference_id | An order already exists with the provided reference id | 409 |
expired_order | The order has expired and cannot be confirmed | 400 |
forbidden | The application does not contain the required scope for the operation | 403 |
full_amount_required | The remainder of investment tokens value after the redemptions is below the minimum allowed. Use the full_amount parameter instead to obtain the desired amount plus the remainder | 400 |
insufficient_funds | There are not enough funds to complete the order | 400 |
internal_error | Unexpected internal server error occurred | 500 |
invalid_crypto_currency_address | The cryptocurrency address provided is not valid | 400 |
invalid_customer | The customer referenced in the request was not found | 400 |
invalid_destination | The destination value provided is not valid for the operation | 400 |
invalid_order_state | The order is in a different state than required to process the request | 400 |
invalid_parameters | There are missing or invalid parameters in the request. This is a general bad request error | 400 |
invalid_quote | The quote id provided cannot be used to create the order | 400 |
invalid_reference_id | The order reference id differs from the provided reference id | 400 |
invalid_security_code | The security code provided for confirmation is not valid | 400 |
invalid_settlement_currency | The settlement currency provided is not valid for the operation | 400 |
invalid_state | The entity is in a different state than required to process the request | 400 |
invalid_type | The instruction type provided is not valid | 400 |
method_not_allowed | HTTP method not allowed | 405 |
missing_fields | Required fields are missing in the request payload | 400 |
not_found | Resource not found | 404 |
payload_too_large | The request payload exceeds the maximum allowed size | 413 |
quote_amount_too_high | Cannot generate a buy/sell quote, the resulting amount is over the maximum allowed | 400 |
quote_not_found | Quote not found for the provided quote id | 400 |
settlement_required | Settlement currency parameter is required for this operation | 400 |
too_many_invalid_codes | Too many attempts to confirm the order with an invalid code. The order is cancelled | 400 |
Note: Descriptions listed here are approximate. Read the
error_msgproperty in the response body for the actual error reason for the sent request.
Updated 14 days ago
Did this page help you?
