How to Get Crypto API Keys

Step-by-step guide for all major exchanges

Supported Exchanges

Binance
Coinbase
Kraken
KuCoin
Bybit
OKX
Gate.io
Bitget

General Steps (Same for Most Exchanges)

Step 1: Create an Account

Sign up for an exchange account and complete identity verification (KYC) if required.

Step 2: Go to API Management

Find the "API" or "API Management" section in your account settings. Usually under Security or Account settings.

Step 3: Generate API Key

Click "Create API Key" or "Generate New Key". Give it a descriptive name (e.g., "Trading Bot").

Step 4: Set Permissions

  • Read-Only: View balances and market data
  • Trading: Place buy/sell orders
  • Withdrawal: Transfer funds (usually requires extra security)

Step 5: Secure Your Key

Copy your API Key and Secret immediately. The secret is only shown once!

⚠️ Security Best Practices

  • Never share your API Secret
  • Enable IP whitelisting if available
  • Use read-only keys for viewing data
  • Rotate keys periodically
  • Don't embed keys in frontend code
  • Use environment variables to store keys

Binance API Key Guide

  1. Log into Binance and go to Account → API Management
  2. Click "Create API" and enter a label
  3. Complete security verification (email/2FA)
  4. Copy your API Key and Secret
  5. (Optional) Enable IP restriction
  6. Set permissions: Read-Only, Trading, or Withdrawal

Coinbase API Key Guide

  1. Go to Coinbase → Settings → API
  2. Click "New API Key"
  3. Select permissions: View, Trade, or Transfer
  4. Set API key name
  5. Copy API Key, Secret, and Passphrase

Environment Variable Setup

# .env file (add to .gitignore!)
BINANCE_API_KEY=your_api_key_here
BINANCE_API_SECRET=your_api_secret_here

# In your code
import os
api_key = os.environ.get('BINANCE_API_KEY')