Skip to content

Latest commit

 

History

History
135 lines (122 loc) · 6.46 KB

获取充值记录.md

File metadata and controls

135 lines (122 loc) · 6.46 KB

[POST] /deposit/history.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 币名 (空字符串默认不做筛选)
fromid int 从哪个充值序号开始,值大于等于1,查询结果包含fromId对应的充值记录
limit int 最多查询多少条记录,包含fromid这条记录

字段值参考上表:

{
    "appid": "", 
    "cryptype": 0, 
    "data": {
        "auth": {
            "token": "", 
            "timestamp": 1574151978   
        },
        "subuserid": "", 
        "chain": "eth",
        "coin": "usdt",
        "fromid": 0,     
        "limit": 100     
    }
}

正常响应:

参数 类型 说明
cryptype int 0=data未加密(json格式),1=data已加密(加密字符串),当前只支持0
eno int 0是正常,非0对应下面错误返回列表中的错误码
emsg string eno非0时对应下面错误返回列表中的错误描述
id int 内部充值序号
subuserid string 接口调用端的子账号(等于调用方的用户id)
chain string 哪条主链上充值进来的
coin string 币名
from_addr string 订单发送地址
addr string 订单接收地址
txid string 交易ID
amount string 充值数量
balance string 充值后余额
api_key string api访问公钥
height string 交易高度
status int 状态值(0: 无效状态,1: 正常入帐, 2: 待入帐)
status_desc string 状态值描述
time string 订单生成时间

字段值参考上表:

{
    "cryptype": 0,  
    "data": {
        "eno":  0,  
        "emsg": "", 
        "data": [
            {
                "id": 7,
                "subuserid": "1",
                "chain": "trx",
                "coin": "trx",
                "from_addr": "",
                "addr": "TNMRetGmiBUyNyXBzDDRcmE9LbqS9P7Aje",
                "txid": "b38a1afd54da6b04289833dd163328586c4cc111b78a450d70b5620eda4cbcd3",
                "amount": "10000",
                "balance": "10000",
                "api_key": "",
                "height": "",
                "status": 1,
                "status_desc": "状态描述",
                "time": "2020-02-06 18:14:18"         
            }
        ]
    }
}

错误响应:(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字段
9 (invalid fromid) 不是有效的记录ID
10 frequency byond limit 频率超过限制
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未启用
1002 (name) only support 'list' rule 规则定义错误
2002 (name) not 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 不支持的链
10002 (name) not positive int 不是一个正整数

字段值参考上表:

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