NAV
english
shell

Broker

Query Universal Transfer History - broker user

request

get  /api/v3/broker/sub-account/universalTransfer

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:

API Permission: SPOT_TRANSFER_READ

Request Parameter:

Name Type Mandatory Description
fromAccount string no transfer from master account by default if fromAccount is not sent
toAccount string no transfer to master account by default if toAccount is not sent
fromAccountType string yes fromAccountType
toAccountType string yes toAccountType
startTime string no startTime(ms)
endTime string no endTime(ms)
page string no default 1
limit string no default 500, max 500
timestamp string yes timestamp
signature string yes sign

Response Parameter:

Name Type Description
tranId string transfer ID
fromAccount string fromAccount
toAccount string toAccount
clientTranId string clientTranId
asset string transfer asset
amount string transfer amount
fromAccountType string fromAccountType
toAccountType string toAccountType
fromsymbol string fromsymbol
tosymbol string tosymbol
status string transfer status
timestamp number transfer time

Query Sub-account Once Token

request

get  /api/v3/broker/sub-account/onceToken

response

{
    "onceToken": "lksod273hsbqi90ljiha"
}

Http Request:

API Permission: SPOT_TRANSFER_READ

Request Parameter:

Name Type Mandatory Description
subAccount string yes subAccount name
timestamp string yes timestamp
signature string yes signature

Response Parameter:

Name Type Description
onceToken string subAccount onceToken

Create a Sub-account

request

post  /api/v3/broker/sub-account/virtualSubAccount

response

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

Http Request:

Query Parameter:

Name Type Mandatory Description
timestamp string yes timestamp
signature string yes signature

Body Request Parameter:

Name Type Mandatory Description
subAccount string yes subAccount name
note string yes note
password string yes password(hexadecimal string encrypted by MD5)

Response Parameter:

Name Type Description
subAccount string subAccount name
note string note

Query Sub-account List

request

get  /api/v3/broker/sub-account/list

response

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

Http Request:

Request Parameter:

Name Type Mandatory Description
isFreeze string no subAccount stauts,true:normal false:freeze
subAccount string no subAccount name
page string no Default value: 1
limit string no Default value: 10, Max value: 200
timestamp string yes timestamp
signature string yes signature

Response Parameter:

Name Type Description
subAccount string subAccount name
isFreeze boolean isFreeze
timestamp number create time
note string note

Create an APIKey for a Sub-account

request

post  /api/v3/broker/sub-account/apiKey

response

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

Http Request:

Query Parameter:

Name Type Mandatory Description
timestamp string yes timestamp
signature string yes signature

Body Request Parameter:

Name Type Mandatory Description
subAccount string yes subAccount name
permissions string yes Permission
ip string no Link IP addresses, separate with commas if more than one. Support up to 4 addresses.
note string yes note

Response Parameter:

Name Type Description
subAccount string subAccount name
note string APIKey note
apikey string apikey
secretKey string secretKey
permissions string APIKey permissions
ip string APIKey IP address
createTime number createTime

Query the APIKey of a Sub-account

request

get  /api/v3/broker/sub-account/apiKey

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:

Request Parameter:

Name Type Mandatory Description
subAccount string yes subAccount name
timestamp string yes timestamp
signature string yes signature

Response Parameter:

Name Type Description
note string note
apikey string apikey
permissions string APIKey permissions
ip string APIKey iP address
creatTime number creatTime

Delete the APIKey of a Sub-account

request

delete  /api/v3/broker/sub-account/apiKey

response

{
    "subAccount": "mexc1"
}

Http Request:

Query Parameter:

Name Type Mandatory Description
timestamp string yes timestamp
signature string yes signature

Body Request Parameter:

Name Type Mandatory Description
subAccount string yes subAccount name
apiKey string yes apiKey

Response Parameter:

Name Type Description
subAccount string subAccount name

Generate Deposit Address of Sub-account

request

post  /api/v3/broker/capital/deposit/subAddress

response

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

Http Request:

API Permission: SPOT_DEPOSIT_WRITE

Query Parameter:

Name Type Mandatory Description
recvWindow string no recvWindow
timestamp string yes timestamp
signature string yes signature

Body Request Parameter:

Name Type Mandatory Description
coin string yes deposit coin
network string yes deposit network

Response Parameter:

Name Type Description
address string deposit address
coin string deposit coin
network string deposit network
memo string memo

Deposit Address of Sub-account

request

get  /api/v3/broker/capital/deposit/subAddress

response

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

Http Request:

API Permission: SPOT_DEPOSIT_READ

Request Parameter:

Name Type Mandatory Description
coin string yes deposit coin
recvWindow string no recvWindow
timestamp string yes timestamp
signature string yes signature

Response Parameter:

Name Type Description
address string deposit address
coin string deposit coin
network string deposit network
memo string memo

Query Sub-account Deposit History(For Master Account)

request

get  /api/v3/broker/capital/deposit/subHisrec/getall

