One small protocol between qkt and a trading venue — one container per account.¶
qkt-venue-gateway gives qkt one protocol, VGP v1, for futures, perpetuals, options and spot. An order is placed at most once, nothing is lost on a restart, and a kill switch lives outside qkt.
What the gateway guarantees¶
One gateway process serves one venue account. qkt places orders and reads market data through it, and a venue adapter does the talking to the venue. The same four things hold for every venue:
- Orders are never doubled. A client order id is placed at most once; a retried submit returns the same order.
- Nothing is lost on restart. Every order, fill and position change is journaled before it is sent. After any restart, qkt replays from its last sequence number.
- Lost orders are recovered. An order the venue has forgotten is resolved from its fills, never sent again.
- A kill switch outside qkt. A guardian token can block new exposure for the account or per symbol.
How it works, in three steps¶
Start a gateway¶
One container per account, configured by GATEWAY_* variables. The paper account needs only
Docker and two tokens: docker compose up -d.
Point qkt at it¶
One type: gateway broker in qkt's config. qkt refuses to start if the gateway's adapter,
account or trade mode do not match what you wrote.
Trade¶
Deploy a strategy. Each order and fill is journaled, streamed to qkt in order, and survives a restart of either side.
Adapters¶
| Adapter | Venue | Status |
|---|---|---|
paper |
Simulated account on Deribit's public prices; no account needed | Stable |
deribit |
Deribit testnet and mainnet: USDC-linear perpetuals, futures and options | Stable |
bybit |
Bybit testnet and mainnet: USDT/USDC linear contracts, or spot | New |
Another venue is one adapter module. See writing an adapter and the adapter rules.
Where to go next¶
| I want to | Read |
|---|---|
| Run it in five minutes | Quickstart |
| Run a gateway for a real account | Run a gateway · Going live |
| Connect qkt | Connect qkt |
| Stop trading from outside qkt | Kill switch and guardrails |
| Look up a variable or a route | Configuration · API at a glance |
| Back up, upgrade, troubleshoot | Operations |
| Add a venue | Writing an adapter |
| Understand how it works and why | How it works · Design |
The same idea for MetaTrader 5 is mt5-gateway. The engine is qkt.