Thomasboleto | API KEY setup
Copied to clipboard!

Complete API Setup Guide

Step-by-step tutorials for connecting your trading bot to 4 popular exchanges: OKX, KuCoin, BloFin, and Weex

Updated:

Select Your Exchange

OKX

Best for Beginners

Complete verification required before API creation. Features demo trading for practice.

KuCoin

Futures Trading

Separate API keys for Spot and Futures trading. Complete KYC required.

BloFin

Professional Platform

Institutional-grade exchange. Requires full verification and has no demo mode.

Weex

Simple Setup

No passphrase required. Streamlined API creation process.

OKX API Setup - Complete Guide

Follow these steps to create API keys on OKX and connect them to your trading bot. Make sure you have completed your OKX account verification before starting.

Before You Start

Please make sure you complete your OKX account verification. OKX allows API key creation only for accounts that have completed KYC verification. If you haven't completed verification, kindly go back to OKX and complete it first.

1

Navigate to API Management

  1. Log into your OKX account at www.okx.com
  2. Click your profile icon in the top right corner
  3. Select "API" from the dropdown menu
  4. You'll be redirected to the API Management page
Bitget API Keys Section
2

Create API Key with Correct Permissions

  1. Click the "Create API" button
  2. Choose "V5 API" (not legacy V3)
  3. Enter a name for your API key (e.g., "TradingBot")
  4. Create a strong passphrase and save it immediately
  5. Set the following permissions:
  6. Bitget API Keys Section

REQUIRED Permissions

Read
Trade
Futures Trading

DISABLE These

Withdraw
Transfer
Important: Make sure you select "Futures Trading" permission if you're using a futures trading bot. The bot won't work with only spot trading permissions.
3

Save Your API Credentials

CRITICAL: Save these NOW - You won't see them again!

After clicking "Confirm", OKX will display:
1. API Key (Public key)
2. Secret Key (Private key - shown ONLY ONCE)
3. Passphrase (What you just created)

Copy all three to a secure location immediately!
Your OKX API Information
API Key: your_okx_api_key_here Secret Key: your_secret_key_here Passphrase: your_passphrase_here # Save these securely - Secret key shown only once!
4

Connect to Discord Trading Bot

  1. Join the Discord server where the bot is installed
  2. Navigate to the setup channel (usually named "setup" or "api-setup")
  3. Type the setup command: !setup
  4. Follow the bot's prompts to enter your API credentials
  5. Select OKX as your exchange when prompted

Discord Bot Commands

!setup
Start the API setup wizard
!test-api
Test your API connection
!balance
Check your account balance
!help
Show all available commands
Success! Once connected, you'll receive confirmation that your OKX API keys have been validated and stored securely. The bot is now ready to trade on your behalf.

KuCoin API Setup - Complete Guide

Follow these steps to create Futures API keys on KuCoin and connect them to your trading bot. Note: KuCoin has separate APIs for Spot and Futures trading.

Important Note

KuCoin requires separate API keys for Spot and Futures trading. Make sure you create a Futures API key for trading bot integration. Also ensure your account verification is complete.

1

Access API Management

  1. Log into your KuCoin account at www.kucoin.com
  2. Click your profile icon in the top right
  3. Go to "API Management"
  4. Click "Create API"
Pro Tip: KuCoin has two API sections - one for Spot and one for Futures. Make sure you're in the Futures API section if your bot trades futures.
2

Create Futures API Key

  1. Select "Futures API" tab
  2. Click "Create API"
  3. Enter API name (e.g., "FuturesBot")
  4. Create and save a strong passphrase
  5. Enable these permissions:

REQUIRED Permissions

General
Futures Trading
Trade

Security Best Practice

Withdraw
Transfer

Never enable withdrawal permissions for trading bots

3

Save Your KuCoin API Keys

⚠️ CRITICAL: Save Immediately!

KuCoin will show three pieces of information only once:
1. API Key (Public identifier)
2. Secret Key (Private key - NEVER shown again)
3. Passphrase (Your chosen password)

Copy all three to a password manager or secure file!
KuCoin API Credentials Format
API Key: your_kucoin_api_key Secret Key: your_kucoin_secret_key Passphrase: your_kucoin_passphrase # Store securely - KuCoin shows Secret Key only once!
4

Connect to Discord Bot

  1. In your Discord server, go to the bot setup channel
  2. Type !setup and press Enter
  3. Select KuCoin when asked for exchange
  4. Enter your API credentials when prompted
  5. Wait for confirmation message
Connection Successful! Your KuCoin futures account is now connected to the trading bot. Test with a small amount first to ensure everything works correctly.

BloFin API Setup - Complete Guide

BloFin is a professional trading platform. Follow these steps to create API keys. Note: BloFin does not have a demo mode.

