OKX Error Codes
Client machine and server time are out of sync
- 50102 Timestamp request expired
This error occurs if the time on your PC differs from the time on the trading server. To solve this problem, you need to go to the Windows time settings and synchronize your time with the time zone. Time settings are located in the following path: Start → Options → Time and language → Date and time. Disable automatic transition to daylight saving time.
There is a problem with the API Secret Key
- 50113 Invalid signature
The error indicates that the API keys are not working correctly on the client or exchange side. Perhaps there was a typo when entering the keys. Make sure that the API key and API Secret were entered correctly, recreate the keys or try again later.
The notional volume must not be less than {x} or {y}$
- 51000 Parameter {param0} error
The error appears when the order amount is less than the minimum allowed.
The order price is too high or low (max. buy price {x}, min. sell price {y})
- 51006 Order price is not within the price limit (max buy price: {param0} min sell price: {param1})
The error occurs if you try to place a limit order for a futures contract far beyond the opposite side of the order book by a large percent. The notification includes the minimum price value.
Insufficient funds to place an order
- 51008 Order failed. Insufficient {param0} balance in account
The error occurs when attempting to submit an order (or several orders) in an amount exceeding the available balance.
Insufficient funds
- 51131 Insufficient balance
Insufficient funds on account balance.
The order price must not be higher than {x}
- 51137 The highest price limit for buy orders is {param0}
The error occurs if you try to place a limit order for a spot contract far beyond the opposite side of the order book by a large percent. The notification includes the price limit value.
Stop order declined
- 51278 SL trigger price cannot be lower than the last price
This error appears if you move the stop order to the opposite side of the spread.
Operation already in progress
- All operations failed
The error occurs when an operation is repeated while it is being performed already.
Cancelling the order failed because it was filled, cancelled or does not exist
- Order cancellation failed as the order has been filled, cancelled or does not exist
The error occurs when canceling an order that has already been executed or cancelled.
Account mode is set to "No Margin". Switch to an account mode that has permission to trade futures
- You can’t complete this request under your current account mode
This error occurs when attempting to place an order on futures when the No Margin account mode is enabled. To trade futures, switch the account mode that allows futures trading (Single Currency Margin or other).
Enable isolated margin mode for Pre-Market trading of futures contracts
- 54005 Switch to isolated margin mode to trade pre-market expiry futures
To trade pre-market futures, you need to enable the isolated margin mode in the futures trading settings in your OKX account.
Current IP address has no associated API keys
- 50035 This endpoint requires that APIKey must be bound to IP
The current IP address does not match the IP address set in the settings for these API keys. Change the IP address to the valid one or disable IP address restrictions in the API keys settings.
Invalid API keys, trusted IP address, or trading permissions
- 50110 Your IP {param0} is not included in your API key's IP whitelist
- 50119 API key doesn't exist
The error occurs in several cases:
- the current IP address does not match the IP address set in the settings for these API keys. Change the IP address to the valid one or disable IP address restrictions in the API keys settings.
- invalid API keys. Need to create new API keys.
Too many exchange requests. This IP address may be banned
- 50011 Requests too frequent
- 50040 Too frequent operations, please try again later
The error appears when the limit on the number of requests is exceeded. The IP address may be blocked from executing requests for some time.
The limit on placed orders has been exceeded
- 51005 Your order amount exceeds the max order amount
- 51025 Order count exceeds the limit
The message appears when the maximum number of submitted applications is reached.