LootX

OKX Errors

new Updated September 30, 2026 This page as PDF

OKX error codes in LootX: API key, secret, and passphrase, IP whitelisting, clock sync, insufficient funds, and rate limits.

OKX reports errors through the code and msg fields: "0" means success, and a five-digit number means failure. Order responses have two levels: the top-level code is "1", while the real cause is deeper — in the code and text of the specific order. The terminal shows the text of that cause but not its number, so a rejected order looks like this: OKX error 1: Order failed. Insufficient USDT balance in account. Find the cause in the text after the colon.

An OKX key has three parts — API Key, API Secret, and Passphrase, and you can get any of them wrong. Codes 50… relate to the key, signature, and timestamp, 51… to orders, and 60… to logging into the private stream. See Error messages: how to read them for the general approach to error handling, and Exchange connections and API keys for key setup.

What the terminal explains itself

Situation Codes What you’ll see
Exchange rejected the key, secret, or passphrase 50111, 50105, 50113; on stream login — 60024, 60032, 60007 Card with the connection name: “…: exchange rejected the API key or secret — check them in connection settings”. Under Settings → Connections, the connection shows the tooltip “Exchange rejected the API key or secret”. The terminal retries about every 30 seconds
Bad signature on an order 50113 “Order rejected: invalid API key or secret”
Too many requests HTTP 429 “⚠ … rate limit exceeded (429), limited until 30.09.2026 12:01:00 UTC”. The terminal backs off on its own
Clock drift 50102; on stream login — 60004, 60006 Rejection is not treated as a key error, and the connection is not dropped. The terminal syncs time with OKX on every connection
Too many stream logins 60014 Nothing: the terminal reconnects after a pause and does not mark the key as invalid
Order no longer exists 51400, 51401, 51402, 51603 Nothing: the cancellation is considered complete — the order was filled or cancelled earlier
Not enough coins when selling on spot 51008 The terminal retries the sell with the volume reduced by the fee amount. If it doesn’t help, it shows the exchange text
Exchange suspended API trading for this coin by keywords in the response “API trading is unavailable for this coin — exchange restriction”

Code 50110 — IP not on the key’s whitelist — is not treated by the terminal as a key error itself: the key is valid, only the IP restriction is in the way. But if this rejection comes during connection, you’ll still see the generic key card — it appears on any authorization failure except clock drift.

OKX does not report how many requests are left before the limit. So the terminal keeps its own count and throttles request frequency itself.

Common codes

Code What it looks like Cause What to do
50111 Card “exchange rejected the API key or secret” The key is invalid or deleted Check the key on the OKX website and paste it again into API Key
50105 Same card Incorrect passphrase Enter the passphrase you set when creating the key — see Exchange rejected the key
50113 Card or “Order rejected: invalid API key or secret” Signature mismatch: the secret does not match the key Paste the API Secret again
50110 Key card or exchange text in the order message: “…not included in your API key’s IP whitelist” The request came from an IP that is not on the key’s list Add the IP to the key’s list — see IP not on the key’s list
60024 Key card On private stream login: incorrect passphrase Same as 50105
60032 Key card On stream login: no such key Same as 50111
60007 Key card On stream login: signature mismatch Same as 50113
50102 Exchange text in the order message: “Timestamp request expired” Your computer’s clock has drifted from the exchange, most often after waking from sleep Reconnect OKX — the terminal resyncs time on connect. If it repeats, enable time sync in Windows
60004, 60006 Usually nothing Same on stream login The terminal reconnects on its own
60014 Nothing Too many private stream logins Nothing: the terminal waits and retries
HTTP 429 “rate limit exceeded (429), limited until …” Rate limit exceeded Wait until the specified time, close extra windows with OKX
51008 Exchange text in the order message: “OKX error 1: Order failed. Insufficient … in account” Not enough funds or margin in the trading account See Not enough funds
51400, 51401, 51402 Nothing The order being cancelled was already filled, cancelled, or not found No action needed
51603 Nothing Order not found No action needed

How to fix common issues

Exchange rejected the key

Check that the key exists

Open API management in your OKX profile. If the key is not in the list, it was deleted — create a new one.

Copy the key and secret again

OKX shows the secret only when you create the key. If it wasn’t saved, create a new key. In Settings → Connections, paste the values into API Key and API Secret without surrounding spaces.

Check the passphrase

The Passphrase is the password you chose yourself when creating the key, not your OKX account password. It cannot be recovered: if forgotten, create a new key.

Check key permissions

For trading, the key must have trading permission enabled, not just read.

After fixing the issue, the terminal reconnects on its own on the next attempt.

IP not on the key’s list

Code 50110 means the key is tied to an IP whitelist and the request came from a different IP. Open the key in API management on the OKX website and add your computer’s external IP. If the connection goes through a proxy (Proxy section in the connection card), add the proxy address instead: OKX sees exactly that. A dynamic IP on a home connection changes, and the rejection will return — in that case, a proxy with a static address is more convenient.

Not enough funds

OKX has two main accounts: funding and trading. You can only trade with what is in the trading account. If you topped up OKX and orders are rejected with 51008, transfer funds from the funding account to the trading account on the exchange website.

Other common causes:

  • funds are locked by open orders — cancel the extra ones;
  • on futures, margin is insufficient at the current leverage — reduce the volume or leverage;
  • when selling the entire balance on spot, some coins went to fees. The terminal retries the sell with a slightly smaller volume, and after that the wallet may keep “dust” smaller than the volume step.

Long/short position mode

LootX works with futures positions in one-way mode: one position per coin, buying increases it, selling decreases it. If your OKX trading settings have separate long and short positions, the exchange will reject the terminal’s orders. Switch the position mode to buy/sell (one-way) in the trading settings on the OKX website.

Next steps

FAQ

What does “OKX error 1” mean in an order message?
One is a generic code for a failed order on OKX. The actual reason is the text after the colon, such as insufficient funds.
What passphrase do I enter for OKX?
The one you set when creating the API key—it’s not your account password. If you’ve forgotten it, create a new key.
Why does OKX say I don’t have enough funds when I do have money on the exchange?
Most likely, the funds are in your funding account. To trade, transfer them to your trading account on the OKX website.