Skip to main content

How to Create an OKX API Key for Your Bot

This guide walks you through creating an API key on OKX for automated trading. Follow these steps to ensure secure and efficient bot operation on your account.

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 verify that your account meets all trading requirements.

  2. Navigate to API Management: Follow these steps:

    • Open your account profile.
    • Select the API section.
    • Click 'Create V5 API Key'. This action initiates the creation of your bot's access credentials.
  3. Configure Key Details: Set up these components:

    • Create a descriptive key name.
    • Set a secure passphrase.
    • Store your credentials safely. The passphrase adds an extra layer of security.
  4. Configure API Key Permissions: Enable these essential permissions:

    • Trading capabilities.
    • Account information access.
    • Order management. Keep permissions minimal for optimal security.
  5. Secure Your API Key: Implement these security measures:

    • Enable IP whitelisting.
    • Add your bot's IP address.
    • Set trading limits if available.
    • Ensure withdrawal permissions are disabled. These steps help prevent unauthorized access.
  6. Finalize API Key Creation: Complete the setup process:

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

OKX API key creation interface with trading permissions configuration

Access your API settings directly through OKX API Management.

A properly configured API key ensures reliable automated trading operations. Regular reviews of your API settings help maintain account security. Remember to never share your API credentials and always use secure channels when setting up your trading bot.

Ready to Start Automated Trading on OKX?​

Transform your trading approach with automated strategies designed for OKX. Explore our OKX Trading Bot features for optimal performance.