OKX sign-up, KYC and security setup, step by step
Binding your email and phone, what to prepare for verification, and setting up 2FA and the anti-phishing code, in order.
All articles
This is every MeowQuant article, grouped in the real order you'd work through quant: get your account and API sorted first, then get hands-on with the API, then pick one strategy and run it. Each piece follows the order you'd actually do things in, with the parameters and the spots where it's easy to slip up — not a concept explainer.
No account yet, no app installed, not sure how to buy USDT, still fuzzy on what quant even is? Start with this group and lay the groundwork before you touch anything.
Binding your email and phone, what to prepare for verification, and setting up 2FA and the anti-phishing code, in order.
Trade on, withdrawal off: nobody can take the money out, but they can still dump or pump with your balance. The three permission types, IP whitelists and sub-accounts, a checklist for before and after creating a key, and what to do, in order, once a leak is found.
Where demo trading is, how to create a separate demo API key, connecting ccxt and checking it, and how the REST and WebSocket addresses differ from live.
The official domain is www.okx.com. On iPhone, check the App Store developer is OKX Inc.; on Android, start from the official download page. Plus where to set the anti-phishing code.
Deposits can land in the funding or trading account. How transfers work across accounts and sub-accounts, where bot funds show up, what permission the transfer endpoint needs, and why to leave Withdraw off.
Want to write your own scripts? This group is for you: from connecting to the API, to handling errors, building risk control, and tapping real-time market data.
Requesting an API key on the demo, how to set permissions, what the Passphrase is — and the run in Python (ccxt) from checking your balance through placing an order, cancelling it and checking the result.
API errors laid out by type —auth failure, expired timestamp, rate limit, wrong symbol — each with its cause and fix.
OKX API rate limits count by IP, User ID or connection. One instrument takes 60 order requests per 2 seconds, and passing a sub-account's 1,000 returns 50061.
A script will execute a mistake faithfully dozens of times. How to hard-code position caps, stop-loss lines, a state check before any resend, and fallback logic.
How the public, private and business URLs differ, watch_ticker and watch_orders in ccxt.pro, a private-channel example that connects to demo first, and the documented connection and subscription limits.
An OKX WebSocket closes after 30 seconds with no subscription or no data. On quiet channels, send the string ping in under 30 s and reconnect if no pong comes.
Create an OKX grid bot with POST /api/v5/tradingBot/grid/order-algo and track it by its state field. On stop, stopType decides whether coins or positions stay.
You can run strategies without writing code. OKX's built-in grid, recurring buy, martingale, copy trading and bot marketplace: this group covers what each parameter controls and what the rules say.
A spot grid asks for an upper and lower price, a grid count and an amount. How the three constrain one another, and how much money is tied up if price falls to the lower limit, worked through from the official order rules.
Leaving the range only stops new orders and your holdings stay; take-profit, stop-loss, a manual stop or a delisting stop the bot itself. Checked line by line against OKX's help page.
OKX's spot Martingale bot buys more as price falls and sells the round at take-profit. The official example, recalculated: 4 safety orders need 3,100 USDT.
Out of range a spot grid just holds coins, while a futures grid uses leverage, can be liquidated and pays or earns funding.
Total PnL is an OKX Spot Grid bot's true result; Grid Profits and Unpaired PnL are display-only estimates. OKX's own example order group nets 0.04167584 USDT.
With Trailing Down on, every new buy order comes out of extra funds in the main account. On an 80–100 grid with 10 levels, moving down 5 levels takes 1,850 USDT.
Max drawdown = (peak NAV − lowest NAV after it) ÷ peak NAV. The same three-month NAV series reads 10% with month-end sampling and 20% with daily sampling.
Frequency, quote currency, multi-coin ratios, the account the money comes from and what happens when the balance is short, checked against the Help Center and API docs. It is not the same product as DCA (Martingale).
How fixed amount, proportional and smart sync copying are calculated, when profit share settles, how to stop copying, and the ways a copied position gets closed.
Where the marketplace is, how the risk levels on popular bot cards are assigned, which parameters come across when you copy someone's grid and which you fill in, and what happens to your copy when the original stops.
Webhook URL, signalToken, and which of the two message templates you need — plus how to work through Events history when the alert fires and nothing trades. Perpetual futures only.
What kind of platform OKX is, how its API differs from Binance's, and which built-in bots need no code.
Whether your coins sit in the funding or the trading account, where grid-bot funds go, how sub-accounts and API keys map, and how account mode sets the tdMode order parameter.
Credentials and the Passphrase, signing and timestamps, how each switches to its demo environment, what rate limits are counted against, and WebSocket keep-alive, item by item from both official docs.
Spot grid, futures grid, recurring buy, spot martingale, signal bot and copy trading are all opened by filling in parameters. The rule each one follows, how each one loses money, and how to try them in demo first.
Pull OKX candles with ccxt and paginate for older data, backtest a dual-MA rule with fees deducted, then check five reasons a good-looking backtest loses money live.