roq-kraken-futures#
Links#
Purpose#
Maintain network connectivity with the Kraken Futures 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 (to be confirmed)
No test environment
Conda#
$ mamba install \
--channel https://roq-trading.com/conda/stable \
roq-kraken-futures
$ cp $CONDA_PREFIX/share/roq-kraken-futures/config.toml $CONFIG_FILE_PATH
# Then modify $CONFIG_FILE_PATH to match your specific configuration
$ roq-kraken-futures \
--name "kraken-futures" \
--config_file "$CONFIG_FILE_PATH" \
--client_listen_address "$UNIX_SOCKET_PATH" \
--service_listen_address "$TCP_LISTEN_PORT" \
--flagfile "$FLAG_FILE"
Config#
Flags#
$ roq-kraken-futures --help
--exchange
(kraken-futures
)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://demo-futures.kraken.com/derivatives
)REST end-point (URI)
--rest_proxy
proxy end-point (URI)
--rest_ping_freq
(5s
)ping frequency
--rest_ping_path
(/api/v3/instruments
)URI path used for REST connection keep-alive messages
--rest_cancel_on_disconnect
(true
)cancel orders on disconnect? (bool)
--rest_cancel_all_after
(30s
)cancel all after, requires cancel-on-disconnect
--rest_request_timeout
(30s
)request: timeout
--rest_allow_order_request_pipeline
(false
)allow more than one in-flight order action? (bool)
--rest_use_nonce
(true
)use nonce for security?
--ws_uri
(wss://demo-futures.kraken.com/ws/v3
)WebSocket end-point (URI)
--ws_ping_freq
(5s
)ping frequency
--ws_request_timeout
(15s
)request timeout
--ws_max_subscriptions_per_stream
(128
)max subscriptions per connection (count)
Environments#
$ $CONDA_PREFIX/share/roq-kraken-futures/flags
# flagfile for the roq-kraken-futures gateway
--rest_uri=https://futures.kraken.com/derivatives/
--ws_uri=wss://futures.kraken.com/ws/v3
# flagfile for the roq-kraken-futures gateway
--rest_uri=https://demo-futures.kraken.com/derivatives/
--ws_uri=wss://demo-futures.kraken.com/ws/v3
Market Data#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
MarketData |
ticker |
||
MarketData |
ticker |
||
MarketData |
book |
||
Unavailable |
|||
MarketData |
trade |
||
MarketData |
ticker |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Rest |
instruments |
||
Statistics#
Type |
Comments |
---|---|
|
(ticker) |
|
(ticker) |
|
(ticker) |
|
(ticker) |
Order Management#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
DropCopy |
open_orders |
||
DropCopy |
fills |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
DropCopy |
open_orders_snapshot |
||
DropCopy |
fills_snapshot |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
/api/v3/sendorder |
||
OrderEntry |
/api/v3/editorder |
||
OrderEntry |
/api/v3/cancelorder |
||
OrderEntry |
/api/v3/canceallorders |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Order Types#
Type |
Comments |
---|---|
|
Mapped to |
|
Mapped to |
Time in Force#
Type |
Comments |
---|---|
|
Mapped to |
|
Mapped to |
Position Effect#
Note
Not supported
Execution Instructions#
Type |
Comments |
---|---|
|
Mapped to |
Account Management#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
DropCopy |
open_positions |
||
DropCopy |
account_balances_and_margins |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Streams#
Type |
Comments |
---|---|
REST |
Primary purpose
|
Type |
Comments |
---|---|
WebSocket |
Primary purpose
Each connection
|
Type |
Comments |
---|---|
REST |
Primary purpose
Each connection
|
Type |
Comments |
---|---|
WebSocket |
Primary purpose
Each connection
|
Constraints#
The field
cliOrdId
is a string containing only web-safe characters.
Comments#
Order updates has no information about last traded price/quantity and total average price
There is a race between REST (ack) and WebSocket (update) for order actions
Some uncertainty around edit/cancel order and execution response
Statistics are using relative funding rates to be compatible with other exchanges