roq-kraken#
Important
This gateway needs sponsorship to complete certain features.
Links#
Purpose#
Maintain network connectivity with the Kraken 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 Costa Rica (to be confirmed, best source here)
Conda#
$ mamba install \
--channel https://roq-trading.com/conda/stable \
roq-kraken
$ cp $CONDA_PREFIX/share/roq-kraken/config.toml $CONFIG_FILE_PATH
# Then modify $CONFIG_FILE_PATH to match your specific configuration
$ roq-kraken \
--name "kraken" \
--config_file "$CONFIG_FILE_PATH" \
--client_listen_address "$UNIX_SOCKET_PATH" \
--service_listen_address "$TCP_LISTEN_PORT" \
--flagfile "$FLAG_FILE"
Config#
Flags#
$ roq-kraken --help
--exchange
(kraken
)exchange identifier (string)
--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.kraken.com
)REST end-point (URI)
--rest_proxy
proxy end-point (URI)
--rest_ping_freq
(5s
)ping frequency
--rest_ping_path
(/0/public/Time
)URI path used for REST connection keep-alive messages
--rest_request_timeout
(30s
)request: timeout
--ws_public_uri
(wss://beta-ws.kraken.com
)WebSocket end-point (URI)
--ws_public_ping_freq
(5s
)ping frequency
--ws_public_request_timeout
(15s
)request timeout
--ws_public_subscribe_book_depth
(10
)book depth (size)
--ws_public_max_subscriptions_per_stream
(128
)max subscriptions per connection (count)
--ws_private_uri
(wss://beta-ws-auth.kraken.com
)WebSocket end-point (URI)
--ws_private_ping_freq
(5s
)ping frequency
--ws_private_request_timeout
(15s
)request timeout
Environments#
$ $CONDA_PREFIX/share/roq-kraken/flags
# flagfile for the roq-kraken gateway
--rest_uri=https://api.kraken.com
--ws_public_uri=wss://ws.kraken.com
--ws_private_uri=wss://ws-auth.kraken.com
# flagfile for the roq-kraken gateway
--rest_uri=https://beta-api.kraken.com
--ws_public_uri=wss://beta-ws.kraken.com
--ws_private_uri=wss://beta-ws-auth.kraken.com
Market Data#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Unavailable |
|||
Unavailable |
|||
MarketData |
spread |
||
MarketData |
book |
||
Unavailable |
|||
MarketData |
trade |
||
Not supported |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
/0/public/AssetPairs |
||
Statistics#
Order Management#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
DropCopy |
openOrders |
Not implemented |
|
DropCopy |
ownTrades |
Not implemented |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
DropCopy |
addOrder |
Not implemented |
|
Unavailable |
|||
DropCopy |
cancelOrder |
Not implemented |
|
DropCopy |
cancelAll |
Not implemented |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
DropCopy |
addOrder, cancelOrder |
Not implemented |
Order Types#
TBD
Time in Force#
TBD
Position Effect#
TBD
Execution Instructions#
TBD
Account Management#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
/0/private/OpenPositions |
Not implemented |
|
OrderEntry |
/0/private/Balance, /0/private/TradeBalance |
Not implemented |
Streams#
Type |
Comments |
---|---|
REST |
Primary purpose
Each connection
The master account is used to
|
Type |
Comments |
---|---|
WebSocket |
Primary purpose
Each connection
|
Type |
Comments |
---|---|
WebSocket |
Primary purpose
Each connection
|
Constraints#
Rate-limit usage is not communicated by the exchange
- Order book ends up in bad state
Downtime (scheduled or not) appears to not shutdown existing connections nor are established subscriptions unsubscribed. Worse, during downtime, what appears to be uninitialized order book data can be disseminated. (This was confirmed with Kraken support early May 2020).
Warning
We currently have no means to detect bad order book updates. At best, a parse exception will terminate your gateway with an unhandled excpetion.