API Access Document of Huobi Coin-margined Futures and Coin-margined Swaps
HTX
ประเภทที่เกี่ยวข้อง: Others
2021-03-29 17:07
Dear Users,
Welcome users, who are dedicated to maker strategy and have created large trading volume, to participate in Huobi Coin-margined Futures long-term Market Maker project.If you have more than 3 BTC in your Huobi futures account, or more than 3 BTC in your Huobi Coin-margined Swaps account, please send the following information to dm_mm@huobi.com:
1. UID ( not in an inviter-and-invitee relationship)
2. Pictures/screenshots of maker trading volume records on other platform (e.g. the latest 30-days trading volume or the VIP level etc.. )
If you are VIP client from other platforms, you can enjoy same VIP level commission rates via our VIP Client Sharing Program. To get more details, click >>>
To be Huobi Futures VIP clients or Market Makers, you can enjoy:
1. Preferential fees with rebate maker fee
2. Faster API rate limit
3. Higher position limit
4. During the first calendar month, there is no requirements on the performance for new Market Makers
5. Being available to Contract sub-accounts without application ( Check more details about Contract sub-account>>>)
6. Colocation Service
E.g.:
A client applies to be a MM during March, he/she can enjoy the preferential MM fee structure, higher API rate limit and larger position limit without KPI requirements on the maker volume during the whole March, but from the month of April and onwards, the client's MM performance will be evaluated according to the maker volume.For details of performance evaluation criteria:
Huobi Coin-margined Futures Market Maker Evaluation Standard>>>
Huobi Coin-margined Swaps Market Maker Evaluation Standard>>>
Note:
1. The maker fee of -0.005% means it is a rebate bonus for MM.
2. Please refer to our official announcement if there are further adjustments on the fee structure or the valid period of it.
Thanks and respect.
Huobi Futures has established an official Huobi Futures Quantitative Trading group.
Welcome users to join us: please add our official WeChat account(dm18122,dm59488), leaving note like “add into Quantitative Trading group”. Thanks!
For more information about API, please check links below:
Huobi Futures official website address:
https://www.btcgateway.pro
https://futures.huobi.li
For oversea users: https://hbdm.com
API access address:
https://api.btcgateway.pro
For oversea users: https://api.hbdm.com
Huobi Futures Support Center- Huobi Futures:
https://huobiglobal.zendesk.comhttps://huobiglobal.zendesk.com/hc/en-us/categories/360000032161
History of Coin-margined Futures API Version: https://huobiglobal.zendesk.comhttps://huobiglobal.zendesk.com/hc/en-us/articles/360000263201
Coin-margined Futures API:
API document address: https://docs.huobigroup.com/docs/dm/v1/en/
Asynchronous Library address: https://github.com/hbdmapi/huobi_future_async
Python DEMO address: https://github.com/huobiapi/Futures-Python-demo
Java DEMO address: https://github.com/huobiapi/Futures-Java-demo
NodeJS DEMO address: https://github.com/huobiapi/Futures-Node.js-demo
PHP DEMO address: https://github.com/huobiapi/Futures-PHP-demo
C# DEMO address: https://github.com/huobiapi/Futures-CSharp-demo
GO DEMO address:https://github.com/huobiapi/Futures-Go-demo
Postman DEMO address:https://github.com/hbdmapi/huobi_futures_Postman
Coin-margined Swaps API:
API document address: https://docs.huobigroup.com/docs/coin_margined_swap/v1/en/
Python DEMO address: https://github.com/hbdmapi/hbdm_Python
Java DEMO address: https://github.com/hbdmapi/java_demo
Rust DEMO address: https://github.com/hbdmapi/hbdm_swap_Rust
C++ DEMO address: https://github.com/hbdmapi/huobi_swap_Cpp
Postman DEMO address:https://github.com/hbdmapi/huobi_futures_Postman
PS: swap api is similar to future api.
Complete API samples:
- Access Huobi Futures information: https://api.hbdm.com/api/v1/contract_contract_info
- Accesse Huobi Futures's higest and lowest price limits: https://api.hbdm.com/api/v1/contract_price_limit?symbol=BTC&contract_type=this_week
- Get the historical funding rate of Huobi Coin-margined Swaps: https://api.hbdm.com/swap-api/v1/swap_historical_funding_rate?contract_code=btc-usd&page_index=1&page_size=50
- Get the Kline Data of Huobi Coin-margined Swaps: https://api.hbdm.com/swap-ex/market/history/kline?contract_code=BTC-USD&period=1day&size=50
- Links above are only examples.
API Rate Limit Illustration for Coin-margined Futures:
Futures and Coin-margined Swaps are using seperate API rate limits.
Please note that, for both public interface and private interface, there are rate limits, more details are as below:
- Generally, the private interface rate limit of API key is at most 72 times every 3 seconds for each UID (Trade Interface: at most 36 times every 3 seconds. Read Interface: at most 36 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date). API Interface List
- For public interface used to get information of index, price limit, settlement, delivery, open positions and so on, the rate limit is 120 times every 3 seconds at most for each IP (this 120 times every 3 seconds public interface rate limit is shared by all the requests from that IP of non-marketing information, like above).
- In terms of public interface used to get candle chart data, the latest transaction record and information of aggregate market, order book and so on, the rate limit is as below:1. For restful interface: 800 times/second for one IP at most.2. For websocket: The rate limit for “req” request is 50 times at once. No limit for “sub” request as the data will be pushed by sever voluntarily.
- WebSocket, the private order push interface, requires API KEY Verification:Each UID can build at most create 30 WS connections for private order push at the same time. For each account, contracts of the same underlying coin only need to subscribe one WS order push, e.g. users only need to create one WS order push connection for BTC Contract which will automatically push orders of BTC weekly, BTC biweekly and BTC quarterly contracts. Please note that the rate limit of WS order push and RESTFUL private interface are separated from each other, with no relations.
- Both read and trade interfaces will return the ratelimit info.You can refer to the following fields of "header" from api response. E.g.,you will get the total Read ratelimit("ratelimit-limit") and the remaining Read ratelimit("ratelimit-remaining") when you query the order info(/api/v1/contract_order_info) , and you will get the total Trade ratelimit("ratelimit-limit") and the remaining Trade ratelimit("ratelimit-remaining") when you place an order(/api/v1/contract_order)). API Interface Listratelimit-limit: the upper limit of requests per time, unit: timeratelimit-interval: reset interval (reset the number of request), unit: msratelimit-remaining: the left available request number for this round, unit: timeratelimit-reset: upper limit of reset time used to reset request number, unit: msWhen API Limitation on Order Cancellation Ratio is triggered,the following string for "header" via api will also be returned:recovery-time: recovery timestamp, whose unit is millisecond, showing the end time of prohibition, or the access retrieval timestamp;if you are not in the prohibition period, the field is not included in returned header;
API Rate Limit Illustration for Coin-margined Swaps:
Future, Coin Margined Swap,Option Swap and USDT Margined Swap are using separate API rate limits.
Please note that, for both public interface and private interface, there are rate limits, more details are as below:
- Generally, the private interface rate limit of API key is at most 72 times every 3 seconds for each UID (Trade Interface: at most 36 times every 3 seconds. Read Interface: at most 36 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date). API Interface List
- For public interface used to get information of index, price limit, settlement, delivery, open positions and so on, the rate limit is 120 times every 3 second at most for each IP (this 120 times every 3 second public interface rate limit is shared by all the requests from that IP of non-marketing information, like above).
- For public interface 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:all products(futures, coin margined swap, usdt margined swap and option) 800 times/second for one IP at most (2) For websocket: The rate limit for “req” request is 50 times at once. No limit for “sub” request as the data will be pushed by sever voluntarily.
- WebSocket, the private order push interface, requires API KEY Verification:Each UID can build at most create 30 WS connections for private order push at the same time. For each account, contracts of the same underlying coin only need to subscribe one WS order push, e.g. users only need to create one WS order push connection for BTC Contract which will automatically push orders of BTC-USD contracts. Please note that the rate limit of WS order push and RESTFUL private interface are separated from each other, with no relations.
- Both read and trade interfaces will return the ratelimit info.You can refer to the following fields of "header" from api response. E.g.,you will get the total Read ratelimit("ratelimit-limit") and the remaining Read ratelimit("ratelimit-remaining") when you query the order info(/swap-api/v1/swap_account_info) , and you will get the total Trade ratelimit("ratelimit-limit") and the remaining Trade ratelimit("ratelimit-remaining") when you place an order(/swap-api/v1/swap_order)). API Interface List
- Will response following string for "header" via api ratelimit-limit: the upper limit of requests per time, unit: times ratelimit-interval: reset interval (reset the number of request), unit: ms ratelimit-remaining: the left available request number for this round, unit: times ratelimit-reset: upper limit of reset time used to reset request number, unit: ms When API Limitation on Order Cancellation Ratio is triggered,the following string for "header" via api will also be returned: recovery-time: recovery timestamp, whose unit is millisecond, showing the end time of prohibition, or the access retrieval timestamp; if you are not in the prohibition period, the field is not included in returned header;
Join in us
WeChat:dm20203
QQ Group:1083210627
Telegram:https://t.me/huobidmofficial
Huobi Futures Official Media Authenticator please click here>>>