roq-htx¶
$ conda install \
--channel https://roq-trading.com/conda/unstable \
roq-htx
$ conda install \
--channel https://roq-trading.com/conda/stable \
roq-htx
Supports¶
✅ |
❶ |
|
✅ |
❶ |
|
✅ |
||
✅ |
||
❌ |
||
✅ |
||
✅ |
||
❌ |
Note
✅ = Available.
❎ = Not implemented.
❌ = Unavailable.
❶ The exchange protocol does not support streaming updates for reference data and market status.
Using¶
$ roq-htx [FLAGS]
Flags¶
$ roq-htx --help
--exchange(htx)Exchange identifier
--rest_uri(https://api.htx.pro)Exchange end-point
--rest_proxyProxy end-point
--rest_ping_freq(5s)Ping frequency
--rest_ping_path(/v1/common/timestamp)Ping path
--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?
--ws_market_uri(wss://api.htx.pro/ws)Exchange end-point
--ws_mbp_uri(wss://api.htx.pro/feed)Exchange end-point
--ws_order_uri(wss://api.htx.pro/ws/v2)Exchange end-point
--ws_ping_freq(5s)Ping frequency
--ws_max_subscriptions_per_stream(128)Maximum number of symbols per connection
--ws_request_delay(100ms)Request delay
--ws_mbp_request_max_retries(3)Request max retries
--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?
Environments¶
$ --flagfile $CONDA_PREFIX/share/roq-htx/flags/prod/flags.cfg
# flagfile for the roq-htx 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
$ --flagfile $CONDA_PREFIX/share/roq-htx/flags/prod/flags-aws.cfg
# flagfile for the roq-htx gateway
--rest_uri=https://api-aws.huobi.pro
--ws_market_uri=wss://api-aws.huobi.pro/ws
--ws_mbp_uri=wss://api-aws.huobi.pro/feed
--ws_order_uri=wss://api-aws.huobi.pro/ws/v2
Configuration¶
$ --flagfile $CONDA_PREFIX/share/roq-htx/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 gateway
symbols = [
"^btcusd[a-z]$",
"^ethusd[a-z]$"
]
[accounts]
[accounts.A1]
master = true
login = "YOUR_HTX_API_KEY_GOES_HERE"
secret = "YOUR_HTX_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¶
Channel |
Field |
||
|---|---|---|---|
|
|
⇒ |
|
|
|
⇒ |
|
|
|
⇒ |
|
|
|
⇒ |
|
|
|
⇒ |
Comments¶
When placing orders, you may get an error with
"err-code":"account-frozen-account-inexistent-error"and"err-msg":"account for id XXX and user id YYY does not exist". This could be related to no funding not being available for the base currency. The error message seems a bit mis-leading.