User
快速入门¶
Restful API¶
公共接口¶
用户接口¶
订单接口¶
WebSocket API¶
WebSocket接入说明¶
公共接口¶
用户接口¶
订单接口¶
1. 查询账户余额¶
HTTP请求
GET: /api/spot/v1/user/account
请求参数
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| 无 |
返回数据
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| code | number | Y | 错误码 |
| msg | string | Y | 说明 |
| data | object[] | N | 账户信息 |
data
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| coin | string | Y | 币种 |
| balance | number | Y | 余额 |
| balanceLocked | number | Y | 锁定余额 |
2. 发起提币¶
HTTP请求
POST: /api/spot/v1/withdraw
API说明
- API只能提币到免认证地址/账户上,通过 WEB/APP 可以设置免认证地址。
- 关于标签: 某些币种如XRP充币时同时需要一个充值地址和标签(又名memo/payment_id),标签是一种保证您的充币地址唯一性的数字串,与充币地址成对出现并一一对应。请您务必遵守正确的充值步骤,在提币时输入完整信息,否则将面临丢失币的风险!
- 必须是已添加提币权限的apikey才可提币, 否则会拒绝申请。
请求参数(限速规则: 10次/1s(IP)
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| coin | string | Y | 币种 可以通过查询币种数据接口获取 |
| network | string | Y | 币种网络 |
| address | string | Y | 提币地址 |
| amount | decimal | Y | 提币数量 提币数量(提币数量-手续费=到账数量) 数量精度可以通过查询币种数据接口获取 |
| memo | string | N | memo |
{
"coin": "TRX",
"network": "Tron (TRC-20)",
"address": "TJmW5D1p1LnMdTMmxuY1VELHht7v5HV7rU",
"amount": 20.00
}
返回数据
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| code | number | Y | 错误码 |
| msg | string | Y | 说明 |
| data | object | N | 提现单Id |
data
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| withdrawId | string | Y | 提现单Id |
{
"code": "0",
"msg": "result.success",
"data": "1909879608889339906",
"success": true
}
3. 撤销提币¶
HTTP请求
POST: /api/spot/v1/withdraw/cancel
API说明
- 有人工审核且处于初审状态,可以撤销提币。一旦初审通过或上链,则无法撤销提币
请求参数(限速规则: 10次/1s(IP)
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| withdrawId | string | Y | 提现单id |
{
"withdrawId": "1909879608889339906"
}
返回数据
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| code | number | Y | 错误码 |
| msg | string | Y | 说明 |
| data | object | N | 空 |
{
"code": "0",
"msg": "result.success",
"data": null,
"success": true
}
4. 发起站内转账¶
HTTP请求
POST: /api/spot/v1/inside_transfer
API说明
- 必须是已添加提币权限的apikey才可发起站内转账, 否则会拒绝申请。
请求参数(限速规则: 10次/1s(IP)
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| outBizId | string(32) | N | 外部服务商业务Id, 作为幂等参数使用 |
| coin | string | Y | 币种 可以通过 查询币种数据 接口获取 |
| amount | decimal | Y | 转账数量 数量精度可以通过 查询币种数据 接口获取 |
| toType | string | Y | 转账方式uid 基于用户Id phone 基于用户电话号码 email 基于用户邮箱 |
| toUid | int64 | N | 用户Id |
| toPhoneCountryCode | string | N | 电话号码区号 |
| toPhoneNumber | string | N | 电话号码 |
| toEmail | string | N | 邮箱地址 |
| remark | string(256) | N | 备注 |
{
"coin": "USDT",
"amount": 10,
"toType": "uid",
"toUid": 681979174
}
返回数据
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| code | number | Y | 错误码 |
| msg | string | Y | 说明 |
| data | string | Y | 转账单Id |
data
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| insideTransferId | string | Y | 转账单Id |
{
"code": "0",
"msg": "result.success",
"data": "1909921053381820417",
"success": true
}
5. 撤销站内转账¶
HTTP请求
POST: /api/spot/v1/inside_transfer/cancel
API说明
- 有人工审核且处于初审状态,可以撤销站内转账。一旦初审通过,则无法撤销站内转账
请求参数(限速规则: 10次/1s(IP)
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| insideTransferId | string | Y | 转账单id 可以通过查询站内转账记录接口获取 |
{
"insideTransferId": "1909921053381820417"
}
返回数据
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| code | number | Y | 错误码 |
| msg | string | Y | 说明 |
| data | object | N | 转账单Id |
data
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| insideTransferId | string | Y | 转账单Id |
{
"code": "0",
"msg": "result.success",
"data": null,
"success": true
}
6. 获取提币记录(提币+站内转账)¶
HTTP请求
POST: /api/spot/v1/withdraw_transfer/page
请求参数(限速规则: 10次/1s(IP)
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| id | string | N | 提现单Id/转账单Id |
| outBizId | string | N | 外部服务商业务Id |
| coin | string | N | 币种 可以通过 查询币种数据 接口获取 |
| transactionHash | string | N | 区块转账哈希记录 只在 type 为 withdraw 时有效 |
| type | string | N | 提现类型withdraw 提币inside_transfer_out 站内转账 |
| startTime | int64 | N | 查询开始时间,Unix timestamp,如:1597026383085 |
| endTime | int64 | N | 查询结束时间,Unix timestamp,如:1597026683085 |
| remark | string | N | 备注(精准查询) |
| limit | int32 | N | 返回结果集数量,默认 100,最大 100,不填则返回 100 条 |
{
"id": "1909877667383767042",
"limit": 10
}
返回数据
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| code | number | Y | 错误码 |
| msg | string | Y | 说明 |
| data | object | N | 提币/转账记录 |
data
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| id | string | Y | 提现单 ID、转账单 ID |
| outBizId | string | N | 外部服务商业务Id |
| coin | string | Y | 币种名称 |
| network | string | Y | 网络 |
| amount | decimal | Y | 实际到账金额 |
| feeCoin | string | Y | 手续费币种 |
| fee | decimal | Y | 手续费 |
| type | string | Y | 提现类型withdraw:链上提币inside_transfer_out:内部转账 |
| toAddress | string | N | 收款地址(仅 type=withdraw 时返回) |
| transactionHash | string | N | 交易 ID(仅 type=withdraw 时返回) |
| toType | string | N | 转账方式 uid:基于用户 ID phone:基于用户电话号码 email:基于用户邮箱 |
| toUid | int64 | N | 收款用户 ID(仅 toType=uid 时返回) |
| toPhoneCountryCode | string | N | 电话区号(仅 toType=phone 时返回) |
| toPhoneNumber | string | N | 电话号码(仅 toType=phone 时返回) |
| toEmail | string | N | 邮箱(仅 toType=email 时返回) |
| remark | string | N | 备注 |
| status | string | Y | 提币状态 verification:待用户安全认证(需要到客户端提币列表做安全认证) pending:处理中 cancelled:已撤销 success:成功fail:失败 |
| ctime | int64 | Y | 创建时间,Unix timestamp,例如:1597026383085 |
{
"code": "0",
"msg": "result.success",
"data": [
{
"id": "1909877667383767042",
"outBizId": "123456789",
"type": "withdraw",
"coin": "TRX",
"amount": "19.00000000000000000000",
"status": "pending",
"ctime": 1744185294000,
"network": "Tron (TRC-20)",
"address": "TJmW5D1p1LnMdTMmxuY1VELHht7v5HV7rU",
"transactionHash": null,
"feeCoin": null,
"fee": null,
"memo": null,
"toType": null,
"toUid": null,
"toPhoneCountryCode": null,
"toPhoneNumber": null,
"toEmail": null,
"remark": null
}
],
"success": true
}
7. 划转¶
HTTP请求
POST: /api/spot/v1/funds_transfer
API说明
- 个人账号,不同的资金类型转账,比如现货资金转合约资金
请求参数(限速规则: 10次/1s(IP)
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| type | string | Y | 转账类型spot_futures 现货转合约futures_spot 合约转现货 |
| coin | String | Y | 币种 可以通过查询币种数据接口获取 |
| amount | decimal | Y | 转账数量 数量精度可以通过查询币种数据接口获取 |
{
"type": "spot_futures",
"coin": "USDT",
"amount": 100.01
}
返回数据
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| code | number | Y | 错误码 |
| msg | string | Y | 说明 |
| data | string | Y | 划转产生的划转ID |
data
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| transferId | string | Y | 划转产生的划转ID |
{
"code": "0",
"msg": "result.success",
"data": "1909902180506972162",
"success": true
}
8. 获取充币记录(充币+站内转账)¶
HTTP请求
POST: /api/spot/v1/deposit/page
API说明
请求参数(限速规则: 10次/1s(IP)
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| id | string | N | 充值单Id/转账单Id |
| coin | string | N | 币种 可以通过查询币种数据接口获取 |
| type | string | N | 充值类型deposit 链上充币inside_transfer_in 站内充值 |
| transactionHash | string | N | 交易hash(deposit 链上充币时生效) |
| startTime | int64 | N | 查询开始时间,Unix timestamp, 如:1597026383085 |
| endTime | int64 | N | 查询结束时间,Unix timestamp, 如:1597026683085 |
| limit | int32 | N | 返回的结果集数量,最大为100,不填默认返回100条 |
{
"type" : "",
"transactionHash" : "",
"coin" : "USDT",
"limit" : 10
}
返回数据
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| code | number | Y | 错误码 |
| msg | string | Y | 说明 |
| data | object | N | 提币/转账记录 |
data
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| id | string | Y | 充值单Id/转账单Id |
| transactionHash | string | N | 交易 ID(仅 type=deposit 时返回) |
| coin | string | Y | 币种名称 |
| network | string | N | 网络 (仅 type=deposit 时返回) |
| type | string | Y | 充值类型deposit 链上充币inside_transfer_in 站内充值 |
| fromAddress | string | Y | 转出方地址deposit 链上转出方地址inside_transfer_in 站内转出方用户id |
| toAddress | string | Y | 转入放地址deposit 链上转入方地址inside_transfer_in 站内转入方用户id |
| amount | decimal | Y | 实际到账金额 |
| status | string | Y | 提币状态 pending:处理中 cancelled:已取消 success:成功fail:失败 |
| ctime | int64 | Y | 创建时间,Unix timestamp,例如:1597026383085 |
{
"code": "0",
"msg": "Success",
"data": [
{
"id": 1909903708907155457,
"transactionHash": null,
"coin": "USDT",
"network": null,
"type": "inside_transfer_in",
"fromAddress": "989541187",
"toAddress": "681979174",
"amount": "10.00000000",
"status": "pending",
"ctime": 1744191503000
},
{
"id": 1909903532977074178,
"transactionHash": null,
"coin": "USDT",
"network": null,
"type": "inside_transfer_in",
"fromAddress": "989541187",
"toAddress": "681979174",
"amount": "10.00000000",
"status": "pending",
"ctime": 1744191461000
},
{
"id": 487067,
"transactionHash": "d829e32be84907a4dfb5bee5dcdaee6b637be287f8db52817860e7169003b92d",
"coin": "USDT",
"network": "Tron (TRC-20)",
"type": "deposit",
"fromAddress": "TB73gtW1hsTxxA9XUYKLSJKTSHw6Jk53eH",
"toAddress": "TPKhSAEy84qvpomF5wF7h5ih1WmbmupXor",
"amount": "1000.00000000",
"status": "success",
"ctime": 1742892246000
}
],
"success": true
}
9. 获取充币地址¶
HTTP请求
POST: /api/spot/v1/deposit/address
请求参数(限速规则: 10次/1s(IP)
| 参数名 | 参数类型 | 必须 | 备注 |
|---|---|---|---|
| coin | string | Y | 币种 可以通过查询币种数据接口获取 |
| network | string | Y | 网络 可以通过查询币种数据接口获取 |
{
"coin": "USDT",
"network": "Tron (TRC-20)"
}
返回数据
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| code | number | Y | 错误码 |
| msg | string | Y | 说明 |
| data | object[] | N | 充币地址列表(可能会存在多个地址,每个地址都可以使用) |
data
| 名称 | 类型 | 必须 | 备注 |
|---|---|---|---|
| coin | string | Y | 币种 |
| network | string | Y | 网络 |
| address | string | Y | 充币地址 |
| memo | string | N | 充值 memo |
{
"code": "0",
"msg": "result.success",
"data": [
{
"coin": "USDT",
"network": "Tron (TRC-20)",
"address": "TPKhSAEy84qvpomF5wF7h5ih1WmbmupXor",
"memo": null
}
],
"success": true
}