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 Name | Data Type | Mandatory | Description |
subUid | long | TRUE | Sub user UID |
currency | string | TRUE | Cryptocurrency |
Response Content
Field Name | Data Type | Mandatory | Description |
code | integer | TRUE | Status code |
message | string | FALSE | Error message (if any) |
data | object | TRUE | |
{ currency | string | TRUE | Cryptocurrency |
address | string | TRUE | Deposit address |
addressTag | string | TRUE | Deposit address tag |
chain } | string | TRUE | Block 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 Name | Data Type | Mandatory | Description |
subUid | long | TRUE | Sub user UID |
currency | string | FALSE | Cryptocurrency (default value: all) |
startTime | long | FALSE | Farthest time (please refer to note 1 for valid range and default value) |
endTime | long | FALSE | Nearest time (please refer to note 2 for valid range and default value) |
sort | string | FALSE | Sorting order (enumerated values: asc, desc) |
limit | int | FALSE | Maximum number of items in one page (valid range:[1,500]; default value:100) |
fromId | long | FALSE | First 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 Name | Data Type | Mandatory | Description |
code | integer | TRUE | Status code |
message | string | FALSE | Error message (if any) |
data | object | TRUE | |
{ id | integer | TRUE | Deposit id |
currency | string | TRUE | Cryptocurrency |
txHash | string | TRUE | The on-chain transaction hash |
chain | string | TRUE | Block chain name |
amount | float | TRUE | The number of crypto asset transferred |
address | string | TRUE | The deposit source address |
addressTag | string | FALSE | The user defined address tag |
state | string | TRUE | The state of this transfer (see below for details) |
createTime | integer | TRUE | The timestamp in milliseconds for the transfer creation |
updateTime } | integer | TRUE | The timestamp in milliseconds for the transfer's latest update |
nextId | integer | FALSE | First 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.
Comments
0 comments
Article is closed for comments.