How to Create API Keys on OKX

·

Introduction

API keys are essential for connecting third-party applications like trading bots to your OKX account securely. This step-by-step guide walks you through generating API keys on OKX while optimizing security and functionality.


Step 1: Access Sub-Accounts

Navigate to your OKX profile and select Sub-Accounts.
👉 Learn more about OKX sub-accounts

Best Practice:


Step 2: Create a Sub-Account

Click Create Sub-Account and configure:

  1. Name: Assign a clear label (e.g., "Robuxio_Trading").
  2. Type: Select Standard Sub-account.
  3. Trading Settings:

    • Account Mode: Enable Spot and Futures.
    • Position Mode: Set to One-way.

Step 3: Generate API Keys

  1. Under Actions, choose Manage API > Create API.
  2. Configure API settings:

    • Name: e.g., "Robuxio_Integration".
    • Linked Sub-Account: Select the one created earlier.
    • Purpose: Pick Linking third-party app.
    • Permissions: Grant trade access.
    • Passphrase: Create a secure phrase (store it privately).

Step 4: Retrieve and Secure Keys


Step 5: Connect to Robuxio

  1. Log in to Robuxio’s platform.
  2. Navigate to Profile > Add Exchange.
  3. Select OKX, input the API credentials, and validate.

Step 6: Validation and Funding


FAQs

Why use a sub-account for API keys?

Sub-accounts limit risk by isolating third-party tool activities from your main account’s funds.

What permissions are needed for trading bots?

Enable trade access but restrict withdrawals for security.

How often should I rotate API keys?

Refresh keys every 3–6 months or if compromised.


Conclusion

Follow these steps to securely integrate OKX with Robuxio or similar platforms. For advanced strategies:
👉 Explore OKX API documentation