If you're connecting OKX to third-party trading tools like Cornix, you'll need API keys. This straightforward guide walks you through creating V5 API keys for both spot and futures trading, helping you automate trades safely while maintaining full control over permissions. Whether you're a beginner or experienced trader, you'll have your API connection ready in under five minutes.
Setting up API access on OKX is simpler than you might think. The exchange uses a V5 API system that gives you granular control over what external applications can do with your account. You're basically creating a secure bridge between OKX and your chosen trading bot or tool—no need to share your login credentials.
First things first: log into your OKX account and head to the API management section. You'll find this in your account settings, usually under the security or API menu. The interface is clean and user-friendly, so you won't be hunting around for hidden options.
Once you're in the API section, look for the button that says "Create V5 API key." OKX has moved to this newer version because it offers better security features and more flexible permission settings compared to older API versions.
Here's where it gets interesting. When you click to create a new key, OKX will ask you to specify what this API is for. Choose "Linking third-party apps" from the options. This tells the system you're connecting to an external service rather than building your own custom application.
From the dropdown list, select Cornix (or whichever third-party platform you're using). This pre-configuration ensures the API has the right default settings for that specific service. Next, give your API key a memorable name—something like "Cornix Spot Trading" or "Futures Bot 1" works well. You'll thank yourself later when you have multiple keys and need to tell them apart.
Now comes an important security step: creating your passphrase. Think of this as an extra password specifically for this API key. Make it strong but memorable—you'll need to enter it when connecting the API to Cornix or your chosen platform. Don't use your regular account password here.
The permissions section is crucial. For basic trading automation, you'll want to check the box next to "Trade" permissions. This allows the connected application to execute buy and sell orders on your behalf. Be selective here—only grant the permissions you actually need. If you're just running a trading bot, there's no reason to enable withdrawal permissions, for example.
If you're setting up automated trading strategies and want a smoother experience managing your OKX account, consider starting with enhanced fee benefits. 👉 Unlock permanent 20% trading fee reduction on OKX with referral code SUPER20OFF to maximize your trading efficiency right from the start.
After configuring everything, click the "Confirm" button. OKX will walk you through a quick verification process—usually involving your two-factor authentication app or email confirmation. This extra step ensures that even if someone gains access to your logged-in session, they can't create API keys without passing verification.
Once verification is complete, OKX displays your API credentials: the API Key, Secret Key, and the Passphrase you created. Here's the critical part—you can only see the Secret Key once. If you close this window without copying it, you'll need to create a brand new API key from scratch.
Copy all three pieces of information carefully. Open Cornix (or your trading platform) and navigate to their API connection settings. Paste in your API Key, Secret Key, and Passphrase exactly as provided. Most platforms will test the connection immediately to confirm everything's working properly.
Now that your API is connected, a few housekeeping tips. OKX lets you create multiple API keys, which is handy if you use different tools or want separate keys for spot and futures trading. Each key can have its own permissions, so you can grant different access levels to different applications.
Regularly review your active API keys in the OKX dashboard. If you stop using a particular service or bot, delete that API key immediately. It's a simple security practice that prevents unused access points from becoming potential vulnerabilities.
Set up IP address whitelisting if your trading bot operates from a consistent location. This adds another security layer—even if someone steals your API credentials, they can't use them from unauthorized IP addresses. OKX supports this feature in the API key settings.
Creating API keys on OKX takes just a few minutes but opens up powerful automation possibilities for both spot and futures trading. By carefully selecting permissions, using strong passphrases, and managing your keys responsibly, you can safely connect third-party tools while maintaining full security over your account. For traders looking to optimize their setup from the beginning, using a referral code like SUPER20OFF ensures you're getting permanent fee reductions—making OKX an even more cost-effective platform for automated trading strategies. Start with the right foundation, and your trading automation journey becomes that much smoother: https://www.okx.com/join/SUPER20OFF