Trade like a pro.
Build like one too.
Programmatic access to trading, market data, and account management on one of the world’s largest crypto exchanges — over REST and WebSocket.
The same API behind the OKX app
Every quote, balance, and trade you see in the OKX app flows through the same REST and WebSocket API documented here. Subscribe to live tickers, order books, and account updates, and build the same real-time experiences into your own product.
Explore WebSocket →Start building
Generate your key, secret, and passphrase and set permissions.
Sign private requests with HMAC-SHA256 in a few lines of code.
Stream tickers, order books, and private account channels.
Public tickers, order books, candlesticks, and trades — no auth required.
Browse all 260+ REST endpoints with schemas, examples, and code snippets.
Test everything risk-free with simulated funds before going live.

