Skip to main content

How to connect KuCoin API keys?

Learn how to securely create KuCoin API keys, configure required trading permissions, set up IP whitelisting, and connect your exchange account to Stoic AI

Welcome to Stoic! To automate your portfolio management (discover more at 👉 stoic.ai), you need to link your verified KuCoin account via API.

⚠️ Important Prerequisites:

  1. KYC Verification: You must complete Identity Verification on KuCoin to generate API keys.

  2. Transfer Your Funds: Stoic cannot trade funds left in your Funding Account (Main). You must transfer your USDT/BTC to your Trading Account (for Spot strategies) or Futures Account (for Futures strategies). Otherwise, Stoic will show a $0 balance.

Figure 1: Transferring USDT from the Funding Account to the Trading Account on KuCoin

Transferring funds from Funding to Trading Account on KuCoin

Step-by-Step Connection Guide

Step 1: Navigate to API Management Log in to your account on the KuCoin website. Hover over your profile icon in the top right corner and click on API Management.

Figure 2: Navigating to API Management from the KuCoin profile dropdown menu.

Navigating to KuCoin API Management in the profile menu

(Note: Before creating keys, KuCoin's security system will require you to enable 2FA and set a Trading Password).

Figure 3: Security prompt requiring you to enable 2FA (SMS/Google) and a Trading Password

KuCoin security prompt for 2FA and Trading Password

Step 2: Create a New API On the API Management dashboard, click the Create API button.

Figure 4: Clicking the Create API button in the KuCoin dashboard

Clicking the Create API button on the KuCoin dashboard

Step 3: Set Name and Passphrase Enter an API Name (e.g., "Stoic"). Then, create an API Passphrase.

💡 Crucial: The Passphrase is a unique password for this specific API key. Memorize or save it safely, as you will need to enter it into the Stoic app during connection.

Figure 5: Entering the API Name and API Passphrase on KuCoin.

Setting KuCoin API Name and API Passphrase

Step 4: Configure Trading Permissions In the API Permissions section, check the following boxes to allow Stoic to execute trades:

  • Spot Trading

  • Margin Trading

  • Futures Trading (Mandatory if you are running a Futures strategy)

  • Leave the Transfer option unchecked!

Figure 6: Selecting permissions for Spot, Margin, and Futures trading.

Enabling Spot, Margin, and Futures trading permissions on KuCoin API

Step 5: Whitelist Stoic's IP Addresses Under the IP Restriction section, select Yes (Restricted). Open your Stoic app, navigate to the KuCoin connection screen, and copy the provided trusted IP addresses.

Figure 7: Copying trusted IP addresses from the connection interface in the Stoic app

Stoic app connection screen highlighting the copy button for trusted IP addresses

Paste the copied Stoic IP addresses into the KuCoin IP Restriction field (separated by commas) and click Next.

Figure 8: Pasting trusted IP addresses into the KuCoin whitelist field and proceeding to the next step

Pasting Stoic trusted IP addresses into KuCoin whitelist

Step 6: Security Verification Enter your Trading Password and the verification code from SMS / your 2FA app to finalize the key creation.

Figure 9: Entering the Trading Password and SMS/2FA code to confirm key creation.

Entering Trading Password and 2FA code for security verification

Step 7: Connect to Stoic Your API is successfully created! Copy the API Key and Secret Key. Enter them, along with the API Passphrase you created in Step 3, into the Stoic app.

⚠️ Note: The Secret Key is displayed only once. If you close this window without saving it, you will need to delete this API key and start the process over.

Figure 10: Successfully generated KuCoin API Key and Secret Key, ready to be copied into the app.
​Generated KuCoin API Key and Secret Key ready to copy

❓ Frequently Asked Questions (FAQ)

Q: Can Stoic withdraw my money? A: No. Stoic only requires trading permissions (Spot, Margin, Futures). Never enable the "Transfer" (withdrawal) permission. The bot physically cannot move funds out of your exchange account.

Q: Why is Stoic showing a $0 balance after I connected my account? A: Your funds are likely sitting in your KuCoin "Funding Account". To make them available for the bot to trade, transfer your assets internally to your "Trading Account" (for Spot strategies) or "Futures Account".

Q: What is an API Passphrase? A: KuCoin utilizes an extra layer of security by requiring a custom password (Passphrase) for every API key. This is different from your main account login password and your trading password. You must input this Passphrase into the Stoic app to authorize the connection.

Did this answer your question?