response

[
    {
        "amount":"0.00999800",
        "coin":"PAXG",
        "network":"ETH",
        "status":,
        "address":"0x788cabe9236ce061e5a892e1a59395a81fc8d62c",
        "addressTag":"",
        "txId":"0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3",
        "unlockConfirm":"12", 
        "confirmTimes":"7"
    },
    {
        "amount":"0.50000000",
        "coin":"IOTA",
        "network":"IOTA",
        "status":1,
       "address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW",
        "addressTag":"",
        "txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999",
         "unlockConfirm":"12", 
         "confirmTimes":"7"
    }
]

Http Request:

API Permission: SPOT_DEPOSIT_READ

Request Parameter:

Name Type Mandatory Description
coin string no deposit coin
status string no deposit status
startTime string no default: 10 days ago from current time
endTime string no default:current time
limit string no default:20
page string no default:1
recvWindow string no recvWindow
timestamp string yes timestamp
signature string yes signature

Response Parameter:

Name Type Description
amount string deposit amount
coin string deposit coin
network string deposit network
status number deposit status
address string deposit address
addressTag string addressTag
txId string txid
unlockConfirm string unlockConfirm
confirmTimes string confirmTimes

Query Sub-account Deposit History

request

get  /api/v3/broker/capital/deposit/subHisrec

response

[
    {
        "amount":"0.00999800",
        "coin":"PAXG",
        "network":"ETH",
        "status":,
        "address":"0x788cabe9236ce061e5a892e1a59395a81fc8d62c",
        "addressTag":"",
        "txId":"0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3",
        "unlockConfirm":"12", 
        "confirmTimes":"7"
    },
    {
        "amount":"0.50000000",
        "coin":"IOTA",
        "network":"IOTA",
        "status":1,
"address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW",
        "addressTag":"",            "txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999",
         "unlockConfirm":"12",
         "confirmTimes":"7"
    }
]

Http Request:

Request Parameter:

Name Type Mandatory Description
coin string no deposit coin
status string no deposit status
startTime string no default: 10 days ago from current time
endTime string no default:current time
limit string no default:20
page string no default:1
recvWindow string no recvWindow
timestamp string yes timestamp
signature string yes signature

Response Parameter:

Name Type Description
amount string deposit amount
coin string deposit coin
network string deposit network
status number deposit status
address string deposit address
addressTag string addressTag
txId string txid
unlockConfirm string unlockConfirm
confirmTimes string confirmTimes

Withdraw

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

request

post  /api/v3/broker/capital/withdraw/apply

response

{
    "id":"7213fea8e94b4a5593d507237e5a555b"
}

Http Request:

API Permission: SPOT_TRANSFER_READ

Query Parameter:

Name Type Mandatory Description
recvWindow string no recvWindow
timestamp string yes timestamp
signature string yes signature

Body Request Parameter:

Name Type Mandatory Description
coin string yes withdraw coin
network string yes withdraw network
address string yes withdraw address
amount string yes amount
password string no password(hexadecimal string encrypted by MD5)
remark string no remark

Response Parameter:

Name Type Description
id string withdrawID

Universal Transfer

only support broker account

request

post  /api/v3/broker/sub-account/universalTransfer

response

{
    "tranId": "7213fea8e94b4a5593d507237e5a555b"
}

Http Request:

API Permission: SPOT_TRANSFER_READ

Query Parameter:

Name Type Mandatory Description
timestamp string yes timestamp
signature string yes signature

Body Request Parameter:

Name Type Mandatory Description
fromAccount string no Transfer from master account by default if fromAccount is not sent
toAccount string no Transfer to master account by default if toAccount is not sent
fromAccountType string yes fromAccountType
toAccountType string yes toAccountType
symbol string yes Only supported when fromAccountTypeid ISOLATED_MARGIN type,eg:ETHUSDT
asset string yes asset,eg:USDT
amount string yes amount,eg:1.82938475

Response Parameter:

Name Type Description
tranId string transfer ID

Enable Futures for Sub-account

request

post  /api/v3/broker/sub-account/futures

response

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

Http Request:

Query Parameter:

Name Type Mandatory Description
timestamp string yes timestamp
signature string yes signature

Body Request Parameter:

Name Type Mandatory Description
subAccount string yes subAccount name

Response Parameter:

Name Type Description
subAccount string subAccount name
isFuturesEnabled boolean isFuturesEnabled: true or false
timestamp string response time

Enable Margin for Sub-account

request

post  /api/v3/broker/sub-account/margin

response

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

Http Request:

Query Parameter:

Name Type Mandatory Description
subAccount string yes subAccount name
timestamp string yes timestamp
signature string yes signature

Response Parameter:

Name Type Description
subAccount string subAccount name
isMarginEnabled boolean isMarginEnabled: true or false
timestamp string response time

Public API Definitions

ENUM definitions

fromAccountType

toAccountType

Permission

deposit status