← 首页

OKX API keys with least privilege before connecting portfolio tools

Guides · 2026-10-13

An API key is a remote control for parts of your OKX account. If the secret leaks and withdraw is enabled, the blast radius is far larger than a read-only portfolio sync. OKX support documents how to create keys, set permissions, and restrict IPs. This guide walks through a conservative setup for international readers: name keys clearly, grant only what the tool needs, store secrets offline from chat, and revoke quickly when something changes. No performance claims—just operational hygiene.

Create the key from OKX security settings you opened yourself

Sign in via your bookmark or the official app, open API management, and create a new key there. Label it with the tool name and creation date so future you can revoke without guessing. Copy the secret once into a password manager; many flows show it only at creation. Ignore emails or chats that invite you to “finish API setup” on an unfamiliar page. If you did not start the creation flow, do not paste a secret anywhere.

Grant only the permissions the integration documentation truly needs

Portfolio dashboards often need read access alone. Trading automations need trade permissions but rarely need withdraw. Leave withdraw disabled unless you have a written reason and a second-person review. After saving, reopen the key details and confirm the permission list matches your intent. Broad “enable everything” requests from a random script are a reason to walk away, not to click along.

Add an IP allowlist when your host is stable

If OKX lets you bind the key to specific IPs, add only the servers that will call the API. Dynamic home IPs need a deliberate update process when they change. Test that calls from the allowlisted host succeed and that calls from another network fail. Convenience without an allowlist helps whoever steals the secret as much as it helps you.

Inventory, rotate, and revoke on a schedule

Keep a private inventory of key name, permissions, tool, and date. Rotate after staff changes, device loss, or library breach news. Revoke orphans instead of keeping them “for later.” If exposure is suspected, revoke first, then review API-related security logs described in OKX help. Support will not need your raw secret in a public channel to assist with revocation steps.

Risk boundary: OKX Trading Guide

Digital assets are volatile and derivatives can amplify losses. This website has no login, wallet connection, deposit form or customer-support chat. A referral link only records attribution; it does not guarantee access, pricing, rewards, approval or investment results. Availability can differ by residence, legal entity and product, so no regional access is assumed from language or branding alone.

Scenario checkpoint