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 CodeDescriptionHTTP Status
auth_requiredHTTP Authorization failed for the request401
body_parse_errorThe body of the request is an invalid JSON or has invalid/missing required fields400
conflictThe entity you tried to create already exists409
destination_unable_to_receiveThe destination is unable to receive. Either because the account is blocked or simply does not have the product required400
duplicate_reference_idAn order already exists with the provided reference id409
expired_orderThe order has expired and cannot be confirmed400
forbiddenThe application does not contain the required scope for the operation403
full_amount_requiredThe 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 remainder400
insufficient_fundsThere are not enough funds to complete the order400
internal_errorUnexpected internal server error occurred500
invalid_crypto_currency_addressThe cryptocurrency address provided is not valid400
invalid_customerThe customer referenced in the request was not found400
invalid_destinationThe destination value provided is not valid for the operation400
invalid_order_stateThe order is in a different state than required to process the request400
invalid_parametersThere are missing or invalid parameters in the request. This is a general bad request error400
invalid_quoteThe quote id provided cannot be used to create the order400
invalid_reference_idThe order reference id differs from the provided reference id400
invalid_security_codeThe security code provided for confirmation is not valid400
invalid_settlement_currencyThe settlement currency provided is not valid for the operation400
invalid_stateThe entity is in a different state than required to process the request400
invalid_typeThe instruction type provided is not valid400
method_not_allowedHTTP method not allowed405
missing_fieldsRequired fields are missing in the request payload400
not_foundResource not found404
payload_too_largeThe request payload exceeds the maximum allowed size413
quote_amount_too_highCannot generate a buy/sell quote, the resulting amount is over the maximum allowed400
quote_not_foundQuote not found for the provided quote id400
settlement_requiredSettlement currency parameter is required for this operation400
too_many_invalid_codesToo many attempts to confirm the order with an invalid code. The order is cancelled400

Note: Descriptions listed here are approximate. Read the error_msg property in the response body for the actual error reason for the sent request.


Did this page help you?