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 and Trade — never Withdraw
Read lets the bot fetch balances, fills, instrument rules and market data. Trade lets it place and cancel orders. Withdraw is not needed by any trading bot; leaving it disabled means a leaked key cannot move funds off the exchange.
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
Withdrawal access is never requested by this app. If any tool asks you to enable it, treat that as a red flag.
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.