Huobi Global Will Introduce The API Key Management Endpoints

huobi.proIssued on 2020/06/05 16:06    Content based on the original text . Link

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

Parameter Required Data Type  Description Default   Value Range
 otpToken  true  string Google 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  true long  Sub user UID  NA  1
 note  true string  API key note  NA  Up to 20 characters, free text    
 permission   true string  API key permissions 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 string  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

Parameter Required Data Type Description Default Value Range
uid true long parent user uid , sub user uid NA  
accessKey false string The 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  int API key expire in (days)   
 status  true  string API 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   Required Data Type Description Default  Value Range
 subUid  true  long sub user uid  NA   
 accessKey  true  string Access key  NA   
 note  false  string API key note  NA   Up to 255 characters    
 permission  false  string API 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  string 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  
 permission  true  string  API key permission   
 ipAddresses }  true  string API key IP addresses  

 

Sub user API key deletion

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

Request Parameters

Parameter  Required Data Type  Description Default Value Range
subUid true long sub user uid NA   
accessKey true string Access key for sub user API key NA   

Response Content

Parameter  Required Data Type   Description Value Range
code true int Status code  
message false string Error 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.