Huobi Global Will Introduce The API Key Management Endpoints

Huobi Global API will introduce the following API key management endpoints:

-Sub user API key creation "POST /v2/sub-user/api-key-generation";
-Parent user and sub user API key information query "GET /v2/user/api-key";
-Sub user API key modification "POST /v2/sub-user/api-key-modification";
-Sub user API key deletion "POST /v2/ sub-user/api-key-deletion".

Effective date: June 5, 2020 (GMT+8)

All the changes will be updated on https://huobiapi.github.io/docs/spot/v1/en/

Huobi Global
June 5, 2020

Sub user API key creation

POST /v2/sub-user/api-key-generation

Request Parameters

ParameterRequiredData Type DescriptionDefault  Value Range
 otpToken true stringGoogle verification code of the parent user, the parent user must be bound to Google for verification on the web NA 6 characters, pure numbers  
 subUid truelong Sub user UID NA 1
 note truestring API key note NA Up to 20 characters, free text    
 permission  truestring API key permissionsNA Valid value: readOnly, trade; multiple inputs are allowed, separated by comma, i.e. readOnly, trade; readOnly is required permission for any API key, while trade permission is optional.
ipAddresses  falsestring IP address bind to the API key NA At most 10 IPv4/IPv6 host address(es) and/or IPv4 network address(es) can bind with one API key, separated by comma. For example: 202.106.196.115, 202.106.96.0/24. Without any IP address binding, the API key will expire in 90 days.

Response Content

Parameter Required Data Type   Description Value Range
 code true int Status code 
 message false string Error message (if any)  
 data true object  
 { note true string API key note 
 accessKey true string access key 
 secretKey  true string secret key  
 permission true string API key  permission  
ipAddresses } true string API key IP addresses  

 

API key query

GET /v2/user/api-key

Request Parameters

ParameterRequiredData TypeDescriptionDefaultValue Range
uidtruelongparent user uid , sub user uidNA 
accessKeyfalsestringThe access key of the API key, if not specified, it will return all API keys belong to the UID.NA 

Response Content

Parameter        Required Data Type   Description Value Range
 code true int Status code 
 message false string Error message (if any)  
 data true object  
[{ accessKey true string access key 
  note true string API key note 
 permission true string API key permission  
 ipAddresses  true string API key IP addresses 
 validDays true intAPI key expire in (days)  
 status true stringAPI key status  
 createTime true long API key creation time 
 updateTime }] true long API key last modified time 

 

Sub user API key modification

POST /v2/sub-user/api-key-modification

Request Parameters

Parameter  RequiredData TypeDescriptionDefault Value Range
 subUid true longsub user uid NA  
 accessKey true stringAccess key NA  
 note false stringAPI key note NA  Up to 255 characters    
 permission false stringAPI key permission NA Valid value: readOnly, trade;
multiple inputs are allowed, separated by comma, i.e. readOnly, trade;
readOnly is required permission for any API key, while trade permission is optional.
 ipAddresses false stringIP address bind to the API key NA At most 10 IPv4/IPv6 host address(es) and/or IPv4 network address(es) can bind with one API key, separated by comma. For example: 202.106.196.115, 202.106.96.0/24. Without any IP address binding, the API key will expire in 90 days.

Response Content

Parameter  RequiredData TypeDescriptionValue Range
 code true int Status code 
 message false string Error message (if any)  
 data true object  
 { note true string API key note 
 permission true string API key permission  
 ipAddresses } true stringAPI key IP addresses 

 

Sub user API key deletion

POST /v2/sub-user/api-key-deletion

Request Parameters

Parameter RequiredData Type DescriptionDefaultValue Range
subUidtruelongsub user uidNA  
accessKeytruestringAccess key for sub user API keyNA  

Response Content

Parameter RequiredData Type  DescriptionValue Range
codetrueintStatus code 
messagefalsestringError message (if any)) 

 

API users should evaluate the business impact caused by the features 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.