← 首页

OKX API keys: permissions, IP limits and secure storage for tools and bots

Guides · 2026-10-01

An API key lets outside software read your OKX account or even place orders on your behalf. That makes it useful for portfolio trackers, spreadsheets and trading bots, and also one of the quietest ways to lose funds if it is set up carelessly. A key with too many permissions, shared with a service you cannot vouch for or stored in an insecure place can be used without your noticing. This guide explains how to create keys with care, which permissions to enable, how to restrict them and how to review them regularly. Option names may change, so check the official help centre.

Begin with what the tool needs

Decide what the software will do before generating a key. A tracker that only reads balances and history needs read access and nothing else. A trading bot needs permission to place orders but almost never needs permission to withdraw. If a service insists on withdrawal rights without a convincing reason, do not use it. Check the current permission names in the OKX help centre, because labels can change.

Restrict and label every key

When the platform allows it, restrict the key to the IP address of the server where the tool runs, so a leaked key cannot be used from elsewhere. Create a separate key for each tool and give it a clear name that includes the tool and the date. If one key is compromised, you can delete it without disrupting the others.

Store the secret properly

The secret is usually shown only once. Keep it in a password manager or in a protected server configuration, never in chats, emails, screenshots in your photo gallery or shared documents. When asking for help online, never paste a key or secret. If you suspect exposure, delete the key in OKX immediately and create a new one.

Review every month

Once a month open the API management page and read the list. Remove keys for tools you no longer use, confirm that permissions are still minimal and compare account activity with what each tool should be doing. If you see an order you do not recognise, disable the key, change your password and contact official support through the app.

Risk boundary: OKX Switzerland 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