Important Security Note

BloFin operates in production only (no demo mode). Start with very small position sizes ($10-20) when testing. Also, ensure your account is fully verified before API creation.

1

Navigate to API Settings

  1. Log into your BloFin account at www.blofin.com
  2. Click on your account profile
  3. Go to "API Management" or "Developer Settings"
  4. Click "Create API Key"
2

Create and Configure API Key

  1. Enter a descriptive name for your API key
  2. Create a strong passphrase (save it!)
  3. Enable the following permissions:

Required Settings

Read Access
Trade Access
Futures Trading

Security Settings

Withdraw Funds
Transfer Funds

These should always remain disabled

3

Save BloFin API Credentials

⚠️ IMMEDIATE ACTION REQUIRED

After creating the API key, BloFin will display:
API Key
Secret Key (Shown ONLY ONCE)
Passphrase

Copy all three immediately to a secure location!
BloFin API Information
API Key: your_blofin_api_key Secret Key: your_blofin_secret_key Passphrase: your_blofin_passphrase # Secret key is shown only once - save it immediately!
4

Connect to Discord Bot

  1. Open Discord and navigate to your trading server
  2. Find the bot setup channel
  3. Type !setup and follow prompts
  4. Select BloFin as your exchange
  5. Enter your API credentials when asked
Testing Recommendation: Since BloFin has no demo mode, start with a very small position size ($10-20) to test the connection before trading with larger amounts.

Weex API Setup - Complete Guide

Weex has a simplified API setup process. Follow these steps to create API keys and connect to your trading bot.

Note: Weex uses a simplified authentication system - you only need API Key and Secret Key (no passphrase required).
1

Access API Management

  1. Log into your Weex account at www.weex.com
  2. Click on your account/profile icon
  3. Navigate to "API Settings" or "Developer"
  4. Click "Create New API Key"
2

Create API Key with Permissions

  1. Enter a name for your API key
  2. Enable the following permissions:

Required Permissions

Read
Trade
Futures Trading

Disable These

Withdraw
Transfer

For security, never enable withdrawal permissions

3

Save Weex API Keys

IMPORTANT: Save Immediately

Weex will display two pieces of information:
1. API Key (Public key)
2. Secret Key (Private key - shown ONLY ONCE)

Copy both keys to a secure location immediately!
Note: Weex does not use a passphrase, so you only need these two keys.
Weex API Credentials
API Key: your_weex_api_key Secret Key: your_weex_secret_key # Weex does not use passphrase - only these two keys required
4

Connect to Discord Bot

  1. In your Discord trading server, find the setup channel
  2. Type !setup and press Enter
  3. Select Weex as your exchange
  4. Enter your API Key and Secret Key when prompted
  5. Leave passphrase field blank (Weex doesn't use it)
Connection Successful! Your Weex account is now connected to the trading bot. You can test the connection with the !test-api command.

Frequently Asked Questions

What permissions should I enable for my API key?

For trading bots, you typically need:

  • Read - To see your account balance and positions
  • Trade - To execute buy/sell orders
  • Futures Trading - If your bot trades futures contracts

Never enable: Withdraw or Transfer permissions. This keeps your funds safe even if your API keys are compromised.

What should I do if I lose my API keys?

If you lose your API keys:

  1. Go to your exchange account → API Management
  2. Find the API key you lost
  3. Click "Delete" or "Revoke" to disable it
  4. Create a new API key following the same steps
  5. Update your trading bot with the new keys

This is why it's crucial to save your keys securely when you first create them.

Is it safe to give API keys to a trading bot?

Yes, with proper precautions:

  • API keys cannot withdraw funds unless you explicitly enable that permission (don't!)
  • They can only trade within the permissions you set
  • Start with small amounts to test
  • Use demo accounts first if available
  • Regularly monitor your account activity

Always treat API keys like passwords - keep them secure and never share them publicly.

Why isn't my bot connecting even with correct API keys?

Common issues and solutions:

  • Wrong permissions: Make sure "Futures Trading" is enabled
  • IP restrictions: Check if your exchange account has IP whitelisting enabled
  • Key expiration: Some exchanges expire API keys after 90 days
  • Incorrect passphrase: Double-check your passphrase (case-sensitive)
  • Account verification: Ensure your exchange account is fully verified

If problems persist, delete the API key and create a new one.

Final Setup Checklist

Before You Start Trading

Security Best Practice: Even though API keys without withdrawal permissions are relatively safe, always monitor your account activity regularly and never share your API keys with anyone.

Need Help?

Additional Support Channels

If you encounter any issues during setup, you can get help through:

Note: There are video tutorials available in our Discord server for each exchange. If you face any problems during setup, join our community for step-by-step assistance.