Skip to main content

How to Create an OKX API Key for Your Bot

This guide walks you through creating an OKX API key for automated trading and securing it for bot access.

Info

An API (Application Programming Interface) key is a unique code that allows your trading bot to access your exchange account and perform actions like placing orders or reading account balances. Treat your API keys like passwords and keep them secure.

Step-by-Step Guide to Create an OKX API Key

  1. Log into OKX: Access your OKX account and confirm your account meets trading requirements.

  2. Navigate to API Management:

    • Open your account profile.
    • Select the API section.
    • Click 'Create V5 API Key'.
  3. Configure Key Details:

    • Create a descriptive key name.
    • Set a secure passphrase.
    • Store your credentials safely.
  4. Configure API Key Permissions: Enable only the permissions your bot needs:

    • Trading capabilities.
    • Account information access.
    • Order management.
  5. Secure Your API Key:

    • Enable IP whitelisting.
    • Add your bot's IP address.
    • Set trading limits if available.
    • Ensure withdrawal permissions are disabled.
  6. Finalize API Key Creation:

    • Review all permissions.
    • Verify security settings.
    • Complete 2FA (Two-Factor Authentication) verification.
    • Store your API key, secret key, and passphrase securely.

OKX API key creation interface with trading permissions configuration

Access your API settings directly through OKX API Management.

A properly configured API key supports reliable automated trading. Review API settings regularly, and never share your API credentials.

Ready to Start Automated Trading on OKX?

Explore our OKX Trading Bot features for automated strategies.