Skip to content
Independent, unofficial guide. Not affiliated with or operated by Quantaira, Endotech or CoinZoom.

OKX API key deleted after 14 days: why it happens and how to fix it

API key safety checklist › error fixes

Quick answer: OKX automatically deletes API keys that aren't bound to an IP and have trade or withdrawal permission after 14 days of inactivity. Calls like checking the balance or placing orders count as activity. To fix it, create a new key with Read + Trade only and withdrawals off, bind it to your bot's IP addresses if the bot publishes them, and update the bot with the new key, secret and passphrase.

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

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.

Frequently asked questions

Why did my OKX API key disappear after 14 days?
OKX's API FAQ says API keys that aren't bound to an IP and have trade or withdrawal permissions are automatically deleted after 14 days of inactivity. If your key had no IP allowlist, had Trade turned on and wasn't used for two weeks, that rule is the likely reason.
What counts as activity for an OKX API key?
According to OKX, a key is not considered inactive if it is used to call private, account-related endpoints that require identity verification, such as viewing the account balance, billing data or placing orders.
Which OKX API keys do not expire?
OKX's FAQ says: "Only read-only API keys bound to an IP or specific permissions will not expire." A Trade or Withdraw key without an IP allowlist is the type covered by the 14-day rule.
Can I restore a deleted OKX API key?
OKX's FAQ doesn't describe a way to restore one. Create a new key (Read + Trade only, withdrawals off, IP allowlist if your bot has fixed IPs), then paste the new key, secret and passphrase into your bot.
Open now · invite-only

Pre-registration is open. Join with this referral link

Pre-registration is open and invite-only: you join through a member referral link. Use the Join Quantaira button to sign up.

After you join, you connect your own CoinZoom account. CoinZoom setup guide.

Pre-registration is open. Join with this referral link.

Join Quantaira

Pre-registration is open and invite-only. Use the referral link above to sign up.

After you join, you connect your own CoinZoom account. Setup guide.

How to join Quantaira safely