HTX is going to introduce new REST endpoints for parent user to query sub user’s list as well as sub user’s account IDs
- API Announcements
Dear API user,
Since the effective date of this notification, HTX will introduce following REST endpoints –
GET /v2/sub-user/user-list Query sub user’s list
GET /v2/sub-user/user-state Query sub user’s status
GET /v2/sub-user/account-list Query sub user’s account IDs
Effective Date: June 16, 2020 (GMT+8)
All the changes will be updated on https://huobiapi.github.io/docs/spot/v1/en/
HTX
June 16, 2020
GET /v2/sub-user/user-list
Get sub user’s list
API Key Permission: Read
Request Parameter
FIeld | Data Type | Mandatory | Description |
fromId | long | FALSE | First record ID in this query (only valid for next page querying) |
Response
Field | Data Type | Mandatory | Description | Possible Value |
code | integer | TRUE | Status code | |
message | string | FALSE | Error message (if any) | |
data | object | TRUE | In ascending order of uid, each response contains maximum 100 records. | |
{ uid | long | TRUE | Sub user’s UID | |
userState } | string | TRUE | Sub user’s status | lock,normal |
nextId | long | FALSE | First record ID in next page (only valid if exceeded page size) |
Sample Message
{
"code": 200,
"data": [
{
"uid": 63628520,
"userState": "normal"
},
{
"uid": 132208121,
"userState": "normal"
}
]
}
GET /v2/sub-user/user-state
Get sub user’s status
API Key Permissin: Read
Request Parameter
FIeld | Data Type | Mandatory | Description |
subUid | long | TRUE | Sub user’s UID |
Response
Field | Data Type | Mandatory | Description | Possible Value |
code | integer | TRUE | Status code | |
message | string | FALSE | Error message (if any) | |
data | object | TRUE | ||
{ uid | long | TRUE | Sub user’s UID | |
userState } | string | TRUE | Sub user’s status | lock,normal |
Sample Message
{
"code": 200,
"data": {
"uid": 132208121,
"userState": "normal"
}
}
GET /v2/sub-user/account-list
Get sub user’s account IDs
API Key Permission: Read
Request Parameter
Field |
Data Type |
Mandatory |
Description |
subUid |
long |
TRUE |
Sub user’s UID |
Response
Field | Data Type | Mandatory | Description | Possible Value |
code | integer | TRUE | Status code | |
message | string | TRUE | Error message (if any) | |
data | object | TRUE | ||
accountType | string | TRUE | Account type | spot,isolated-margin,cross-margin,futures,swap |
activation | string | TRUE | Account’s activation (set by parent user) | activated,deactivated |
transferrable | bool | FALSE | Transfer permission (only valid for accountType=spot) | true,false |
accountIds | object | FALSE | ||
{ accountId | string | TRUE | Account ID | |
subType | string | FALSE | Account sub type (only valid for isolated-margin account) | |
accountStatus } | string | TRUE | Account Status | normal,locked |
Uid } | long | TRUE | Sub user’s UID |
Sample Message
{
"code": 200,
"data": {
"uid": 132208121,
"list": [
{
"accountType": "isolated-margin",
"activation": "activated"
},
{
"accountType": "cross-margin",
"activation": "deactivated"
},
{
"accountType": "spot",
"activation": "activated",
"transferrable": true,
"accountIds": [
{
"accountId": 12255180,
"accountStatus": "normal"
}
]
}
]
}
}
API users should evaluate the business impact caused by the new endpoints introduced, further to make relevant change in client’s application, if needed.
All the changes will be updated on HTX API Docs on the effective date.