Skip to main content

Broker Endpoints

Query Universal Transfer History - broker user

request

get  /api/v3/broker/sub-account/universalTransfer?timestamp={{timestamp}}&signature={{signature}}

response

[
{
"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 Request:

  • GET /api/v3/broker/sub-account/universalTransfer

API Permission: SPOT_TRANSFER_READ

Request Parameter:

NameTypeMandatoryDescription
fromAccountstringnotransfer from master account by default if fromAccount is not sent
toAccountstringnotransfer to master account by default if toAccount is not sent
fromAccountTypestringyesfromAccountType
toAccountTypestringyestoAccountType
startTimestringnostartTime(ms)
endTimestringnoendTime(ms)
pagestringnodefault 1
limitstringnodefault 500, max 500
timestampstringyestimestamp
signaturestringyessign

Response Parameter:

NameTypeDescription
tranIdstringtransfer ID
fromAccountstringfromAccount
toAccountstringtoAccount
clientTranIdstringclientTranId
assetstringtransfer asset
amountstringtransfer amount
fromAccountTypestringfromAccountType
toAccountTypestringtoAccountType
fromsymbolstringfromsymbol
tosymbolstringtosymbol
statusstringtransfer status
timestampnumbertransfer time

Create a Sub-account

request

post  /api/v3/broker/sub-account/virtualSubAccount?timestamp={{timestamp}}&signature={{signature}}

response

{
"code": "0",
"message": "",
"data": [{
"subAccount": "mexc1",
"note": "1",
"timestamp": "1597026383085"
}]
}

Http Request:

  • POST /api/v3/broker/sub-account/virtualSubAccount

Query Parameter:

NameTypeMandatoryDescription
timestampstringyestimestamp
signaturestringyessignature

Body Request Parameter:

NameTypeMandatoryDescription
subAccountstringyessubAccount name
notestringyesnote
passwordstringnopassword(hexadecimal string encrypted by MD5)

Response Parameter:

NameTypeDescription
subAccountstringsubAccount name
notestringnote

Query Sub-account List

request

get  /api/v3/broker/sub-account/list?timestamp={{timestamp}}&signature={{signature}}

response

{
"code": "0",
"message": "",
"data": [{
"subAccount": "mexc1",
"note": "1",
"timestamp": "1597026383085"
}, {
"subAccount": "mexc2",
"note": "2",
"timestamp": "1597026383787"
}]
}

Http Request:

  • GET /api/v3/broker/sub-account/list

Request Parameter:

NameTypeMandatoryDescription
subAccountstringnosubAccount name
pagestringnoDefault value: 1
limitstringnoDefault value: 10, Max value: 200
timestampstringyestimestamp
signaturestringyessignature

Response Parameter:

NameTypeDescription
subAccountstringsubAccount name
timestampnumbercreate time
notestringnote

Query Sub-account Status

request


get /api/v3/broker/sub-account/status?subAccount=subAccountName&timestamp={{timestamp}}&signature={{signature}}

response

{
"status": "1",
}

Http Request:

  • GET /api/v3/broker/sub-account/status

Request Parameter:

NameTypeMandatoryDescription
subAccountstringyessubAccount name
timestampstringyestimestamp
signaturestringyessignature

Response Parameter:

NameTypeDescription
statusstring1:normal;2:freeze

Create an APIKey for a Sub-account

request

post  /api/v3/broker/sub-account/apiKey?timestamp={{timestamp}}&signature={{signature}}

response

{
"subAccount": "4Eb8rPPhpsAL",
"permissions": "SPOT_ACCOUNT_READ,SPOT_ACCOUNT_WRITE",
"note": "note2",
"apikey": "mx0npKfh57kEEVmyLa",
"secretKey": "51f38875ebe0475dad6236783a95cc19",
"createTime": 1646291300120
}

Http Request:

  • POST /api/v3/broker/sub-account/apiKey

Query Parameter:

NameTypeMandatoryDescription
timestampstringyestimestamp
signaturestringyessignature

Body Request Parameter:

NameTypeMandatoryDescription
subAccountstringyessubAccount name
permissionsstringyesPermission
ipstringnoLink IP addresses, separate with commas if more than one. Support up to 4 addresses.
notestringyesnote

Response Parameter:

NameTypeDescription
subAccountstringsubAccount name
notestringAPIKey note
apikeystringapikey
secretKeystringsecretKey
permissionsstringAPIKey permissions
ipstringAPIKey IP address
createTimenumbercreateTime

Query the APIKey of a Sub-account

request

get  /api/v3/broker/sub-account/apiKey?timestamp={{timestamp}}&signature={{signature}}

response

{
"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 Request:

  • GET /api/v3/broker/sub-account/apiKey

Request Parameter:

NameTypeMandatoryDescription
subAccountstringyessubAccount name
timestampstringyestimestamp
signaturestringyessignature

Response Parameter:

NameTypeDescription
notestringnote
apikeystringapikey
permissionsstringAPIKey permissions
ipstringAPIKey iP address
creatTimenumbercreatTime

Delete the APIKey of a Sub-account

request

delete  /api/v3/broker/sub-account/apiKey?timestamp={{timestamp}}&signature={{signature}}

response

{
"subAccount": "mexc1"
}

Http Request:

  • DELETE /api/v3/broker/sub-account/apiKey

Query Parameter:

NameTypeMandatoryDescription
timestampstringyestimestamp
signaturestringyessignature

Body Request Parameter:

NameTypeMandatoryDescription
subAccountstringyessubAccount name
apiKeystringyesapiKey

Response Parameter:

NameTypeDescription
subAccountstringsubAccount name

Generate Deposit Address of Sub-account

request

post  /api/v3/broker/capital/deposit/subAddress?timestamp={{timestamp}}&signature={{signature}}

response

{
"address": "TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV",
"coin": "USDT",
"network": "ERC-20",
"memo": ""
}

Http Request:

  • POST /api/v3/broker/capital/deposit/subAddress

API Permission: SPOT_DEPOSIT_WRITE

Query Parameter:

NameTypeMandatoryDescription
recvWindowstringnorecvWindow
timestampstringyestimestamp
signaturestringyessignature

Body Request Parameter:

NameTypeMandatoryDescription
coinstringyesdeposit coin
networkstringyesdeposit network

Response Parameter:

NameTypeDescription
addressstringdeposit address
coinstringdeposit coin
networkstringdeposit network
memostringmemo

Deposit Address of Sub-account

request

get  /api/v3/broker/capital/deposit/subAddress?timestamp={{timestamp}}&signature={{signature}}

response

[{
"address": "TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV",
"coin": "USDT",
"network": "ERC-20",
"memo": ""
}, {
"address": "TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV",
"coin": "USDT",
"network": "TRC-20",
"memo": ""
}]

Http Request:

  • GET /api/v3/broker/capital/deposit/subAddress

API Permission: SPOT_DEPOSIT_READ

Request Parameter:

NameTypeMandatoryDescription
coinstringyesdeposit coin
recvWindowstringnorecvWindow
timestampstringyestimestamp
signaturestringyessignature

Response Parameter:

NameTypeDescription
addressstringdeposit address
coinstringdeposit coin
networkstringdeposit network
memostringmemo

Query Sub-account Deposit History

request

get  /api/v3/broker/capital/deposit/subHisrec?timestamp={{timestamp}}&signature={{signature}}

response

[
{
"amount":"0.00999800",
"coin":"PAXG",
"network":"ETH",
"status":,
"address":"0x788cabe9236ce061e5a892e1a59395a81f8d62c",
"addressTag":"",
"txId":"0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e8b09f3",
"unlockConfirm":"12",
"confirmTimes":"7"
},
{
"amount":"0.50000000",
"coin":"IOTA",
"network":"IOTA",
"status":1,
"address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW",
"addressTag":"",
"txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCWPTVG9BGXNVNKTLEJGESAVXIKIZ9999",
"unlockConfirm":"12",
"confirmTimes":"7"
}
]

Http Request:

  • GET /api/v3/broker/capital/deposit/subHisrec

Request Parameter:

NameTypeMandatoryDescription
coinstringnodeposit coin
statusstringnodeposit status
startTimestringnodefault: 10 days ago from current time
endTimestringnodefault:current time
limitstringnodefault:20
pagestringnodefault:1
recvWindowstringnorecvWindow
timestampstringyestimestamp
signaturestringyessignature

Response Parameter:

NameTypeDescription
amountstringdeposit amount
coinstringdeposit coin
networkstringdeposit network
statusnumberdeposit status
addressstringdeposit address
addressTagstringaddressTag
txIdstringtxid
unlockConfirmstringunlockConfirm
confirmTimesstringconfirmTimes

Query All Sub-account Deposit History(Recent 3 days)

master account query all Sub-account deposit history

request

get  /api/v3/broker/capital/deposit/subHisrec/getall?timestamp={{timestamp}}&signature={{signature}}

response

[
{
"amount":"0.00999800",
"coin":"PAXG",
"network":"ETH",
"status":,
"address":"0x788cabe9236ce061e5a892e1a59395a81f8d62c",
"txId":"0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e8b09f3",
"unlockConfirm":"12",
"confirmTimes":"7"
},
{
"amount":"0.50000000",
"coin":"IOTA",
"network":"IOTA",
"status":1,
"address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW",
"txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCWPTVG9BGXNVNKTLEJGESAVXIKIZ9999",
"unlockConfirm":"12",
"confirmTimes":"7"
}
]

Http Request:

  • GET /api/v3/broker/capital/deposit/subHisrec/getall

Request Parameter:

NameTypeMandatoryDescription
coinstringnodeposit coin
statusstringnodeposit status
startTimestringnostartTime
endTimestringnoendTime
limitstringnodefault:100
pagestringnodefault:1
recvWindowstringnorecvWindow
timestampstringyestimestamp
signaturestringyessignature

Response Parameter:

NameTypeDescription
amountstringdeposit amount
coinstringdeposit coin
networkstringdeposit network
statusnumberdeposit status
addressstringdeposit address
txIdstringtxid
unlockConfirmstringunlockConfirm
confirmTimesstringconfirmTimes

Withdraw

[only support withdraw for sub-account,not master account]

request

post  /api/v3/broker/capital/withdraw/apply?timestamp={{timestamp}}&signature={{signature}}

response

{
"id":"7213fea8e94b4a5593d507237e5a555b"
}

Http Request:

  • POST /api/v3/broker/capital/withdraw/apply

API Permission: SPOT_TRANSFER_READ

Query Parameter:

NameTypeMandatoryDescription
recvWindowstringnorecvWindow
timestampstringyestimestamp
signaturestringyessignature

Body Request Parameter:

NameTypeMandatoryDescription
coinstringyeswithdraw coin
networkstringyeswithdraw network
addressstringyeswithdraw address
amountstringyesamount
passwordstringnopassword(hexadecimal string encrypted by MD5)
remarkstringnoremark

Response Parameter:

NameTypeDescription
idstringwithdrawID

Universal Transfer

only support broker account

request

post  /api/v3/broker/sub-account/universalTransfer?timestamp={{timestamp}}&signature={{signature}}

response

{
"tranId": "7213fea8e94b4a5593d507237e5a555b"
}

Http Request:

  • POST /api/v3/broker/sub-account/universalTransfer

API Permission: SPOT_TRANSFER_READ

Query Parameter:

NameTypeMandatoryDescription
timestampstringyestimestamp
signaturestringyessignature

Body Request Parameter:

NameTypeMandatoryDescription
fromAccountstringnoTransfer from master account by default if fromAccount is not sent
toAccountstringnoTransfer to master account by default if toAccount is not sent
fromAccountTypestringyesfromAccountType
toAccountTypestringyestoAccountType
assetstringyesasset,eg:USDT
amountstringyesamount,eg:1.82938475

Response Parameter:

NameTypeDescription
tranIdstringtransfer ID

Enable Futures for Sub-account

request

post  /api/v3/broker/sub-account/futures?timestamp={{timestamp}}&signature={{signature}}

response

{
"code": "0",
"message": "",
"data": [{
"subAccount": "mexc1",
"isFuturesEnabled": true,
"timestamp": "1597026383085"
}]
}

Http Request:

  • POST /api/v3/broker/sub-account/futures

Query Parameter:

NameTypeMandatoryDescription
timestampstringyestimestamp
signaturestringyessignature

Body Request Parameter:

NameTypeMandatoryDescription
subAccountstringyessubAccount name

Response Parameter:

NameTypeDescription
subAccountstringsubAccount name
isFuturesEnabledbooleanisFuturesEnabled: true or false
timestampstringresponse time

Get Broker Rebate History Records

request


get /api/v3/broker/rebate/taxQuery?timestamp={{timestamp}}&signature={{signature}}

response

{
"page": 1,
"totalRecords": 1,
"totalPageNum": 1,
"data": [
{
"asset": "USDT",
"amount": "0.00082273",
"type": "spot",
"uid": "221827",
"time": "20221022"
},
{
"asset": "USDT",
"amount": "0.00082273",
"type": "spot",
"uid": "221827",
"time": "20221022"
}
]
}

HTTP REQUEST:

  • GET /api/v3/broker/rebate/taxQuery

request:

NameTypeMandatoryDescription
startTimestringnostartTime
endTimestringnoendTime
pagestringnodefault 1
pageSizestringnodefault 10
recvWindowstringnorecvWindow
timestampstringyestimestamp
signaturestringyessignature

response:

NameTypeDescription
assetstringrebate asset
amountstringrebate amount
uidstringrebate user uid
typestringrebate type
timestringrebate time