About APIs
Error Codes
Errors consist of three parts: an error code and a message. Codes are universal, but messages can vary. Here is the error JSON payload:
Error Code | Status Code | Error Name | Description |
---|---|---|---|
-1000 | 500 | UNKNOWN | An unknown error occurred while processing the request. |
-1000 | 500 | UNKNOWN | The data does not exist |
-1001 | 401 | INVALID_SIGNATURE | The api key or secret is in wrong format. |
-1002 | 401 | UNAUTHORIZED | API key or secret is invalid, it may be because key have insufficient permission or the key is expired/revoked. |
-1003 | 429 | TOO_MANY_REQUEST | Rate limit exceed. |
-1004 | 400 | UNKNOWN_PARAM | An unknown parameter was sent. |
-1005 | 400 | INVALID_PARAM | Some parameters are in wrong format for api. |
-1005 | 400 | INVALID_PARAM | ratio_qty_request should be in range 0-1. |
-1005 | 400 | INVALID_PARAM | extra_liquidation_ratio should be in range 0-1. |
-1005 | 400 | INVALID_PARAM | if you set extra_liquidation_ratio > 0, ratio_qty_request must be 1. |
-1006 | 400 | RESOURCE_NOT_FOUND | The data is not found in server. For example, when client try canceling a CANCELLED order, will raise this error. |
-1007 | 409 | DUPLICATE_REQUEST | The data is already exists or your request is duplicated. |
-1008 | 400 | QUANTITY_TOO_HIGH | The quantity of settlement is too high than you can request. |
-1009 | 400 | CAN_NOT_WITHDRAWAL | Can not request withdrawal settlement, you need to deposit other arrears first. |
-1011 | 400 | RPC_NOT_CONNECT | Can not place/cancel orders, it may be because internal network error. Please try again in a few seconds. |
-1012 | 400 | RPC_REJECT | The place/cancel order request is rejected by internal module, it may because the account is in liquidation or other internal errors. Please try again in a few seconds. |
-1012 | 400 | RPC_REJECT | Another liquidation is in process |
-1101 | 400 | RISK_TOO_HIGH | The risk exposure for client is too high, it may cause by sending too big order or the leverage is too low. please refer to client info to check the current exposure. |
-1101 | 400 | RISK_TOO_HIGH | The margin will be insufficient after. |
-1102 | 400 | MIN_NOTIONAL | The order value (price * size) is too small. |
-1103 | 400 | PRICE_FILTER | The order price is not following the scope or range rules. |
-1104 | 400 | SIZE_FILTER | The order quantity is not following the step size rule for the symbol. |
-1105 | 400 | PERCENTAGE_FILTER | Price is X% too high or X% too low from the mid price. |
-1201 | 400 | LIQUIDATION_REQUEST_RATIO_TOO_SMALL | total notional < 10000, least req ratio should = 1 |
-1201 | 400 | LIQUIDATION_REQUEST_RATIO_TOO_SMALL | least req ratio should = xxxx |
-1202 | 400 | LIQUIDATION_STATUS_ERROR | No need to liquidation because user margin is enough. |
-1202 | 400 | LIQUIDATION_STATUS_ERROR | Can not find given liquidationId. |