User API (v2)
Query API Key Permissions (USER_DATA)
Query basic information and permissions for the current API Key.
GET /api/v2/user/query-api
Weight: 1
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| recvWindow | LONG | NO | Request validity window in milliseconds. Defaults to 5000 if omitted |
| timestamp | LONG | YES | Request timestamp in milliseconds |
| signature | STRING | YES | HMAC SHA256 signature calculated with the API Secret |
Response
On success, the endpoint returns:
json
{
"code": 200,
"msg": "success",
"data": {
"userId": "10001",
"masterUserId": "90001",
"leadTradingApiKey": false,
"permissions": {
"spot": {
"accessMode": "READ_ONLY"
},
"contract": {
"accessMode": "NONE"
}
}
}
}| Name | Type | Description |
|---|---|---|
| userId | STRING | UID of the user associated with the current API Key |
| masterUserId | STRING | User ID of the parent user |
| leadTradingApiKey | BOOLEAN | Whether this is a copy-trading leader API Key: true for yes, false for no |
| permissions | OBJECT | Spot and contract account permissions |
| permissions.spot | OBJECT | Spot account permission |
| permissions.contract | OBJECT | Contract account permission |
| permissions.*.accessMode | STRING | Account domain access mode: NONE (no access), READ_ONLY (read-only), or READ_WRITE (read-write) |