roq-kraken-futures

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

Products

Spot

Futures

Options

Market Data

Reference Data

Market Status

Top of Book

Market by Price (L2)

Market by Order (L3)

Trade Summary

Statistics

Order Management

Create

Modify

Cancel

Cancel All

Auto Cancellation

Account Management

Positions

Funds

  • Data center located in (to be confirmed)

  • No test environment

Conda

1conda install \
2  --channel https://roq-trading.com/conda/stable \
3  roq-kraken-futures
1cp $CONDA_PREFIX/share/roq-kraken-futures/config.toml $CONFIG_FILE_PATH
2
3# Then modify $CONFIG_FILE_PATH to match your specific configuration
1roq-kraken-futures \
2      --name "kraken-futures" \
3      --config_file "$CONFIG_FILE_PATH" \
4      --client_listen_address "$UNIX_SOCKET_PATH" \
5      --metrics_listen_address "$TCP_LISTEN_PORT" \
6      --flagfile "$FLAG_FILE"

Config

Flags

1roq-kraken-futures --help

--book_depth

Maximum order book depth. The exchange will limit order book updates to this depth. Please refer to Kraken Websockets API for further details.

Environments

1# flagfile
2
3--rest_uri=https://futures.kraken.com/derivatives/
4--ws_uri=wss://futures.kraken.com/ws/v3
1# flagfile
2
3--rest_uri=https://demo-futures.kraken.com/derivatives/
4--ws_uri=wss://demo-futures.kraken.com/ws/v3

Market Data

Event

Stream

Messages

Comments

roq::ReferenceData

roq::MarketStatus

MarketData

ticker

roq::TopOfBook

MarketData

ticker

roq::MarketByPriceUpdate

MarketData

book

roq::MarketByOrderUpdate

Unavailable

roq::TradeSummary

MarketData

trade

roq::StatisticsUpdate

MarketData

ticker

Statistics

Type

Comments

INDEX_VALUE

(ticker) index

SETTLEMENT_PRICE

(ticker) markPrice

FUNDING_RATE

(ticker) relative_funding_rate

FUNDING_RATE_PREDICTION

(ticker) relative_funding_rate_prediction

Order Management

Event

Stream

Messages

Comments

roq::OrderUpdate

DropCopy

open_orders

roq::TradeUpdate

DropCopy

fills

Event

Stream

Messages

Comments

roq::OrderUpdate

DropCopy

open_orders_snapshot

roq::TradeUpdate

DropCopy

fills_snapshot

Event

Stream

Messages

Comments

roq::CreateOrder

OrderEntry

/api/v3/sendorder

roq::ModifyOrder

OrderEntry

/api/v3/editorder

roq::CancelOrder

OrderEntry

/api/v3/cancelorder

roq::CancelAllOrders

OrderEntry

/api/v3/canceallorders

Event

Stream

Messages

Comments

roq::OrderAck

Order Types

Type

Comments

MARKET

Mapped to mkt (JSON)

LIMIT

Mapped to lmt (JSON)

Time in Force

Type

Comments

GTC

Mapped to ioc=false (JSON)

IOC

Mapped to ioc=true (JSON)

Position Effect

Note

Not supported

Execution Instructions

Type

Comments

DO_NOT_INCREASE

Mapped to reduce_only=true (JSON)

Account Management

Event

Stream

Messages

Comments

roq::PositionUpdate

DropCopy

open_positions

roq::FundsUpdate

DropCopy

account_balances_and_margins

Event

Stream

Messages

Comments

roq::PositionUpdate

roq::FundsUpdate

Streams

Type

Comments

REST

Primary purpose

  • Download instruments

Type

Comments

WebSocket

Primary purpose

  • live market data (top of book + market status)

Each connection

  • supports a slice of the symbols

Type

Comments

REST

Primary purpose

  • support order management

Each connection

  • supports a single account

Type

Comments

WebSocket

Primary purpose

  • live account updates, including positions and funds

Each connection

  • supports a single account

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