HTX is going to change rate limit policy for part of REST API endpoints

Dear users,

Since the effective day of this notification, HTX will be changing rate limit policy for part of REST API endpoints.

Effective Date: at 14:00 on June 4, 2020 (GMT+8)

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

HTX
June 3, 2020

The maximum access rate during fixed interval –
- The overall access rate, from all API keys under same UID, to single endpoint, shouldn’t exceed the rate limit applied on that endpoint;
- The rate limit applied on various endpoint could be different, as listed below:

Category Endpoint URL Rate Limit
Wallet (Deposit and Withdraw) APIv2 - Query Deposit Address /v2/account/deposit/address 20times/2s
APIv2 - Query Withdraw Quota /v2/account/withdraw/quota 20times/2s
Create a Withdraw Request /v1/dw/withdraw/api/create 20times/2s
Cancel a Withdraw Request /v1/dw/withdraw-virtual/{withdraw-id}/cancel 20times/2s
Search for Existed Withdraws and Deposits /v1/query/deposit-withdraw 20times/2s
Account Get all Accounts of the Current User /v1/account/accounts 100times/2s
Get Account Balance of a Specific Account /v1/account/accounts/{account-id}/balance 100times/2s
Get Account History /v1/account/history 5times/2s
Transfer Fund Between Spot Account and Future Contract Account /v1/futures/transfer 2times/2s
Transfer Asset between Parent and Sub Account /v1/subuser/transfer 2times/2s
Get the Aggregated Balance of all Sub-users /v1/subuser/aggregate-balance 2times/2s
Get Account Balance of a Sub-User /v1/account/accounts/{sub-uid} 20times/2s
Lock/Unlock Sub User (by Parent User) /v2/sub-user/management 20times/2s
Trading Place a New Order /v1/order/orders/place 100times/2s
Place a Batch of Orders /v1/order/batch-orders 5times/2s
Submit Cancel for an Order /v1/order/orders/{order-id}/submitcancel 100times/2s
Submit Cancel for an Order (based on client order ID) /v1/order/orders/submitCancelClientOrder 100times/2s
Get All Open Orders /v1/order/openOrders 50times/2s
Submit Cancel for Multiple Orders by Criteria /v1/order/orders/batchCancelOpenOrders 50times/2s
Submit Cancel for Multiple Orders by IDs /v1/order/orders/batchcancel 50times/2s
Get the Order Detail of an Order /v1/order/orders/{order-id} 50times/2s
Get the Order Detail of an Order (based on client order ID) /v1/order/orders/getClientOrder 50times/2s
Get the Match Result of an Order /v1/order/orders/{order-id}/matchresults 50times/2s
Search Past Orders /v1/order/orders 50times/2s
Search Historical Orders within 48 Hours /v1/order/history 20times/2s
Search Match Results /v1/order/matchresults 20times/2s
     
Margin Loan (isolated margin mode) Transfer Asset from Spot Trading Account to Isolated Margin Account
Transfer Asset from Isolated Margin Account to Spot Trading Account
/v1/dw/transfer-in/margin/&&/v1/dw/transfer-out/margin 2times/2s
Get Loan Interest Rate and Quota /v1/margin/loan-info 20times/2s
Request a Margin Loan /v1/margin/orders 2times/2s
Repay Margin Loan /v1/margin/orders/{order-id}/repay 2times/2s
Search Past Margin Orders /v1/margin/loan-orders 100times/2s
Get the Balance of the Margin Loan Account /v1/margin/accounts/balance 100times/2s

- The rate limit applied on same endpoint could be different for various user level;
- The unexhausted rate limit during current interval won’t be appended to next interval.
- In most critical case, if the market activity exceeding Exchange system capacity, above rate limit could be possibly even tightened. API users are suggested to refer to http header values below to determine the actual rate limit.

Two new headers will be added into the response message from above REST endpoints –
1) X-HB-RateLimit-Requests-Remain
Remaining rate limit value during current interval;
2) X-HB-RateLimit-Requests-Expire
End time of current interval (unix time in millisecond).



If the access rate exceeded rate limit, following error message will be returned –

From API v2 endpoints –

{
"code": 1006,
"message": "exceeded rate limit"
}


From API v1 endpoints –

{
"status": "error",
"err-code": "rate-too-many-requests",
"err-msg": "exceeded rate limit",
"data": null
}




The rate limit change for other REST API endpoints and Websocket channels will be advised later via another notification.

Since the effective date of this notification, all new REST endpoints added in the future will be also applied with this new rate limit policy.

 

API users should evaluate the business impact by this adjustment introduced, further to make relevant change in client’s application.

All the changes will be updated on HTX API Docs on the effective date.