roq-hitbtc¶
Links¶
Supports¶
Spot |
✓ |
Futures |
|
Options |
|
Combos |
Reference Data |
✓ |
Market Status |
|
Top of Book |
✓ |
Market by Price |
✓ |
Market by Order |
|
Trade Summary |
✓ |
Statistics |
✓ |
Create |
✓ |
Modify |
✓ |
Cancel |
✓ |
Cancel All |
|
Auto-Cancel |
Positions |
✓ |
Funds |
✓ |
Installing¶
$ mamba install \
--channel https://roq-trading.com/conda/stable \
roq-hitbtc
$ mamba install \
--channel https://roq-trading.com/conda/unstable \
roq-hitbtc
Using¶
$ roq-hitbtc \
--name "hitbtc" \
--config_file $CONFIG_FILE_PATH \
--client_listen_address $UNIX_SOCKET_PATH \
--flagfile $ENVIRONMENT_FLAGFILE
Flags¶
$ roq-hitbtc --help
--exchange
(hitbtc
)Exchange identifier
--ws_uri
(wss://api.hitbtc.com/api/2/ws
)Exchange end-point
--ws_ping_freq
(5s
)Ping frequency
--ws_request_timeout
(15s
)Request timeout
--ws_max_subscriptions_per_stream
(256
)Maximum number of symbols per connection
--encode_buffer_size
(1048576
)Encode buffer size
--decode_buffer_size
(10485760
)Decode buffer size
--mbp_allow_price_inversion
(false
)Allow price inversion?
Environments¶
$ $CONDA_PREFIX/share/roq-hitbtc/flags/prod/flags.cfg
# flagfile for the roq-hitbtc gateway
--rest_uri=https://api.hitbtc.com
--ws_uri=wss://api.hitbtc.com/api/2/ws
$ $CONDA_PREFIX/share/roq-hitbtc/flags/test/flags.cfg
# flagfile for the roq-hitbtc gateway
--rest_uri=https://api.demo.hitbtc.com
--ws_uri=wss://api.demo.hitbtc.com/api/2/ws
Configuration¶
$ $CONDA_PREFIX/share/roq-hitbtc/config.toml
Important
The template will be replaced when the software is upgraded. Make a copy and modify to your needs.
symbols = [
"^BTCUSD[A-Z]?$",
"^ETHUSD[A-Z]?$"
]
[accounts]
[accounts.A1]
master = true
login = "YOUR_HITBTC_API_KEY_GOES_HERE"
secret = "YOUR_HITBTC_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¶
Event |
Stream |
Messages |
Comments |
---|---|---|---|
MarketData |
getSymbols |
Polling |
|
Unavailable |
|||
MarketData |
subscribeTicker, ticker |
||
MarketData |
subscribeOrderbook, snapshotOrderbook, updateOrderbook |
||
Unavailable |
|||
MarketData |
subscribeTrades, snapshotTrades, updateTrades |
||
MarketData |
subscribeTicker, ticker |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Statistics¶
Order Management¶
Event |
Stream |
Messages |
Comments |
---|---|---|---|
DropCopy |
activeOrders, report |
||
DropCopy |
report |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Rest |
GET /api/2/history/order |
||
Rest |
GET /api/2/history/trades |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
newOrder |
||
OrderEntry |
cancelReplaceOrder |
||
OrderEntry |
cancelOrder |
||
Unavailable |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
result, error |
Order Types¶
TBD
Time in Force¶
TBD
Position Effect¶
TBD
Execution Instructions¶
TBD
Account Management¶
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Unavailable |
|||
OrderEntry |
getTradingBalance |
Polling |
Streams¶
Type |
Comments |
---|---|
WebSocket |
Primary purpose
Each connection
|
Type |
Comments |
---|---|
WebSocket |
Primary purpose
Each connection
|
Type |
Comments |
---|---|
WebSocket |
Primary purpose
Each connection
|
Type |
Comments |
---|---|
REST |
Primary purpose
Each connection
|
Constraints¶
Rate-limit usage is not communicated by the exchange
Comments¶
The advertised FIX API does not appear to actually exist. This is the response we received from support: “At the moment, we do not grant FIX access to users”.