OKX trading, from one binary
Crypto spot + perps. Backtest a strategy against stored OKX data, run it on paper, then mount the same engine live — the code that trades is the code the backtest ran. OKX mounts paper by default: credentials arm it, and a per-venue ceiling in your policy file caps it.
live exec + recon Live execution, with a reconciliation client that diffs the venue's own report against local state.
What the OKX bridge does
Execution
Live REST + WS execution
Reconciliation
Dedicated recon client · immediate resync on WS reconnect
Market data
Live feeds
Broker attribution via order tag; contract-size quantization is a pinned wire site.
Order types and flags
What the OKX bridge can send. These are the venue's own capabilities as the platform records them — where a venue cannot do something, the table says so instead of pretending otherwise.
| Order kinds | market · limit · stop |
|---|---|
| Triggers | stop-loss |
| Amend a resting order | supported — the quantity you send is the order's new TOTAL size |
| Post-only | not supported |
| Reduce-only | supported |
| Multi-leg / combo | not supported |
| Batch submit | no native batch endpoint — orders are sent one at a time |
| Order attribution | a tag field on the order (tag, up to 16 characters) |
Time in force
How each time-in-force resolves on OKX. A coercion is stated rather than hidden: asking for one and silently getting another is the kind of divergence that shows up as a surprise fill.
| Requested | What happens | On the wire |
|---|---|---|
| GTC | never emitted on this venue | — |
| IOC | sent as-is | ioc |
| FOK | sent as-is | fok |
| GTD | not supported | — |
| DAY | not supported | — |
Margin, data and modelled cost
| Margin modes |
cash · cross · isolated
default: cross
|
|---|---|
| Switching mode | a field on each order |
| Live market data |
trades · bars · depth
|
| Historical backfill |
bars
|
| Modelled commission | 2 bps maker · 5 bps taker |
⚠ The commission row is the backtest model — what the simulator charges on a fill for this venue, from the schedule the platform ships. It is not a quote of OKX's live pricing, it models commission only, and spread, slippage and perpetual funding are separate paths. Check the venue's own current terms before sizing anything on it.
Nothing arms OKX by accident
Absent credentials are the gate
No OKX keys in your local credential store, and the venue mounts paper. That is the mechanism, not a setting you have to remember to leave alone.
A ceiling that can only refuse
A per-venue entry in your policy file caps what OKX may do. It can lower a venue to paper; it can never promote one. A box with no such table mounts every venue on paper.
Keys stay on your machine
One file in your own project folder. No cloud, no account. Keys reach child processes through the environment rather than the command line, and are redacted from logs.
Agent writes are previewed
If you drive OKX from an agent, every order-writing call previews first and executes only against a token that preview issued. How that works.
Generated from the platform's own per-venue capability tables — this page cannot claim more than the code does. A venue cannot appear here without passing the execution and market-data conformance harnesses, and adding a venue fails those tables' tests until every one of them classifies it. Snapshot exported 2026-09-06.
Backtest OKX. Then mount it.
Free. Source-available under FSL-1.1; every release becomes Apache-2.0 two years on.
Trading involves substantial risk of loss and is not suitable for every investor. Nothing on this page is investment, financial or trading advice. Vike is not affiliated with, endorsed by or acting as an agent of OKX; the name is used only to identify the venue this software connects to. Venue availability, pricing and capabilities change — this page states what the shipped software wires today, not a promise about any venue's own service. Orders sent from your accounts remain your responsibility.