跳转至

错误码

API 返回数字 code 与可读的 msg。

典型 JSON:

{ "code": -1022, "msg": "Signature for this request is not valid." }

下方全局目录列出鉴权、校验与下游失败时可能出现的错误码。msg 线值保持英文。

全局表

Code Name Message(线路原文) 含义
-1000 UNKNOWN_ERROR An unknown error occurred while processing the request. 未知错误
-1001 DISCONNECTED Internal error. 内部错误 / 断开
-1002 UNAUTHORIZED You are not authorized to execute this request 未授权(缺 Key 或无权限)
-1003 TOO_MANY_REQUESTS Too many requests, current limit is %s requests per %s. 请求过多(限流)
-1010 BAD_REQUEST Bad request 错误请求 / 缺参数
-1015 TOO_MANY_ORDERS Too many new orders; current limit is %s orders per %s. 下单过于频繁
-1020 UNSUPPORTED_OPERATION This operation is not supported. 操作不受支持(常为角色不足)
-1021 TIMESTAMP_OUT_OF_WINDOW Timestamp for this request is outside of the recv window, request time is %s and server time is %s. 时间戳超出 recvWindow
-1022 INVALID_SIGNATURE Signature for this request is not valid. 签名无效
-1023 BIND_IP_WHITE_LIST_FIRST set ip white_list before use 请先绑定 IP 白名单
-1024 MISS_HEADER_ERROR Header '%s' is required. 缺少必需请求头
-1025 INVALID_PARAMETER Parameter '%s' is not valid. 参数无效
-1026 CREATE_LISTEN_KEY_RATE_LIMIT Create listenKey rate limited(%s per hour), please try again next hour 创建 listenKey 频率受限
-1027 INVALID_ORG_ID This API is not available for your organization. 机构不可用
-1028 USER_NOT_EXIST User does not exist 用户不存在
-1029 REPLAY_DETECTED Duplicate request detected; this nonce has already been used. 重复请求(nonce 已使用)
-1103 UNKNOWN_PARAM Required param not found. Check request parameters — see 签名请求. 缺少必需参数
-1105 MISS_PARAMETER Parameter '%s' is required. 缺少参数
-1106 PARAMETER_NOT_REQUIRED Parameter '%s' sent when not required 发送了不需要的参数
-1107 CONFLICT_PARAMETER_ERROR Parameter '%s' should not be both set. 互斥参数同时设置
-1108 ORDER_CANCEL_REPLACE_PARAMETER_ERROR Either the cancelOrigClientOrderId or cancelOrderId must be provided 撤改单缺少 cancel 订单标识
-1125 LISTEN_KEY_EXPIRED This listenKey does not exist listenKey 不存在或已过期
-1126 CREATE_LISTEN_KEY_FAILED Create listenKey failed, please try again later 创建 listenKey 失败
-1131 INSUFFICIENT_BALANCE Balance insufficient 余额不足
-1132 ORDER_CANCEL_REPLACE_FAILED Order cancel-replace failed. 撤改单失败
-1133 ORDER_CANCEL_REPLACE_PARTIALLY_FAILED Order cancel-replace partially failed. 撤改单部分失败
-1134 DUPLICATE_CLIENT_ORDER_ID Duplicate clientOrderId. clientOrderId 重复
-1150 MERCHANT_AUTHENTICATION_FAIL merchant authentication failed. 商户鉴权失败(AU 通常不出现)
-1151 USER_NOT_FOUND merchant user not found 商户用户未找到(AU 通常不出现)
-1152 NO_PERMISSION Unauthorized to operate this API. 无权操作该 API
-2010 NEW_ORDER_REJECTED New order rejected. 新订单被拒绝
-2011 CANCEL_REJECTED CANCEL_REJECTED 撤单被拒绝
-2013 NO_SUCH_ORDER Order does not exist. 订单不存在
-2015 API_KEY_NOT_ENABLE API-key is not enabled. API Key 未启用
-2017 IP_NOT_IN_WHITELIST Request ip is not in the whitelist IP 不在白名单
-2018 API_KEY_NOT_EXIST API-key does not exist. API Key 不存在或校验失败
-2019 API_KEY_TYPE_WRONG API-key type is wrong. API Key 类型错误
0 SUCCESS success 成功
-4000 INVALID_WITHDRAW_HISTORY_QUERY_TIME_RANGE time range beyond 90 days. 提现历史查询时间范围超限
-4001 INVALID_WITHDRAW_HISTORY_START_AND_ENDTIME start time must less than end time 提现历史起止时间无效
-4002 INVALID_WITHDRAW_HISTORY_QUERY_TIME_RANGE_WITH_ID as sent withdrawOrderId, time range must within 7 days. 带 withdrawOrderId 时时间范围须在 7 天内
-4003 INVALID_DEPOSIT_HISTORY_QUERY_TIME_RANGE time range beyond 90 days. 充值历史查询时间范围超限
-4004 INVALID_DEPOSIT_HISTORY_START_AND_ENDTIME; INVOICE_QUERY_LIMIT start time must less than end time; limit cannot exceed %s 充值历史起止时间无效;查询 limit 超限
-4005 PARAM_LENGTH_ERROR %s cannot exceed %s 参数长度超限
-4006 INVALID_QUERY_TIME_RANGE time range beyond %s days. 查询时间范围超限
-4007 INVALID_STATUS_AND_STATUSES cannot pass both status and statuses 不可同时传 status 与 statuses
-4010 INVALID_WITHDRAW_ORDER_ID withdrawOrderId is limited to 30 characters with number or alphabet withdrawOrderId 格式无效
-4011 IP_BLOCK Service is not available in your region. 当前地区不可用
-4012 NETWORKING_NOT_SUPPORT networking not support now 网络暂不支持
-10120 REGISTER_USER_STATUS_DISABLE Your account has been deactivated. Please contact support through our help center. 账户已停用
-10121 USER_TRANSFER_DISABLE User transfer function disabled 用户转账功能已禁用
-10200 PARAM_CANNOT_BOTH_NULL The parameters %s cannot be empty simultaneously. 参数不可同时为空
-9999 SYSTEM_ERROR Server Error 服务器错误
-10008 INVALID_ORGID Invalid org id! 无效 org id
-10009 PERIOD_ERROR Invalid period! 无效 period
-100010 SYMBOLS_ERROR Invalid Symbols! 无效 symbols
-100011 SYMBOLS_NOT_SUPPORT Not supported symbols 不支持的 symbols
-100001 EXCHANGE_ID_ERROR Invalid exchangeId! 无效 exchangeId
-100013 PARAM_SHOULD_NEITHER Parameter symbol and symbols cannot be used in combination. symbol 与 symbols 不可同时使用
-100012 BROKER_NOT_SUPPORT There is no such broker. broker 不存在
-20012 TRANSFER_TX_REPEAT The transfer request id is duplicate 转账请求 id 重复
码 常见原因 含义 参见
-1020 API Key 缺少该接口所需角色 角色不足 权限
-2017 调用方 IP 不在 Key 白名单内 IP 未在白名单 IP 白名单
-2018 API Key 缺失,或 Key/IP 校验失败 — 亦请核对白名单与 Key 状态(常与 -2017 一并排查) Key 不存在或校验失败 HMAC 故障排查

HTTP 状态映射(REST 网关)

HTTP 何时 Body
200 成功,以及大多数应用层错误(含缺 API Key / 签名错误如 -1002、-1022) 成功载荷 或 { "code", "msg" }
400 缺少或无效的请求参数 { "code", "msg" }(如 -1010)
429 普通限流超限 { "code": -1003, "msg": "Too many requests; current request has limited." } — 另有 Retry-After: 0
418 连续超限后的封禁 { "code": -1003, "msg": "Too many requests; … banned until …" } — 另有 Retry-After: <秒>

REST 鉴权失败不会以 HTTP 401 返回。

说明

  • 限流响应使用 -1003;确切 msg 文案可能与全局表模板略有差异。429 与 418 行为见限流。
  • 全局表中部分码(例如 -1027、-4011、面向商户的 -115x)在 AU 公开面极少或不会返回。
  • WebSocket 应用错误使用 { "code", "msg", "id" },代码为类 HTTP 的 400 / 401 / 429(见 WS 文档),与 REST 整数错误码命名空间不同。