roq-htx-futures¶
$ conda install \
--channel https://roq-trading.com/conda/unstable \
roq-htx-futures
$ conda install \
--channel https://roq-trading.com/conda/stable \
roq-htx-futures
Supports¶
✅ |
❶ |
|
❌ |
||
✅ |
||
✅ |
||
❌ |
||
✅ |
||
✅ |
||
❌ |
Note
✅ = Available.
❎ = Not implemented.
❌ = Unavailable.
❶ The exchange protocol does not support streaming updates for reference data and market status.
Using¶
$ roq-htx-futures [FLAGS]
Flags¶
$ roq-htx-futures --help
--exchange(htx-futures)Exchange identifier
--apiAPI (
USDT-M-FUTURES,COIN-M-DELIVERY,COIN-M-PERPETUAL)--ws_api(false)Use WebSocket API?
--margin_modeMargin-mode to use when account margin-mode has not been configured
--rest_uri(https://api.hbdm.com)Exchange end-point
--rest_proxyProxy end-point
--rest_ping_freq(5s)Ping frequency
--rest_ping_path(/api/v1/contract_api_state)Ping path
--rest_request_timeout(30s)Request timeout
--rest_listen_key_refresh(1800s)Listen key refresh period
--rest_order_recv_window(5000ms)Receive window, please refer to Binance documentation!
--rest_cancel_on_disconnect(false)Cancel orders on disconnect?
--rest_download_refresh(600s)Download refresh period
--ws_market_uri(wss://api.hbdm.com/ws)Exchange end-point
--ws_index_uri(wss://api.hbdm.com/ws_index)Exchange end-point
--ws_order_uri(wss://api.hbdm.com/notification)Exchange end-point
--ws_order2_uri(wss://api.hbdm.com/trade)Exchange end-point
--ws_ping_freq(5s)Ping frequency
--ws_max_subscriptions_per_stream(32)Maximum number of symbols per connection
--ws_subscribe_depth_levels(0)Depth levels
--ws_subscribe_depth_freq(100ms)Depth update frequency
--ws_subscribe_trade_details(false)Report individual matches for trade summary? (bool)
--encode_buffer_size(1048576)Encode buffer size
--decode_buffer_size(10485760)Decode buffer size
--mbp_allow_price_inversion(false)Allow price inversion?
Environments¶
$ --flagfile $CONDA_PREFIX/share/roq-htx-futures/flags/prod/flags-usdt-m-futures.cfg
# flagfile for the roq-htx-futures gateway
--api=usdt-m-futures
--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_order2_uri=wss://api.hbdm.com/linear-swap-trade
--ws_index_uri=wss://api.hbdm.com/ws_index
$ --flagfile $CONDA_PREFIX/share/roq-htx-futures/flags/prod/flags-coin-m-delivery.cfg
# flagfile for the roq-htx-futures gateway
--api=coin-m-delivery
--rest_uri=https://api.hbdm.com
--ws_market_uri=wss://api.hbdm.com/ws
--ws_order_uri=wss://api.hbdm.com/notification
--ws_order2_uri=wss://api.hbdm.com/trade
--ws_index_uri=wss://api.hbdm.com/ws_index
$ --flagfile $CONDA_PREFIX/share/roq-htx-futures/flags/prod/flags-coin-m-perpetual.cfg
# flagfile for the roq-htx-futures gateway
--api=coin-m-perpetual
--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_order2_uri=wss://api.hbdm.com/swap-trade
--ws_index_uri=wss://api.hbdm.com/ws_index
Configuration¶
$ --config_file $CONDA_PREFIX/share/roq-htx-futures/config.toml
Important
This template will be replaced when the software is upgraded. Make a copy and modify to your own needs.
# config template for the roq-htx-futures gateway
symbols = [
"^BTC-USD[A-Z]?$", # linear + swap
"^ETH-USD[A-Z]?$", # linear + swap
"^BTC[0-9]{6}$", # inverse
"^ETH[0-9]{6}$" # inverse
]
[accounts]
[accounts.A1]
master = true
login = "YOUR_HTX_FUTURES_API_KEY_GOES_HERE"
secret = "YOUR_HTX_FUTURES_SECRET_GOES_HERE"
symbols = [ ".*" ]
[users]
[users.test]
password = "1234"
symbols = ".*"
[users.trader]
password = "secret"
accounts = [ "A1" ]
symbols = [ ".*BTC.*", ".*ETH.*" ]
[rate_limits]
[rate_limits.global]
type = "ORDER_ACTION"
aggregate = true
request_limit = 100
monitor_period = "10s"
ban_period = "5m"
Market Data¶
Inbound¶
Event |
Field |
||
|---|---|---|---|
|
|
⇒ |
|
|
|
⇒ |
|
|
|
⇒ |
|
|
|
⇒ |
|
|
|
⇒ |
|
|
|
⇒ |
|
|
|
⇒ |
|
|
|
⇒ |
Comments¶
Symbols are only processed when
contract_status==1The channels
premium_indexandestimated_rateare not available when--apiis one ofUSDT-M-FUTURES,COIN-M-DELIVERY,COIN-M-PERPETUAL.