Back to DerivCC
OKX guide

How to create a read-only API key on OKX

Use this for live OKX swap position and balance context. OKX keys include an API key, secret, and passphrase.

Last updated: May 26, 2026

Before You Start

DerivCC only needs read permissions.

Leave trade, withdrawal, transfer, and account-management scopes off. If an exchange screen asks for write access, do not enable it for DerivCC.

Step-by-Step Setup

  1. 1Log in to OKX and open Profile > API and connections > Create API key. In the app, use Menu > API > Create API key.
  2. 2Enter an API key name, choose the account, and select the purpose.
  3. 3Add an IP allowlist if available for your deployment. OKX allows multiple IP addresses per key.
  4. 4Select read permissions only. Do not enable trade, withdrawal, transfer, or account-management permissions.
  5. 5Create and save the passphrase. OKX says the passphrase cannot be recovered if forgotten.
  6. 6Copy the API key, secret, and passphrase at creation time, then add all three inside Settings > API Keys.

Official References

Next Step

After creating the key, add it inside DerivCC under Settings, API Keys. Public market data still works without an exchange key.

Open API key settings