roq-huobi-futures#
Important
This gateway needs sponsorship to complete certain features.
Important
There are different network end-points required for linear and inverse perpetuals/futures. The API’s are different but sufficiently similar to allow this gateway to support both. The implication of this is that you will need more instances of this gateway if you need support for both product groups.
Links#
Purpose#
Maintain network connectivity with the Huobi Futures exchange
Route exchange updates to connected clients
Route client requests to the relevant exchange accounts
Stream all messages to an event-log
Overview#
Spot |
|
Futures |
✓ |
Options |
Reference Data |
✓ |
Market Status |
|
Top of Book |
✓ |
Market by Price (L2) |
✓ |
Market by Order (L3) |
|
Trade Summary |
✓ |
Statistics |
✓ |
Create |
✓ |
Modify |
|
Cancel |
✓ |
Cancel All |
✓ |
Auto Cancellation |
Positions |
✓ |
Funds |
✓ |
Data center located in Singapore (to be confirmed)
No test environment
Conda#
$ mamba install \
--channel https://roq-trading.com/conda/stable \
roq-huobi-futures
$ cp $CONDA_PREFIX/share/roq-huobi-futures/config.toml $CONFIG_FILE_PATH
# Then modify $CONFIG_FILE_PATH to match your specific configuration
$ roq-huobi-futures \
--name "huobi-futures" \
--config_file "$CONFIG_FILE_PATH" \
--client_listen_address "$UNIX_SOCKET_PATH" \
--service_listen_address "$TCP_LISTEN_PORT" \
--flagfile "$FLAG_FILE"
Config#
Flags#
$ roq-huobi-futures --help
|
Periodic refresh |
Environments#
COIN-M Futures#
# flagfile
--rest_uri=https://api.hbdm.com
--ws_market_uri=wss://api.hbdm.com/ws
--ws_order_uri=wss://api.hbdm.com/notification
--ws_index_uri=wss://api.hbdm.com/ws_index
Note
You may also specify --api=""
(the default).
COIN-M Swaps#
# flagfile
--api=swap
--rest_uri=https://api.hbdm.com
--ws_market_uri=wss://api.hbdm.com/swap-ws
--ws_order_uri=wss://api.hbdm.com/swap-notification
--ws_index_uri=wss://api.hbdm.com/ws_index
USDT-M#
# flagfile
--api=linear-swap
--rest_uri=https://api.hbdm.com
--ws_market_uri=wss://api.hbdm.com/linear-swap-ws
--ws_order_uri=wss://api.hbdm.com/linear-swap-notification
--ws_index_uri=wss://api.hbdm.com/ws_index
Market Data#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
DropCopy |
public.$symbol.contract_info |
Requires authentication. |
|
MarketData |
market.$symbol.bbo |
||
MarketData |
market.$symbol.depth.size_150.high_freq |
||
MarketData |
market.$symbol.trade.detail |
||
MarketData |
market.$symbol.detail, market.$symbol.estimated_rate.1min, market.$symbol.premium_index.1min, public.$symbol.funding_rate |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Rest |
/api/v1/contract_contract_info, /linear-swap-api/v1/swap_contract_info |
||
Statistics#
Type |
Comments |
---|---|
|
(detail) open |
|
(detail) high |
|
(detail) low |
|
(detail) close |
|
(detail) vol |
|
(funding_rate) funding_rate |
|
(funding_rate) estimated_rate |
|
(index) close |
Order Management#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Order Types#
TBD
Time in Force#
TBD
Position Effect#
TBD
Execution Instructions#
TBD
Account Management#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Streams#
Type |
Comments |
---|---|
REST |
Primary purpose |
Comments#
Symbols are only processed when
contract_status==1
The channels
premium_index
andestimated_rate
are not available when--api
isinverse
(or missing, the default).