roq-huobi#
Important
This gateway needs sponsorship to complete certain features.
Links#
Purpose#
Maintain network connectivity with the Huobi 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
$ cp $CONDA_PREFIX/share/roq-huobi/config.toml $CONFIG_FILE_PATH
# Then modify $CONFIG_FILE_PATH to match your specific configuration
$ roq-huobi \
--name "huobi" \
--config_file "$CONFIG_FILE_PATH" \
--client_listen_address "$UNIX_SOCKET_PATH" \
--service_listen_address "$TCP_LISTEN_PORT" \
--flagfile "$FLAG_FILE"
Config#
Flags#
$ roq-huobi --help
--exchange
(huobi
)exchange identifier (string)
--request_limit
(10
)request limit per interval
--request_limit_interval
(1s
)request limit monitor interval
--encode_buffer_size
(1048576
)encode buffer size
--decode_buffer_size
(10485760
)decode buffer size
--mbp_allow_price_inversion
(false
)allow price inversion?
--rest_uri
(https://api.huobi.pro
)REST end-point (URI)
--rest_proxy
proxy end-point (URI)
--rest_ping_freq
(5s
)ping frequency
--rest_ping_path
(/v1/common/timestamp
)URI path used for REST connection keep-alive messages
--rest_request_timeout
(30s
)request: timeout
--rest_listen_key_refresh
(1800s
)listen key refresh period
--rest_order_recv_window
(5000ms
)receive window
--rest_cancel_on_disconnect
(false
)cancel orders on disconnect? (bool)
--ws_market_uri
(wss://api.huobi.pro/ws
)WebSocket end-point (URI) for market data (excl. incremental MBP)
--ws_mbp_uri
(wss://api.huobi.pro/feed
)WebSocket end-point (URI) for MBP
--ws_order_uri
(wss://api.huobi.pro/ws/v2
)WebSocket end-point (URI) for account and order
--ws_ping_freq
(5s
)ping frequency
--ws_max_subscriptions_per_stream
(128
)max symbols per connection (count)
--ws_request_delay
(100ms
)request delay
--ws_mbp_request_max_retries
(3
)request max retries
Environments#
$ $CONDA_PREFIX/share/roq-huobi/flags
# flagfile for the roq-huobi gateway
--rest_uri=https://api.huobi.pro
--ws_market_uri=wss://api.huobi.pro/ws
--ws_mbp_uri=wss://api.huobi.pro/feed
--ws_order_uri=wss://api.huobi.pro/ws/v2
Market Data#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
MarketData |
market.$symbol.bbo |
||
MBPFeed |
market.$symbol.mbp.20 |
||
MarketData |
market.$symbol.trade.detail |
||
MarketData |
market.$symbol.ticker, market.$symbol.detail |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Rest |
/v1/common/currencys, /v1/common/symbols |
||
MarketData |
/v1/common/symbols |
||
Statistics#
Type |
Comments |
---|---|
|
(detail) |
|
(detail) |
|
(detail) |
|
(detail) |
|
(detail) |
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 |
Type |
Comments |
---|---|
WebSocket |
Primary purpose |
Type |
Comments |
---|---|
WebSocket |
Primary purpose |
Comments#
Only including symbols having
state=ONLINE
andapi_trading=ENABLED