接口错误代码参考(v1)

当接口返回的 HTTP 状态码(Status Code)不等于 200 时,表示请求出现异常。以下为常见错误示例及说明。

401 Unauthorized

通常因用户身份验证、地区风险或账户状态问题触发。

常见错误响应示例

  1. 未认证
{
    "message": "Unauthenticated"
}
  1. 未经授权的操作
{
    "message": "Unauthorized action."
}
  1. 访问限制(地区风险、IP限制等)
{
    "message": "Access restricted."
}
  1. 服务器IP不允许
{
    "message": "Access restricted."
}
  1. 账户停用
{
    "message": "Your account has been suspended. For further assistance, please contact support at [email protected]."
}

403 Forbidden

因合规、风控或用户状态限制导致的操作禁止。

常见错误响应示例

  1. IP被禁止(来自高风险国家)
{
    "message": "IP is not allowed"
}
  1. 合规限制(无法为高风险国家用户提供服务)
{
    "message": "Unfortunately due to strict regulatory and compliance reasons, we are not able to onboard users coming from high-risk countries."
}
  1. 用户处于RFI或EDD状态
    以下接口会检查用户是否处于RFI或EDD状态
    • /app/offramp/generatewallet
    • /app/withdraw
    • /app/depositaccount
    • /app/orderByFiat
    • /app/offrampsell
    • /depositaccount/local

EDD要求响应

{
    "message": "To complete the verification process for your account, please check your email. We have sent instructions on how to finalize the verification of your latest deposits/withdrawals.",
    "errors": {
        "edd": "EDD Required"
    },
    "error_code": "EDD_REQUIRED"
}

RFI要求响应

{
    "message": "To complete the verification process for your account, please check your email. We have sent instructions on how to finalize the verification of your latest deposits/withdrawals.",
    "errors": {
        "rfi": "RFI required"
    },
    "error_code": "RFI_REQUIRED",
    "data": {
        "url": "{RFI url}"
    }
}

404 Not Found

{
    "message": "Not Found – The specified endpoint could not be found."
}

405 Method Not Allowed

{
    "message": "The GET method is not supported for this route. Supported methods: POST."
}

422 Unprocessable Entity

此状态码通常用于表示请求参数校验失败或业务操作失败。

常见错误响应示例

  1. 参数校验失败(如缺少必填字段)
{
    "message": "The given data was invalid.",
    "errors": {
        "uid": ["The uid field is required."],
        "params": ["The params field is required."],
        "params.currency": ["The params.currency field is required."],
        "params.account_name": ["Account Name is missing."],
        "params.bank_country": ["Bank country code is missing."]
    }
}
  1. 交易对参数缺失
{
    "message": "The given data was invalid.",
    "errors": {
        "pair": ["The pair field is required."]
    }
}
  1. 用户IP来自高风险国家
{
    "message": "The given data was invalid.",
    "errors": {
        "country": ["User's IP address is a high-risk country."]
    }
}
  1. 业务操作失败(如银行账户删除失败)
{
    "message": "fail",
    "errors": {
        "errors": ["The new bank account delete failed."]
    }
}

429 Too Many Requests

{
    "message": "API rate limit exceeded."
}

503 Service Unavailable

{
    "message": "Account suspended - Please contact [email protected]",
    "errors": {
        "uid": "123456"
    }
}

建议处理方式

  • 401 错误:请检查用户身份认证、所在地区是否被允许,以及账户是否处于活跃状态。
  • 403 错误:请确认用户是否通过合规检查(RFI/EDD),IP地址是否来自允许的国家/地区。
  • 422 错误:请根据 errors 对象中返回的具体错误信息,修正请求参数或确认业务状态。
  • 429 错误:请降低请求频率,遵守API速率限制。
  • 其他错误:根据具体错误信息进行相应处理,必要时联系技术支持。