跳转至

错误码

权威枚举:ptrader-project-libs/.../api-gateway-common/.../ApiErrorCode.java(共 63 个)。

典型 JSON:

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

msg 文案目前以英文枚举为准。逐接口可能返回的子集尚未完整映射 — [NEEDS-CONFIRMATION: 公布各公开路由可能返回的错误码]。

全局表

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
-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.
-1022 INVALID_SIGNATURE Signature for this request is not valid.
-1023 BIND_IP_WHITE_LIST_FIRST set ip white_list before use
-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
-1027 INVALID_ORG_ID This api only support for coins.ph.
-1028 USER_NOT_EXIST User does not exist
-1029 REPLAY_DETECTED Duplicate request detected; this nonce has already been used.
-1103 UNKNOWN_PARAM Required param not found, please ensure the parameters being sent correctly, more information please refer to the openapi documentation 'SIGNED Endpoint Examples' section.
-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
-1125 LISTEN_KEY_EXPIRED This listenKey does not exist
-1126 CREATE_LISTEN_KEY_FAILED Create listenKey failed, please try again later
-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.
-1150 MERCHANT_AUTHENTICATION_FAIL merchant authentication failed.
-1151 USER_NOT_FOUND merchant user not found
-1152 NO_PERMISSION Unauthorized to operate this 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.
-2017 IP_NOT_IN_WHITELIST Request ip is not in the whitelist
-2018 API_KEY_NOT_EXIST API-key does not exist.
-2019 API_KEY_TYPE_WRONG API-key type is wrong.
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.
-4003 INVALID_DEPOSIT_HISTORY_QUERY_TIME_RANGE time range beyond 90 days.
-4004 INVALID_DEPOSIT_HISTORY_START_AND_ENDTIME start time must less than end time
-4004 INVOICE_QUERY_LIMIT limit cannot exceed %s
-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
-4010 INVALID_WITHDRAW_ORDER_ID withdrawOrderId is limited to 30 characters with number or alphabet
-4011 IP_BLOCK Coins Pro does not service your region
-4012 NETWORKING_NOT_SUPPORT networking not support now
-10120 REGISTER_COINS_PH_USER_STATUS_DISABLE Your account has been deactivated. Please contact support through our help center.
-10120 REGISTER_PTRADER_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!
-10009 PERIOD_ERROR Invalid period!
-100010 SYMBOLS_ERROR Invalid Symbols!
-100011 SYMBOLS_NOT_SUPPORT Not supported symbols
-100001 EXCHANGE_ID_ERROR Invalid exchangeId!
-100013 PARAM_SHOULD_NEITHER Parameter symbol and symbols cannot be used in combination.
-100012 BROKER_NOT_SUPPORT There is no such broker.
-20012 TRANSFER_TX_REPEAT The transfer request id is duplicate

说明

  • 限流路径也可能直接返回 RateLimitInterceptor 中硬编码的 -1003 字符串(措辞可能与枚举模板略有差异)。
  • WebSocket 应用错误使用 { "code", "msg", "id" },代码为类 HTTP 的 400 / 401 / 429(见 WS 文档),与 REST ApiErrorCode 整数命名空间不同。