Skip to content

Latest commit

 

History

History
99 lines (88 loc) · 4.21 KB

取消提币接口.md

File metadata and controls

99 lines (88 loc) · 4.21 KB

[POST] /withdraw/cancel.php

请求:

参数 类型 说明
appid string 用户身份ID, 一个唯一的随机字符串
cryptype int 0=data未加密(json格式),1=data已加密(加密字符串),当前只支持0
api_key string api访问公钥
token string md5("{api_key}_{secret_key}_{userid}_{timestamp}")
timestamp int 时间戳,单位秒
subuserid string 接口调用端的子账号(等于调用方的用户id)
chain string 主链
coin string 币名
withdrawid int 订单ID

字段值参考上表:

{
    "appid": "", 
    "cryptype": 0,  
    "data": {
        "auth": {
            "token": "", 
            "timestamp": 1574151978,
            "api_key": ""  
        },
        "subuserid": "1", 
        "chain": "eth",     
        "coin": "usdt",     
        "withdrawid": 1
    }
}

正常响应:

{
    "cryptype": 0,  
    "data": {
        "eno":  0,  
        "emsg": "", 
    }
}

错误响应:(emsg中带有括号表示可能变动部分)

eno emsg description
1 system error (number) 系统内部错误
2 invalid json request 不是有效的json请求
3 lack field: appid 缺少appid字段
4 lack field: cryptype 缺少cryptype字段
5 lack field: data 缺少data字段
6 cryptype is invalid 非法的cryptype字段
7 (error message) 请求内容和币种信息不匹配
8 (error message) 请求数量不合法
10 frequency byond limit 频率超过限制
13 user order id already exist 用户侧ID已存在
1001 lack field: auth 缺少auth字段
3001 lack field: token 缺少token字段
4001 lack field: pubkey 缺少pubkey字段
5001 lack field: timestamp 缺少timestamp字段
6001 appid not found appid未找到
7001 timestamp difference over 30 seconds 请求时间间隔超过30秒
8001 appid is invalid 非法的appid
9001 (name) not in ip whitelist 不受信任的IP地址
10001 token verifiy failed token验证失败
11001 appid is disabled appid未启用
12001 withdraw sign verifiy failed 签名验证失败
1002 (name) only support 'list' rule 规则定义错误
2002 (name) not string 类型不是一个字符串
3002 invalid string 非法的字符串
4002 function no implement 功能未实现
5002 function not support 功能不支持
6002 (name) not a list 不是列表类型
7002 (name) cannot be empty 字段不能为空
8002 (name) not supported coin 不支持的币种
9002 (name) not supported chain 不支持的链
11002 invalid withdraw addr (number) 非法的提币地址
12002 (name) not positive float 不是一个正浮点数
16002 (name) not float 不是一个浮点型

字段值参考上表

{
    "cryptype": 0,  
    "data" : {
        "eno": 1001,          
        "emsg": "错误信息"
    }
}