How to Connect Your OKX Exchange to 3Commas (Spot and Futures)

·

In the world of automated cryptocurrency trading, connecting your exchange to a platform like 3Commas is a fundamental step. This guide provides clear, step-by-step instructions for linking both your OKX Spot and Futures accounts using the new Quick Connect feature or via traditional API keys.

Understanding the Quick Connect Method

3Commas now supports a streamlined Quick Connect feature for OKX, making the linking process faster and more intuitive.

To use this method, navigate to your Portfolio page in 3Commas. Click the "Connect a new account" button. From the list of available exchanges, select OKX. Finally, click the "Connect OKX" button.

This action will redirect you to the official OKX login page. Here, you can either sign in to your existing account or create a new one. Complete the authentication process and approve the connection request. That's it! Your OKX Spot and Futures accounts are now successfully linked to 3Commas.

Activating Your OKX Futures Account

Before you can trade futures or connect via API, you must ensure your OKX Futures trading account is activated. This is a prerequisite for the API key method.

Log in to your OKX account and go to the Derivatives and Leveraged Trading page. If you haven't already, you will need to upgrade your trading privileges. Confirm your trading experience and click the "Upgrade for trading" button. If your account is already upgraded, click the settings (gear icon) button instead.

Select your appropriate futures trading level based on your competency and experience. Confirm your selection to complete the activation process. Your account is now ready for API key generation.

Generating API Keys on OKX

For users who prefer manual setup or need to use API keys, follow this process.

Hover over your profile icon in the top-right corner of the OKX interface and click on "API." You must have Two-Factor Authentication (2FA) enabled on your OKX account to proceed. If you see a prompt to enable it, please follow OKX's instructions to do so first.

Click on "+ Create V5 API." Give your API key a descriptive name to help you manage it later, then click "Create API Key." You will then be prompted to create a dedicated password for this specific API key. It is crucial to save this password, as you will need it to add the exchange to 3Commas.

From the "Application Name" dropdown list, select "3Commas." Under permissions, ensure that "Read" and "Trade" are checked. Enter your 2FA and verification codes when prompted, then click "Confirm."

Your API Key and Secret Key will now be displayed. You have successfully created the API keys needed to connect your OKX accounts to 3Commas. For enhanced security, consider exploring advanced API management tools to monitor your connected applications.

👉 Explore more strategies for secure API management

Connecting to 3Commas Using API Keys

With your API keys generated, the final step is to input them into the 3Commas platform.

Return to your 3Commas account and navigate to the section for connecting a new exchange. Select OKX from the list. Choose the manual API connection method. Carefully enter the API Key, Secret Key, and the API password you created in the previous step into the corresponding fields.

Submit the information. 3Commas will verify the keys and establish a connection to both your OKX Spot and Futures wallets. You are now ready to configure and deploy automated trading bots and strategies.

Frequently Asked Questions

Why can't I see my OKX Futures account in 3Commas after connecting?
The most common reason is that the Futures account has not been activated on OKX itself. You must complete the futures trading upgrade on the OKX website or app before the connection can be fully established. Ensure you selected "Trade" permissions when generating your API key.

What is the difference between Quick Connect and API Key connection?
Quick Connect uses OAuth protocol for a faster, more secure link without requiring you to manually handle API secrets. The API key method offers more granular control for advanced users who may want to set specific permissions or use the keys with other applications.

Is it safe to give 3Commas Trade permissions on my OKX account?
Yes, when set up correctly. Using the official 3Commas application profile in the OKX API settings ensures the permissions are scoped appropriately. Never share your API Secret Key or password publicly, and always enable withdrawal whitelisting on OKX for added security.

I am getting an authentication error. What should I check?
First, verify that you have correctly copied and pasted your API Key, Secret Key, and the dedicated API password without any extra spaces. Then, confirm that your OKX account's 2FA is working correctly and that the API key has not expired or been revoked.

Can I connect both Spot and Futures with a single API key?
Yes. A correctly configured API key from OKX with trade permissions will provide 3Commas with access to both your Spot and Futures wallets under your main account, allowing you to manage all your assets from one connected account in 3Commas.

What should I do if I lose my API password?
For security reasons, OKX does not store or allow you to retrieve a lost API password. You must delete the existing API key from your OKX account and create a new one, then update the connection in 3Commas with the new credentials.