OKX API key deleted after 14 days: why it happens and how to fix it
API key safety checklist › error fixes
What OKX's rule says
Under "Will the API key expire?", the OKX API FAQ says:
API keys that aren't bound to IP and have transaction or withdrawal permissions will be automatically deleted after 14 days of inactivity. API keys will not be considered inactive if they are used to call private or account-related interfaces that require identity verification, such as viewing account balance, billing data, or placing orders. Only read-only API keys bound to an IP or specific permissions will not expire.
In plain terms:
- At risk: a key with Trade (or Withdraw) permission and no IP allowlist that goes 14 days without an authenticated call.
- Counts as activity: private calls such as checking the balance, reading billing data or placing orders.
- Does not expire: read-only keys bound to an IP (or with the specific permissions OKX refers to).
A typical case: you connect a bot, pause it for a few weeks, and when you switch it back on the connection fails and the key is no longer in your OKX API list.
How to fix it
- Check the API list. On the web, go to Profile › API and connections; in the app, Menu › API. If the key isn't listed, it was deleted.
- Create a new key. Give it a name, choose the account and what it is used for, add the IP allowlist, select permissions and set a passphrase. Write the passphrase down safely: OKX can't recover it, and a lost passphrase means creating another key.
- Turn on only what the bot needs. Read plus Trade. Leave Withdraw off. A trading bot places orders; it doesn't need to move funds off the exchange.
- Bind the bot's IP addresses if it publishes them. OKX allows up to 20 addresses per key. The 14-day rule in OKX's FAQ covers keys that aren't bound to an IP, and an allowlist also limits who can use the key if it leaks.
- Update the bot. Paste the new key, secret and passphrase into the bot's own connection screen only, never into a chat or a "support" message.
If your bot can't use an IP allowlist
Some third-party tools don't publish fixed IP addresses. OKX's own FAQ entry for error 50110 even suggests trying a trade key without an IP list when binding to third-party software fails. A key like that falls under the 14-day rule. Keep it in use (a bot that regularly checks the balance or places orders counts as active), or expect to create a new key after a long pause. Because an unbound key can be used from anywhere if it leaks, keep withdrawals off and use a separate key for each bot so you can delete one without breaking the others.
Deleted by the rule, or something else?
If the key was unbound, had Trade permission and sat unused for 14 days, the rule above explains it. If the key was IP-bound or in daily use and still vanished, treat it as a security question: review your recent account activity, change your password and contact OKX through its official help center. Nobody legitimate will ask for your API secret, passphrase or 2FA codes.
Related
- Crypto trading bot API key safety checklist
- OKX error 50119 "API key doesn't exist"
- What API key permissions does a crypto trading bot need?
- AI agent exchange API key safety checklist
- Connecting CoinZoom for Quantaira? CoinZoom setup guide
Source
- OKX API FAQ (Will the API key expire? · How do I create an API key? · What does Passphrase refer to? · error 50110)
Education only. This page never asks for your API keys, passwords or codes, and you should never share them with anyone. Not affiliated with OKX. Not financial advice. Facts last checked 2026-11-21 against OKX's API FAQ.