roq-gate#
Important
This gateway needs sponsorship to complete certain features.
Links#
Purpose#
Maintain network connectivity with the Gate.io 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: TBD
Conda#
$ mamba install \
--channel https://roq-trading.com/conda/stable \
roq-gate
$ cp $CONDA_PREFIX/share/roq-gate/config.toml $CONFIG_FILE_PATH
# Then modify $CONFIG_FILE_PATH to match your specific configuration
$ roq-gate \
--name "gate" \
--config_file "$CONFIG_FILE_PATH" \
--client_listen_address "$UNIX_SOCKET_PATH" \
--service_listen_address "$TCP_LISTEN_PORT" \
--flagfile "$FLAG_FILE"
Config#
Flags#
$ roq-gate --help
--exchange
(gate
)exchange identifier (string)
--request_limit
(80
)request limit per interval
--request_limit_interval
(10s
)request limit monitor interval
--self_trade_prevention
(CN
)self-trade prevention: CN, CO, CB, DC
--encode_buffer_size
(1048576
)encode buffer size
--decode_buffer_size
(10485760
)decode buffer size
--mbp_allow_price_inversion
(true
)allow price inversion?
--order_book_depth
(100
)order book depth
--order_book_freq
(100ms
)order book frequency
--rest_uri
(https://api.gateio.ws/api/v4
)REST end-point (URI)
--rest_proxy
proxy end-point (URI)
--rest_ping_freq
(5s
)ping frequency
--rest_ping_path
(/
)URI path used for REST connection keep-alive messages
--rest_request_timeout
(30s
)request: timeout
--rest_download_orders_page_size
(500
)page size used when downloading orders
--rest_download_orders_begin
(24h
)download orders since (now - begin)
--rest_download_only_active_orders
(false
)download only active orders?
--rest_download_fills_page_size
(500
)page size used when downloading fills
--rest_download_fills_begin
(24h
)download fills since (now - begin)
--rest_token_refresh_freq
(8h
)token refresh frequency
--ws_uri
(wss://api.gateio.ws/ws/v4/
)WS end-point (URI)
--ws_ping_freq
(5s
)ping frequency
--ws_request_timeout
(15s
)request: timeout
--ws_max_subscriptions_per_stream
(256
)max symbols per connection (count)
--ws_mbp_request_delay
(500ms
)request delay
--ws_mbp_request_max_retries
(3
)request max retries
Environments#
$ $CONDA_PREFIX/share/roq-gate/flags
# flagfile for the roq-gate gateway
--rest_uri=https://api.gateio.ws/api/v4
--ws_uri=wss://api.gateio.ws/ws/v4/
Market Data#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
MarketData |
spot.book_ticker |
||
MarketData |
spot.order_book_update |
||
MarketData |
spot.trades |
||
MarketData |
spot.tickers |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Rest |
/spot/currencies, /spot/currency_pairs |
||
Rest |
/spot/order_book |
||
Statistics#
Type |
Comments |
---|---|
|
(spot.tickers) |
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
Each connection
|
Constraints#
Order book updates are throttled at 100ms (default) or 1000ms.
Order books appear to allow inverted prices.
Comments#
All symbols not having trade_status == tradable are dropped.
Order/account management is completely missing (needs sponsorship).