How to create an OKX API key for a trading bot
Omni Micro Accumulator trades through the OKX V5 API using a key you create yourself. This guide covers the exact permissions required, the ones you should never enable, and the settings that cause most connection failures.
Setup steps
1. Open API management on OKX
Sign in to OKX on desktop, open the profile menu and choose API. Create a new API key on the account (and sub-account, if you use one) that holds the funds the bot should trade.
2. Name the key and set a passphrase
Use a label you will recognise later, such as omni-bot. The passphrase you choose here is part of every signed OKX V5 request and is displayed only once — store it with the secret.
3. Enable Read, Trade and Withdraw
Read lets the bot fetch balances, fills, instrument rules and market data. Trade lets it place and cancel orders. Withdraw is required only so the accrued 30% performance fee can be transferred internally on OKX to the platform UID 528271138908980775 once it reaches $0.50 — the bot never withdraws to an external address. Pair it with an IP allowlist for extra safety.
4. Restrict the key with an IP allowlist
Bind the key to the IP addresses that will call it. If the allowlist does not include the caller's address, OKX rejects every signed request — one of the most common causes of a bot that never fills an order.
5. Save the credentials in the terminal
Paste the API key, secret and passphrase into the OKX Connection page. They are stored server-side and used only for signed OKX V5 calls; the browser never sees them.
Permissions the bot needs
Withdraw access is used exclusively for the OKX account-to-account transfer of the 30% performance fee to UID 528271138908980775. The bot never sends funds to a blockchain address or an outside wallet, and every accrual and payout is itemised in your terminal.
Troubleshooting common errors
"This API Key does not have trading permission"
The key was created with Read only. OKX permissions cannot be widened after creation for an existing key in all cases — create a new key with Read + Trade, then re-save it on the OKX Connection page.
Every request fails with an invalid signature or timestamp error
The passphrase or secret was mistyped, or the calling IP is outside the allowlist. Re-enter all three fields together and confirm the allowlist.
"Local compliance restrictions"
OKX blocks that specific instrument in your jurisdiction. Switch the market to a supported quote asset (for example USDT instead of USDC).
Next step
With a Read + Trade key ready, sign in and save it on the OKX Connection page to start accumulating.