Broker 接口
查询母子万向划转历史-broker用户
请求示例
get /api/v3/broker/sub-account/universalTransfer?timestamp={{timestamp}}&signature={{signature}}
返回示例
[
{
"tranId":"11945860693",
"fromAccount":"master@test.com",
"toAccount":"subaccount1@test.com",
"clientTranId":"test",
"asset":"BTC",
"amount":"0.1",
"fromAccountType":"SPOT",
"toAccountType":"FUTURE",
"fromSymbol":"SPOT",
"toSymbol":"FUTURE",
"status":"SUCCESS",
"timestamp":1544433325000
},
{
"tranId":"11945860693",
"fromAccount":"master@test.com",
"toAccount":"subaccount1@test.com",
"clientTranId":"test",
"asset":"BTC",
"amount":"0.1",
"fromAccountType":"SPOT",
"toAccountType":"FUTURE",
"fromSymbol":"SPOT",
"toSymbol":"FUTURE",
"status":"SUCCESS",
"timestamp":1544433325000
}
]
HTTP请求:
- GET
/api/v3/broker/sub-account/universalTransfer
权限:现货划转读取
请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
fromAccount | string | no | 转出账户,不填默认母账户 |
toAccount | string | no | 转入账户,不填默认母账户 |
fromAccountType | string | yes | 划出账户类型 |
toAccountType | string | yes | 划入账户类型 |
startTime | string | no | 起始时间, 13位 |
endTime | string | no | 结束时间, 13位 |
page | string | no | 默认 1 |
limit | string | no | 默认 500, 最大 500 |
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
tranId | string | 划转ID |
fromAccount | string | 划出账户 |
toAccount | string | 划入账户 |
clientTranId | string | client ID |
asset | string | 币种 |
amount | string | 划转数量 |
fromAccountType | string | 转出账户 |
toAccountType | string | 划入账户 |
fromsymbol | string | 转出交易对 |
tosymbol | string | 转入交易对 |
status | string | 划转状态【成功,失败,划转中,中断】 |
timestamp | number | 划转时间 |
创建子账户
请求示例
post /api/v3/broker/sub-account/virtualSubAccount?timestamp={{timestamp}}&signature={{signature}}
返回示例
{
"code": "0",
"message": "",
"data": [{
"subAccount": "mexc1",
"note": "1",
"timestamp": "1597026383085"
}]
}
HTTP请求:
- POST
/api/v3/broker/sub-account/virtualSubAccount
Query参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
Body请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
subAccount | string | yes | 子账户名称 |
note | string | yes | 备注 |
password | string | no | 资金密码【资金密码要求:MD5加密的16进制字符串过来】 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
subAccount | string | 子账户名称 |
note | string | 备注 |
查看子账户列表
请求示例
get /api/v3/broker/sub-account/list?timestamp={{timestamp}}&signature={{signature}}
返回示例
{
"code": "0",
"message": "",
"data": [{
"subAccount": "mexc1",
"note": "1",
"timestamp": "1597026383085"
}, {
"subAccount": "mexc2",
"note": "2",
"timestamp": "1597026383787"
}]
}
HTTP请求:
- GET
/api/v3/broker/sub-account/list
请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
subAccount | string | no | 子账户名称 |
page | string | no | 分页参数:页码。默认: 1 |
limit | string | no | 分页参数:页容量。默认: 10, 最大: 200 |
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
subAccount | string | 子账户名称 |
timestamp | number | 创建时间 |
note | string | 备注 |
查看子账户状态
请求示例
get /api/v3/broker/sub-account/status?subAccount=subAccountName×tamp={{timestamp}}&signature={{signature}}
返回示例
{
"status": "1",
}
HTTP请求:
- GET
/api/v3/broker/sub-account/status
请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
subAccount | string | yes | 子账户名称 |
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
status | string | 1:正常;2:冻结 |
创建子账户的APIKey
请求示例
post /api/v3/broker/sub-account/apiKey?timestamp={{timestamp}}&signature={{signature}}
返回示例
{
"subAccount": "4Eb8rPPhpsAL",
"permissions": "SPOT_ACCOUNT_READ,SPOT_ACCOUNT_WRITE",
"note": "note2",
"apikey": "mx0npKfh57kEEVmyLa",
"secretKey": "51f38875ebe0475dad6236783a95cc19",
"createTime": 1646291300120
}
HTTP请求:
- POST
/api/v3/broker/sub-account/apiKey
Query参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
Body请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
subAccount | string | yes | 子账户名称 |
permissions | string | yes | 权限 |
ip | string | no | ip白名单,多个用逗号隔开,目前最大支持4个IP,可选 |
note | string | yes | 备注 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
subAccount | string | 子账户名称 |
note | string | APIKey的备注 |
apikey | string | API公钥 |
secretKey | string | API私钥 |
permissions | string | APIKey权限 |
ip | string | APIKey绑定的ip地址 |
createTime | number | 创建时间 |
查询子账户的APIKey
请求示例
get /api/v3/broker/sub-account/apiKey?timestamp={{timestamp}}&signature={{signature}}
返回示例
{
"subAccount": [{
"note": "v5",
"apiKey": "arg13sdfgs",
"permissions": "SPOT_ACCOUNT_READ,SPOT_ACCOUNT_WRITE",
"ip": "1.1.1.1,2.2.2.2",
"creatTime": 1597026383085
}, {
"note": "v5.1",
"apiKey": "arg13sdfgs",
"permissions": "read_only",
"ip": "1.1.1.1,2.2.2.2",
"creatTime": 1597026383085
}]
}
HTTP请求:
- GET
/api/v3/broker/sub-account/apiKey
请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
subAccount | string | yes | 子账户名称 |
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
note | string | 子账户备注 |
apikey | string | API公钥 |
permissions | string | APIKey权限 |
ip | string | APIKey绑定的ip地址 |
creatTime | number | 创建时间 |
删除子账户的APIKey
请求示例
delete /api/v3/broker/sub-account/apiKey?timestamp={{timestamp}}&signature={{signature}}
返回示例
{
"subAccount": "mexc1"
}
HTTP请求:
- DELETE
/api/v3/broker/sub-account/apiKey
Query参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
Body请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
subAccount | string | yes | 子账户名称 |
apiKey | string | yes | API公钥 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
subAccount | string | 子账户名称 |
生成子账户充值地址
请求示例
post /api/v3/broker/capital/deposit/subAddress?timestamp={{timestamp}}&signature={{signature}}
返回示例
{
"address": "TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV",
"coin": "USDT",
"network": "ERC-20",
"memo": ""
}
HTTP请求:
- POST
/api/v3/broker/capital/deposit/subAddress
权限:现货充值写
Query参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
recvWindow | string | no | 同步时间 |
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
Body请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
coin | string | yes | 充值币种 |
network | string | yes | 充值网络 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
address | string | 充值地址 |
coin | string | 充值币种 |
network | string | 充值网络 |
memo | string | memo值 |
获取子账户充值地址
请求示例
get /api/v3/broker/capital/deposit/subAddress?timestamp={{timestamp}}&signature={{signature}}
返回示例
[{
"address": "TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV",
"coin": "USDT",
"network": "ERC-20",
"memo": ""
}, {
"address": "TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV",
"coin": "USDT",
"network": "TRC-20",
"memo": ""
}]
HTTP请求:
- GET
/api/v3/broker/capital/deposit/subAddress
权限:现货充值读取
请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
coin | string | yes | 充值币种 |
recvWindow | string | no | 同步时间 |
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
address | string | 充值地址 |
coin | string | 充值币种 |
network | string | 充值网络 |
memo | string | memo值 |
获取子账户充值记录
请求示例
get /api/v3/broker/capital/deposit/subHisrec?timestamp={{timestamp}}&signature={{signature}}
返回示例
[
{
"amount":"0.00999800",
"coin":"PAXG",
"network":"ETH",
"status":,
"address":"0x788cabe9236ce061e5a892e1a595a81fc8d62c",
"addressTag":"",
"txId":"0xaad4654a3234aa6118af9b4b335f5aec360b2394721c019b5d1e75328b09f3",
"unlockConfirm":"12",
"confirmTimes":"7"
},
{
"amount":"0.50000000",
"coin":"IOTA",
"network":"IOTA",
"status":1,
"address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW",
"addressTag":"",
"txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVBQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999",
"unlockConfirm":"12",
"confirmTimes":"7"
}
]
HTTP请求:
- GET
/api/v3/broker/capital/deposit/subHisrec
请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
coin | string | no | 币种 |
status | string | no | 状态 |
startTime | string | no | 开始时间,如果没有传,默认查询10天 |
endTime | string | no | 结束时间 |
limit | string | no | 默认值20,目前无最大值限制 |
page | string | no | 默认值1 |
recvWindow | string | no | 同步时间 |
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
amount | string | 充值数量 |
coin | string | 充值币种 |
network | string | 充值网络 |
status | number | 状态 |
address | string | 充值地址 |
addressTag | string | 地址标签 |
txId | string | txid |
unlockConfirm | string | 解锁需要的网络确认次数 |
confirmTimes | string | 确认进度 |
获取所有子账户的所有充值记录(最近三天)
母账户查询三天(三天前从0点计时)内,子账户充值记录
请求示例
get /api/v3/broker/capital/deposit/subHisrec/getall?timestamp={{timestamp}}&signature={{signature}}
返回示例
[
{
"amount":"0.00999800",
"coin":"PAXG",
"network":"ETH",
"status":,
"address":"0x788cabe9236ce061e5a92e1a59395a81fc8d62c",
"txId":"0xaad4654a3234aa6118af9b4bf5ae81c360b2394721c019b5d1e75328b09f3",
"unlockConfirm":"12",
"confirmTimes":"7"
},
{
"amount":"0.50000000",
"coin":"IOTA",
"network":"IOTA",
"status":1,
"address":"SIZ9VLMHWATXKV99LHIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW",
"txId":"ESBFVQUTPIWQNJSPXFNHNYQNTGKRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999",
"unlockConfirm":"12",
"confirmTimes":"7"
}
]
HTTP请求:
- GET
/api/v3/broker/capital/deposit/subHisrec/getall
请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
coin | string | no | 币种 |
status | string | no | 状态 |
startTime | string | no | 开始时间 |
endTime | string | no | 结束时间 |
limit | string | no | 默认值100,最大1000 |
page | string | no | 默认值1 |
recvWindow | string | no | 同步时间 |
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
amount | string | 充值数量 |
coin | string | 充值币种 |
network | string | 充值网络 |
status | number | 状态 |
address | string | 充值地址 |
txId | string | txid |
unlockConfirm | string | 解锁需要的网络确认次数 |
confirmTimes | string | 确认进度 |
提币
【只支持子账号提币,不支持母提子】
请求示例
post /api/v3/broker/capital/withdraw/apply?timestamp={{timestamp}}&signature={{signature}}
返回示例
{
"id":"7213fea8e94b4a5593d507237e5a555b"
}
HTTP请求:
- POST
/api/v3/broker/capital/withdraw/apply
权限:现货划转读取
Query参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
recvWindow | string | no | 同步时间 |
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
Body请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
coin | string | yes | 提币币种 |
network | string | yes | 提币网络 |
address | string | yes | 提币地址 |
amount | string | yes | 数量 |
password | string | no | 资金密码【传此参数不交验提现地址簿】【资金密码要求:MD5加密的16进制字符串过来】 |
remark | string | no | 标记 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
id | string | 提币ID |
母子用户万向划转
只支持broker账户使用
请求示例
post /api/v3/broker/sub-account/universalTransfer?timestamp={{timestamp}}&signature={{signature}}
返回示例
{
"tranId": "7213fea8e94b4a5593d507237e5a555b"
}
HTTP请求:
- POST
/api/v3/broker/sub-account/universalTransfer
权限:现货划转读取
Query参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
Body请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
fromAccount | string | no | 母子账户,可填subAccout账户名,不填默认母账户 |
toAccount | string | no | 母子账户,可填subAccout账户名,不填默认母账户 |
fromAccountType | string | yes | 划出账户类型 |
toAccountType | string | yes | 划入账户类型 |
asset | string | yes | 划转资产,eg:USDT |
amount | string | yes | 划转数量,eg:1.82938475 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
tranId | string | 划转ID |
开通子账户的合约业务
请求示例
post /api/v3/broker/sub-account/futures?timestamp={{timestamp}}&signature={{signature}}
返回示例
{
"code": "0",
"message": "",
"data": [{
"subAccount": "mexc1",
"isFuturesEnabled": true,
"timestamp": "1597026383085"
}]
}
HTTP请求:
- POST
/api/v3/broker/sub-account/futures
Query参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
Body请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
subAccount | string | yes | 子账户名称 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
subAccount | string | 子账户名称 |
isFuturesEnabled | boolean | 开通合约业务,开通:true |
timestamp | string | 返回时间 |
获取broker返佣记录
请求示例
get /api/v3/broker/rebate/taxQuery?timestamp={{timestamp}}&signature={{signature}}
返回示例
{
"page": 1, //当前页
"totalRecords": 1, //总记录数
"totalPageNum": 1, //总页数
"data": [
{
"asset": "USDT", // 返佣资产
"amount": "0.00082273", // 返佣金额
"type": "spot", // 返佣类型
"uid": "221827", // 返佣用户UID
"time": "20221022" // 返佣时间
},
{
"asset": "USDT", // 返佣资产
"amount": "0.00082273", // 返佣金额
"type": "spot", // 返佣类型
"uid": "221827", // 返佣用户UID
"time": "20221022" // 返佣时间
}
]
}
HTTP请求:
- GET
/api/v3/broker/rebate/taxQuery
请求参数:
参数名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|
startTime | string | no | 开始时间 |
endTime | string | no | 结束时间 |
page | string | no | 默认值1 |
pageSize | string | no | 默认值10 |
recvWindow | string | no | 同步时间 |
timestamp | string | yes | 时间 |
signature | string | yes | 签名 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
asset | string | 返佣资产 |
amount | string | 返佣金额 |
uid | string | 返佣用户UID |
type | string | 返佣类型,现货/合约 |
time | string | 返佣时间 |