Error Handling
Error Handling
Requests with application or business logic errors will return with an HTTP code of 200, but with additional fields for error code and message. For example:
{
"code": 171008,
"message": "Internal Server Error"
}
{
"code": 171018,
"message": "expire time exceeds global limit 120s"
}To verify the response status, please check success bool, or if code is present in the response.
Error Codes
The list of most common error codes returned by Swap APIs. For other unknown errors, please reach out to Native team members via existing channel.
101010
quantity exceeds max balance
The quoting amount exceeds the maximum available liquidity/depth represented by levels in the /orderbook endpoint.
171011
requested pair not found
The requested pair is not supported by Native and can’t be found.
171015
quoted token not available
The requested quote/buying token is not available.
101007
quoted pair not available, empty orderbook
The requested pair exists but currently not available, hence the orderbook is empty.
131003
failed to parse parameters
Issues with input parameters. Usually due to incorrect formats.
131011
front key version required
version is required when calling Native’s public UI apiKey. Note that version must be ≥ 3.
131004
invalid parameter
Issues with input parameters. Usually due to input conflicts, try avoid using duplicated params together like amount and amount_wei
171018
expire time exceeds global limit 120s
The requested expiry should not exceed 120s.
171053
fee bps exceeds limit 300
The commission fee should not exceed 300 bps.
131005
chain or chainId is required
Missing chain or chainId input.
201001
auth get api key is invalid
Auth error, check apiKey with Native team member.
201005
rate reach limit
Rate limit is hit.
Last updated