Huobi Global is going to introduce new REST endpoints for parent user to query sub user’s list as well as sub user’s account IDs

Dear API user,

Since the effective date of this notification, Huobi Global 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/

Huobi Global
June 16, 2020

 

GET /v2/sub-user/user-list

Get sub user’s list

API Key Permission: Read

Request Parameter

FIeldData TypeMandatoryDescription
fromIdlongFALSEFirst record ID in this query (only valid for next page querying)

Response

FieldData TypeMandatoryDescriptionPossible Value
codeintegerTRUEStatus code 
messagestringFALSEError message (if any) 
dataobjectTRUEIn ascending order of uid, each response contains maximum 100 records. 
{ uidlongTRUESub user’s UID 
userState }stringTRUESub user’s statuslock,normal
nextIdlongFALSEFirst 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

FIeldData TypeMandatoryDescription
subUidlongTRUESub user’s UID

Response

FieldData TypeMandatoryDescriptionPossible Value
codeintegerTRUEStatus code 
messagestringFALSEError message (if any) 
dataobjectTRUE  
{ uidlongTRUESub user’s UID 
userState }stringTRUESub user’s statuslock,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

FieldData TypeMandatoryDescriptionPossible Value
codeintegerTRUEStatus code 
messagestringTRUEError message (if any) 
dataobjectTRUE  
accountTypestringTRUEAccount typespot,isolated-margin,cross-margin,futures,swap
activationstringTRUEAccount’s activation (set by parent user)activated,deactivated
transferrableboolFALSETransfer permission (only valid for accountType=spot)true,false
accountIdsobjectFALSE  
{ accountIdstringTRUEAccount ID 
subTypestringFALSEAccount sub type (only valid for isolated-margin account) 
accountStatus }stringTRUEAccount Statusnormal,locked
Uid }longTRUESub 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 Huobi API Docs on the effective date.