OKX's v5 API covers spot, perpetual/futures swaps, options and market data over REST and WebSocket. One quirk: OKX keys come as three parts — API key, secret and a passphrase. Here's how to get them.
| Use | Cost |
|---|---|
| Market data (REST/WS) | Free |
| Spot trading fee | ~0.08–0.1% |
| Perpetual swaps (taker) | ~0.05% |
| API access | Free |
1. Sign up / log in at okx.com and complete verification.
2. Go to Account → API and click Create V5 API Key.
3. Set a passphrase (you choose it — you'll need it on every request), pick permissions (Read / Trade) and add an IP whitelist.
4. Copy the API Key, Secret and remember your passphrase — all three are required to authenticate.
OKX needs three secrets (key, secret, passphrase) — protect all of them. Use Read-only for data bots, IP-whitelist for trade keys, and never enable withdrawals on an API key unless you must. Keep them in environment variables.
Binance for liquidity, Bybit for low perp fees. Just need prices? CoinGecko. See Binance and Bybit.
Browse all API guides → · trade safely — size positions with RektCalc.
Not affiliated with OKX. Exchange link is a referral link.