API Documentary of USDⓈ-Margined Contracts
- Hướng dẫn Hợp đồng Tương lai USDT-M
Dear Valued Users，
Welcome to join our market maker program for HTX USDT-margined contracts. If you have more than 100,000 USDT in your cross margin account of USDT-margined contract, please provide the following information to [email protected]:
- HTX UID (UID without rebate relationship)
- Screenshots that certify the maker trading volume of other platforms. (e.g. trading volume in 30 days, VIP level)
Note: Point card deduction, VIP preferential policy, promotions relating trading volume, or any form of rebate activities are not supported in this market maker program.
We sincerely welcome all users with large maker trading volumes to join our USDT-margined contracts market maker program on a long-term basis.
If you are a VIP from other platforms, you can enjoy HTX's preferential fee rate through our VIP Sharing Program. For details, please click here.
The market makers of HTX USDT-margined contracts can enjoy the following rights and benefits:
- Preferential fee rate; negative maker fee rate
- Higher API rate limit
- Larger position limit
- First natural month’s evaluation waiver for new market makers
- Contract sub-accounts available without application (Check more details about contract sub-accounts>>>)
- Colocation service
For details of Taker Fee， please check：HTX’s PRO Sharing Program
Client A succeeds to be a MM in March, he/she can enjoy the MM's preferential fee rates, higher API rate limit, and larger position limit without KPI requirements on the maker volume during the whole month. From April onwards, the client's MM performance will be evaluated according to the maker trading volume. For detailed evaluation criteria, please refer to:
**For more information about API, please check the links below:
HTX Futures official website address:
API access address:
For Chinese users: https://api.btcgateway.pro
HTX Futures Support Center- HTX Futures:
HTX USDT-margined Contracts API：
API document address: https://docs.huobigroup.com/docs/usdt_swap/v1/en
Java DEMO address: https://github.com/hbdmapi/huobi_usdt_swap_Java
Python DEMO address: https://github.com/hbdmapi/hbdm_Python
Postman DEMO address: https://github.com/hbdmapi/huobi_futures_Postman
CSharp DEMO address: https://github.com/hbdmapi/huobi_futures_CSharp
Golang DEMO address: https://github.com/hbdmapi/huobi_futures_Golang
C++ DEMO address: https://github.com/hbdmapi/huobi_futures_Cpp
PS: API usage of USDT-margined contracts is similar to that of coin-margined swaps and coin-margined futures, and for other programming languages' DEMO, please refer to coin-margined futures.
Complete API samples:
- Query the Last Trade of a Contract (USDT-margined contract)：https://api.hbdm.com/linear-swap-ex/market/trade?contract_code=BTC-USDTG
- Get Marker Depth of USDT-margined Contracts：https://api.hbdm.com/linear-swap-ex/market/depth?contract_code=BTC-USDT&type=step5
API Rate Limit Illustration for USDT-margined Contracts:
The API rate limits of Coin-margined futures, coin-margined swaps, and USDT-margined contracts are separate. USDT-margined contracts include USDT-margined futures and USDT-margined swaps, therefore, both of them share the mutual API rate limit.
Please note that there are rate limits for both public interfaces and private interfaces. Details are as below:
- For common users, the rate limit of private interfaces requiring API key is at most 144 times every 3 seconds for each UID (Trading Interface: at most 72 times every 3 seconds. Query Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the requests from all the private interfaces of USDT-margined contracts for a certain user). API Interface List
- For non-marketing public interfaces used to get information such as index, price limit, settlement, delivery, open positions, etc, the rate limit is at most 240 times every 3 seconds for each IP (this rate limit is shared by all the requests from non-marketing public interfaces of USDT-margined contracts for a certain IP, like above).
For the public interfaces to get market data such as Get Kline data, Get Market Data Overview, Get Contract Information, Get Market In-depth Data, Get Premium Index Kline, Get Real-time Forecast Capital Rate Kline, Get Basis Data, Get the Last Trade of a Contract and so on：
（1）For restful interfaces, the rate limit for all derivatives (coin-margined futures, coin-margined swaps, and USDT-margined contracts) is at most 800 times/1s for an IP.
（2）For websocket interfaces, the rate limit for a“req” request is 50 times at once. No limit for a“sub” request as the data will be pushed by the Sever voluntarily.
- For private order push interfaces of WebSocket (requiring API Key Verification):
Each UID can make at most 30 WS connections for private order push at the same time. For each account, contracts of the same underlying asset (including contracts with different expiration dates) only need to subscribe a WS order push, e.g. users only need to create one WS order push connection for BTC/USDT Contracts. Please note that the rate limit of WS order push is separated from that of RESTFUL private interfaces, without mutual effect.
- There will have rate limit info in the "header" returned by the trading and query interfaces. E.g., you will get the total query rate limit via the "ratelimit-limit" and get the remaining query rate limit via the "ratelimit-remaining" in the "header" returned by the "Query the Order Info" interface (URL: /linear-swap-api/v1/swap_account_info). And you will get the total trading rate limit via the "ratelimit-limit") and get the remaining trading rate limit via the "ratelimit-remaining" in the "header" returned by the "Place an Order" interface (URL: /linear-swap-api/v1/swap_order). API Interface List
- Rate limit info will be added to the returned data of all API interfaces.
The following fields will be included in the "header" returned by the "response" via all API interfaces:
ratelimit-limit: the max request times for a round, unit: times
ratelimit-interval: reset interval (to reset the request times), unit: ms
ratelimit-remaining: the remaining available request times for this round, unit: times
ratelimit-reset: reset time (when the max request times are reached), unit: ms
When API limitation on Order Cancellation Ratio is triggered, the following field will be included in the "header" returned by the "response" via API interfaces:
"recovery-time": recovery timestamp (unit: ms) meaning the end time of the prohibition, or the access retrieval timestamp;
If you are not in the prohibition period, the field is not included in the returned "header";
- The rate limit for a "Place a Trigger Order" request, a "Cancel a Trigger Order" request, and a "Cance all Trigger Orders" request is 5 times/1s for a UID.