
# 错误代码

error JSON payload:

```json
{
  "code": -1121,
  "msg": "Invalid symbol."
}
```

错误由两部分组成：错误代码和消息。代码是通用的，但是消息可能会有所不同。

## 10xx - 常规服务器或网络问题

### -1000 UNKNOWN_ERROR
- An unknown error occurred.
- 处理请求时发生未知错误。

### -1054 SYSTEM_ERROR
- System error, please retry later.
- 系统错误，请稍后重试。

## 10xx - 认证/访问

### -1040 ACCESS_KEY_EMPTY
- ACCESS_KEY header is required.
- 请求头 ACCESS_KEY 不能为空。

### -1041 ACCESS_SIGN_EMPTY
- ACCESS_SIGN header is required.
- 请求头 ACCESS_SIGN 不能为空。

### -1042 ACCESS_TIMESTAMP_EMPTY
- ACCESS_TIMESTAMP header is required.
- 请求头 ACCESS_TIMESTAMP 不能为空。

### -1043 INVALID_ACCESS_TIMESTAMP
- Invalid ACCESS_TIMESTAMP.
- 无效的 ACCESS_TIMESTAMP。

### -1044 INVALID_ACCESS_KEY
- Invalid ACCESS_KEY.
- 无效的 ACCESS_KEY。

### -1045 INVALID_CONTENT_TYPE
- Invalid Content-Type, please use application/json.
- 无效的 Content-Type，请使用 application/json 格式。

### -1046 ACCESS_TIMESTAMP_EXPIRED
- Request timestamp expired.
- 请求时间戳已过期。

### -1047 API_AUTH_ERROR
- API authentication failed.
- API 校验失败。

### -1049 API_KEY_OR_PASSPHRASE_INCORRECT
- API key or passphrase incorrect.
- API key 或 passphrase 不正确。

### -1050 USER_STATUS_FORBIDDEN
- User status is abnormal.
- 用户状态异常。

### -1051 PERMISSION_DENIED
- Permission denied.
- 权限被拒绝。

### -1052 INSUFFICIENT_PERMISSIONS
- Insufficient permissions for this action.
- 该操作所需权限不足。

### -1053 PERMISSION_VALIDATION_FAILED
- Permission validation failed.
- 权限校验失败。

### -1055 USER_AUTH_NOT_SAFE
- User must bind phone or Google authenticator.
- 用户必须绑定手机或谷歌验证器。

### -1056 ILLEGAL_IP
- Invalid IP address.
- 非法的 IP 地址。

### -1057 USER_LOCKED
- User account is locked.
- 用户账户已被锁定。

### -1058 NO_PERMISSION_TRADE_PAIR
- The trading pair is not supported via the API. Check the supported symbols here: [https://api-contract.weex.com/capi/v3/market/apiTradingSymbols](https://api-contract.weex.com/capi/v3/market/apiTradingSymbols).
- 该交易对暂不支持通过 API 使用。请通过以下链接查看当前支持的交易对：[https://api-contract.weex.com/capi/v3/market/apiTradingSymbols](https://api-contract.weex.com/capi/v3/market/apiTradingSymbols)。

### -1059 HIGH_FREQUENCY_ORDER_LIMITED
- Too many high-frequency order requests in current window.
- 当前时间窗口内高频下单请求次数过多。

### -1060 API_KEY_SYMBOL_NOT_BOUND
- This API key is not bound to the trading pair.
- 此 API Key 未绑定该交易对。

## 11xx - 请求参数

### -1115 INVALID_TIME_IN_FORCE
- Invalid timeInForce.
- 无效的 timeInForce。

### -1116 INVALID_ORDER_TYPE
- Invalid order type.
- 无效的订单类型。

### -1117 INVALID_SIDE
- Invalid side.
- 无效的方向。

### -1121 INVALID_SYMBOL
- Invalid symbol.
- 无效的交易对。

### -1128 INVALID_PARAM_COMBINATION
- Combination of optional parameters invalid.
- 可选参数组合无效。

### -1135 INVALID_JSON
- Invalid JSON request.
- 无效的 JSON 请求。

### -1140 PARAM_VALIDATE_ERROR
- Parameter validation failed.
- limit must be between %d and %d.
- startTime must be a valid millisecond timestamp.
- endTime must be a valid millisecond timestamp.
- 参数校验失败。

### -1141 PARAM_EMPTY
- Parameter '%s' cannot be empty.
- 参数 '%s' 不能为空。

### -1142 PARAM_ERROR
- Parameter '%s' is invalid.
- 参数 '%s' 错误。

### -1150 REQUEST_METHOD_NOT_SUPPORTED
- Request method not supported.
- 不支持的请求方法。

### -1160 DECIMAL_PRECISION_ERROR
- Decimal precision error.
- 小数精度错误。

### -1170 QUERY_TIME_OUT_OF_RANGE
- startTime must be within the last %d days.
- Time range cannot exceed %d days.
- 查询时间超出范围。

### -1171 START_TIME_AFTER_END_TIME
- startTime cannot be greater than endTime.
- 开始时间不能大于结束时间。

### -1180 CLIENT_OID_LENGTH_ERROR
- client_oid length must not exceed 40 and must not contain special characters.
- client_oid 长度不得超过40，且不能包含特殊字符。

### -1190 FORBIDDEN_ACCESS
- Access forbidden. Please contact support.
- 访问被禁止，请联系支持。

## 30xx - 合约配置

### -3006 CONTRACT_DOES_NOT_SUPPORT_CONTRACT_UNITS
- Contract does not support ordering by contract units.
- 合约不支持按合约单位下单。

### -3007 CONTRACT_MAX_ORDER_QUANTITY_EXCEEDED
- Maximum contract order quantity exceeded.
- 超过合约最大下单数量。

## 32xx - 合约订单

### -3200 CONTRACT_ORDER_NOT_EXIST
- Order does not exist.
- 订单不存在。

### -3201 CONTRACT_ORDER_QUANTITY_EXCEEDS_LIMIT
- Order quantity cannot exceed %d.
- 订单数量不能超过 %d。

### -3235 CONTRACT_NO_PERMISSION_TRADE_PAIR
- No permission for this trading pair.
- 没有权限交易此币对。

### -3236 CONTRACT_NO_PERMISSION_API
- No permission to access this API.
- 没有权限调用此 API。

## 33xx - 合约杠杆/仓位

### -3313 CONTRACT_LEVERAGE_ERROR
- Leverage exceeds maximum limit.
- 杠杆错误。

## 36xx - 合约内部/系统

### -3613 CONTRACT_FATAL_TOKEN_NOT_SUPPORT
- Fatal: token ID not supported for symbol.
- 该交易对不支持此 token ID。
