Huobi Global is going to allow sub user to deposit via API

Dear API user,

Huobi Global is going to allow sub user to deposit via API. The relevant endpoint changes are as follows:

- The endpoint " GET /v2/account/deposit/address " will be accessible for sub users;
- A new endpoint " GET /v2/sub-user/deposit-address "  will be released, parent use could user this endpoint to query sub user's deposit address on corresponding chain, for a specific crypto currency;

- The endpoint " GET /v1/query/deposit-withdraw" will be accessible for sub users;

- A new endpoint " GET /v2/sub-user/query-deposit " will be released, parent user could use this endpoint to search sub user's deposit history;

 

Effective Date: April 17, 2020(GMT+8)

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

Huobi Global
April 17, 2020

The following are the changes in details:

APIv2 - Query Deposit Address

GET /v2/account/deposit/address

Allowed sub user’s access, no change on field list.

 

APIv2 - Query Deposit Address of Sub User (by Parent User) 

GET /v2/sub-user/deposit-address

API Key Permission:Read

Parent user could query sub user's deposit address on corresponding chain, for a specific crypto currency (except IOTA).

Request Parameters

Field NameData TypeMandatoryDescription
 subUid longTRUE Sub user UID
currencystring TRUECryptocurrency

Response Content

Field NameData TypeMandatoryDescription
codeintegerTRUEStatus code
messagestringFALSEError message (if any)
dataobjectTRUE 
{ currencystringTRUECryptocurrency
addressstring      TRUEDeposit address                                                            
addressTagstringTRUEDeposit address tag
chain } string   TRUEBlock chain name

 

Query Withdraw and Deposit History

GET /v1/query/deposit-withdraw

Allowed sub user to access, no change on field list.

 

Query Deposit History of Sub User (by Parent User)

GET /v2/sub-user/query-deposit

API Key Permission:Read

Parent user could query sub user's deposit history via this endpoint.

 

Request Parameters

Field NameData TypeMandatoryDescription
 subUid long TRUE Sub user UID
currencystringFALSECryptocurrency (default value: all)
startTimelongFALSEFarthest time (please refer to note 1 for valid range and default value)
endTimelongFALSENearest time (please refer to note 2 for valid range and default value)
sortstringFALSESorting order (enumerated values: asc, desc)
limitintFALSEMaximum number of items in one page (valid range:[1,500]; default value:100)
fromIdlongFALSEFirst record ID in this query (only valid for next page querying; please refer to note 3)

Note 1:

startTime valid range: [(endTime – 30days), endTime]

startTime default value: (endTime – 30days)

Note 2:

endTime valid range: Unlimited

endTime default value: current time

Note 3:

Only when the number of items within the query window (between “startTime” and ”endTime”) exceeded the page limitation (defined by “limit”), Huobi server returns “nextId”. Once received “nextId”, API user should –

1) Be aware of that, some items within the query window were not returned due to the page size limitation.
2) In order to get these items from Huobi server, adopt the “nextId” as “fromId” and submit another request, with other request parameters no change.
3) “nextId” and “fromId” are for recurring query purpose and the ID itself does not have any business implication.

 

Response

Field NameData TypeMandatoryDescription
codeintegerTRUEStatus code
messagestringFALSEError message (if any)
dataobjectTRUE 
{ id         integerTRUEDeposit id
currencystringTRUECryptocurrency
txHash string   TRUEThe on-chain transaction hash
chain    stringTRUEBlock chain name
amountfloat     TRUEThe number of crypto asset transferred
addressstringTRUEThe deposit source address
addressTagstring   FALSEThe user defined address tag
state    string   TRUEThe state of this transfer (see below for details) 
createTimeinteger   TRUEThe timestamp in milliseconds for the transfer creation
updateTime }integer   TRUEThe timestamp in milliseconds for the transfer's latest update
nextIdintegerFALSEFirst record ID in next page (only valid if exceeded page size)

List of possible deposit state

State                Description
unknown         On-chain transfer has not been received
confirming      On-chain transfer waits for first confirmation
confirmed       On-chain transfer confirmed for at least one block
safe                  Multiple on-chain confirmation happened
orphan            Confirmed but currently in an orphan branch

What are the Impacts on You, and What You Need to Do?

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