Who OKX is
OKX is a global crypto exchange, known as OKEx until 2022. It runs spot, derivatives and other crypto markets, and for professional and institutional traders it adds an OTC liquidity network for block trades and multi-leg strategies.
Individual traders, professional firms and other platforms use it, and businesses that offer crypto services can apply to its broker programme. Traders connect through its v5 REST API and its public, private and business WebSocket channels, which is why it is one of the venues our matching engine connects to.
What it does in your platform
Matching engine
Backs quieter pairs with OKX's depth. The engine follows OKX's order book over its public WebSocket, shows that depth on your pair within the limits you set, and covers each fill on OKX, so customers have real liquidity to trade against from the first day.
How the connection works
The connector uses OKX's v5 API: the public WebSocket for order books, and REST or the private WebSocket for orders and their updates. OKX's API key, secret and passphrase stay in your platform's secrets.
The book is followed
The engine subscribes to OKX's order book channel on the public WebSocket, which needs no login.
Depth backs your pair
Within the limits you set, that depth stands behind your pair's order book, next to your own market makers' orders.
A customer trades
The order matches in your engine, and the fill is booked to your ledger as it happens.
The fill is covered
The engine places the offsetting order on OKX through the v5 API, with its own client order ID so each one can be traced.
OKX confirms
The orders channel on the private WebSocket reports the fill, and the engine matches it to the customer's trade. Both show in the admin backoffice.
Next to other venues
OKX sits in the engine's external liquidity group with Binance, Kraken, Coinbase Prime, B2C2 and Wintermute. Your own market makers connect through the engine's FIX and WebSocket APIs and quote next to the depth OKX brings.
The order books, the fills and the ledger belong to your engine. Adding another venue next to OKX, or moving away from it later, does not change your apps or your traders' integrations.
When OKX fits best
A strong fit when
- You list pairs that trade actively on OKX and want that depth behind them.
- Your team wants a demo environment that takes the same API calls as production.
- You may later want OKX's sub-accounts or its OTC liquidity network for block trades.
Also worth a look
- Binance, Kraken or Coinbase Prime, other venues from the same group, next to OKX or instead of it.
- A liquidity provider such as B2C2 or Wintermute, when you would rather trade with one counterparty than mirror an order book.
How we get you live
The contract
We help you get your OKX account and contract in place, with the OKX entity that serves where you operate.
The pairs
We set up with you the pairs OKX backs, the limits on that depth, and the account mode the covering orders run in.
The keys
OKX's API key, secret and passphrase go into your platform's secrets and nowhere else. The key is bound to your platform's IP addresses, since OKX expires trading keys without one after a period of inactivity.
A full test run
The whole flow runs in OKX Demo Trading first, with demo keys and the same API calls marked as simulated.
