Products Connect
Futures and options, behind a small protocol.
The gateway between qkt and a trading venue: one container per account. Futures, perpetuals and options over one small protocol.
Pre-1.0 · testnet and paper first- Latest release
- v0.1.0
- Licence
- Apache-2.0
- Adapters
- paper, Deribit
- Protocol
- VGP v1
- qkt
- Venue gateway
- Adapter
- The venue
brokers:
deribit:
type: gateway
gateway_url: http://127.0.0.1:8444
api_key: env:DERIBIT_TRADER_TOKEN
expected_adapter: deribit
expected_account_login: "<client id>"
expected_trade_mode: demo # real on mainnetqkt trades through the gateway with a token, never with venue keys. It refuses to start if the adapter, the account or the trade mode does not match what you wrote here.
Source: qkt-venue-gateway/adapter-deribit/README.md; qkt/docs/reference/config-schema.md
{"client_order_id": "dsl-s-1", "symbol": "BTC_USDC-25DEC26-92000-C",
"side": "sell", "type": "limit", "quantity": "0.1", "limit_price": "650",
"time_in_force": "gtc", "reduce_only": false}{"client_order_id": "dsl-s-1", "venue_order_id": "8812", "symbol": "BTC_USDC-25DEC26-92000-C",
"side": "sell", "type": "limit", "quantity": "0.1", "limit_price": "650", "stop_price": null,
"time_in_force": "gtc", "reduce_only": false, "status": "working", "filled_quantity": "0",
"avg_fill_price": null, "reject_reason": null, "created_at": 1790835316271, "updated_at": 1790835316271}Money and quantities are decimal strings, never floats. The order is idempotent on its client_order_id: the same body again returns the existing order, a different body is a 409.
Source: qkt-venue-gateway/docs/vgp-v1-wire.md §3 (the Order example)
interface VenueAdapter : AutoCloseable {
fun place(order: NewOrder): VenueOrder // order carries its client_order_id as the venue label
fun cancel(clientOrderId: String): VenueOrder?
fun orderByLabel(clientOrderId: String): VenueOrder? // venue lookup by our id; null = venue never saw it
fun fills(fromMs: Long, toMs: Long): List<VenueFill> // executions with venue fill ids and costs
// ...
}An adapter translates one venue's API and nothing more. The journal, idempotency, recovery from fills and the kill switch are the gateway's. Built in: paper, which trades on Deribit's live public prices with no account, and Deribit.
Source: qkt-venue-gateway/docs/design.md §3; adapter-paper/README.md
{"protocol": "vgp1", "adapter": "deribit", "adapter_version": "0.1.0",
"account_login": "12345", "trade_mode": "demo", "venue_connected": true,
"kill_switch": {"all": false, "symbols": []}, "server_time": 1790835316271,
"stream": "4f1c...", "seq": 1041, "capabilities": ["bars", "funding", "funding_rates", "quotes"]}Before trading, qkt checks protocol, adapter, account_login and trade_mode here against your expected_* settings. A demo account and a real one can never be mixed up silently.
Source: qkt-venue-gateway/docs/vgp-v1-wire.md §3 (GET /v1/health)
G="Authorization: Bearer $GATEWAY_GUARDIAN_TOKEN"
curl -H "$G" -X POST http://127.0.0.1:8443/v1/kill -d '{"scope":"all"}'{"error": {"code": "kill_switch", "message": "<text>"}}Guardrails holds the guardian token: it can read everything and stop new exposure. While the switch is on, only cancels, position closes and orders that reduce a position go through (HTTP 423 otherwise). It survives restarts.
Source: qkt-venue-gateway/docs/running.md; docs/vgp-v1-wire.md §2
In motion
An order, from qkt to a venue.
The same path for futures, perpetuals and options. The kill switch lives in the gateway, outside qkt.

Try it
No venue account needed to start.
The paper adapter trades a simulated account on Deribit's live public prices. You need Docker and nothing else. It builds from source today.
git clone https://github.com/elitekaycy/qkt-venue-gateway && cd qkt-venue-gatewaycp .env.example .env # set PAPER_TRADER_TOKEN and PAPER_GUARDIAN_TOKENdocker compose up -d # serves on 127.0.0.1:8443curl -H "Authorization: Bearer $PAPER_TRADER_TOKEN" http://127.0.0.1:8443/v1/healthDesign goals
What the gateway is built to do for every venue.
- Built not to double ordersA client order id is placed at most once.
- Nothing lost on restartOrders are journaled before they are sent, and qkt replays from the last event it saw.
- Lost orders recoveredAn unknown outcome is recovered from fills, not re-sent.
- A kill switch outside qktA separate guardian token blocks new risk, for the account or one symbol. You call it yourself or from your own watchdog; Guardrails does not support the venue gateway yet.
Know the limits
What it is not.
- Not for high frequencyHolding periods are minutes to weeks, not microseconds.
- One account per processRun another container for another account.
- USDC-linear on DeribitCoin-margined contracts are not supported yet.
- Builds from sourceThere is no prebuilt image yet.
The path
- 1Write and testqkt engine
- 2Connect a broker or venueMT5 gatewayVenue gateway
- 3Set limits on the accountGuardrails
- 4Watch it runqkt Insights
Write your first strategy today.
One command to install. Eight lines to a backtest. Free and open source.