波场USDT钱包对接,TRC20_USDT对接接口API文档,波场钱包自动充提对接文档
生成账户
请求方式:GET
请求地址:{{domain}}/tron/Transaction/newAccount
Query参数名 | 类型 | 必需 | 描述 | 示例 e.g. |
---|---|---|---|---|
appSecret | string | 是 | 接入密钥 |
返回示例:
{
"status": 200,
"data": "TVf5yBDEiqVKVTitha3vLFDpXeYVMWPKtt",
"key": "",
"msg": "生成成功!"
}
参数名 | 描述 | 类型 |
---|---|---|
key | 私钥 | string |
data | 地址 | string |
查询余额
请求方式:GET
请求地址:{{domain}}/tron/Transaction/getBalance
Query参数名 | 类型 | 必需 | 描述 | 示例 e.g. |
---|---|---|---|---|
address | string | 是 | 账户地址 | TVf5yBDEiqVKVTitha3vLFDpXeYVMWPKtt |
返回示例:
{
"status": 200,
"data": "99",
"msg": "获取成功!"
}
参数名 | 描述 | 类型 |
---|---|---|
data | 余额 | string |
发送交易
请求方式:POST
请求地址:{{domain}}/tron/Transaction/doTrans
Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. |
---|---|---|---|---|
toAccount | string | 是 | 收款方账户 | |
fromAccount | string | 是 | 发起方账户 | |
key | string | 是 | 发起方私钥 | |
num | string | 是 | 交易数量 | |
appSecret | string | 是 | 接入方密钥 |
返回示例:
{
"status": 200,
"msg": "交易成功!",
"data": "7b1a7100dbd569e6ab796711c32e1a0169811c7736c6505a3bec299bc056d0ae"
}
参数名 | 描述 | 类型 |
---|---|---|
data | 交易哈希值 | string |
交易回调
请求方式:POST
请求地址:无
详细说明:
回调内容
返回示例:
{
"id": "12",
"app_id": "1",
"address": "TVf5yBDEiqVKVTitha3vLFDpXeYVMWPKtt",
"other_address": "TCWKGPJb43jYJchYC3S4WvdRFNYCF7KEMg",
"amount": "0.100000",
"status": "1",
"hash": "7b1a7100dbd569e6ab796711c32e1a0169811c7736c6505a3bec299bc056d0ae",
"coin": "trx",
"transaction_type": "2",
"block": "23255604",
"create_time": "1592994671",
"is_done": "0"
}
参数名 | 描述 | 类型 |
---|---|---|
address | string | |
other_address | 对方地址 | string |
amount | 数量 | string |
transaction_type | 1:转账,2:收款 | string |
block | 区块高度 | string |
交易状态
请求方式:GET
请求地址:{{domain}}/tron/Transaction/is_success
Query参数名 | 类型 | 必需 | 描述 | 示例 e.g. |
---|---|---|---|---|
txhash | string | 是 | 交易哈希值 |
返回示例:
{
"status": 200,
"data": 1,
"msg": "交易已完成!"
}
参数名 | 描述 | 类型 |
---|---|---|
data | 1完成 其他均为待确认 | number |
交易记录
请求方式:GET
请求地址:{{domain}}/tron/Transaction/getTransactionInner
Query参数名 | 类型 | 必需 | 描述 | 示例 e.g. |
---|---|---|---|---|
address | string | 是 | 账户地址 | |
limit | integer | 是 | 每页记录数量 | |
page | integer | 是 | 第几页 |
返回示例:
{
"status": 200,
"msg": "查询成功!",
"total": 89,
"data": [
{
"address": "TVf5yBDEiqVKVTitha3vLFDpXeYVMWPKtt",
"transaction_type": 2,
"other_address": "TCWKGPJb43jYJchYC3S4WvdRFNYCF7KEMg",
"amount": "0.10000000",
"status": 1,
"hash": "7b1a7100dbd569e6ab796711c32e1a0169811c7736c6505a3bec299bc056d0ae",
"block": 23255604,
"create_time": 1566230400,
"confirms": 589
}
]
}
参数名 | 描述 | 类型 |
---|---|---|
total | 总记录数 | number |
data.transaction_type | 1:转账,2:收款 | number |
data.other_address | 对方地址 | string |
data.amount | 数量 | string |
data.status | 交易状态 | number |
data.hash | hash值 | string |
data.block | 交易所在块数 | number |
data.create_time | 记录发生时间戳 | number |
data.confirms | 确认数 | number |