Spot and margin have price limits as well: when a stable spot index exists, they're typically index-based; for new listings where the index is unavailable or unstable, they're typically based on the closing price, and that version only covers the first N minutes after listing, after which there is no price limit. Real-time parameter values are on the spot market info page. On top of that there's price protection: a buy order is fully cancelled if its estimated fill price is above best ask × 1.05, and a sell order if it's below best bid × 0.95.
Options limits are built around the mark price: highest buy price = option mark price + adjustment coefficient × max(0.004, 0.016 × abs(Delta)), and the lowest sell price is the same formula with the plus changed to a minus. The adjustment coefficient differs by crypto, and OKX may adjust it according to market conditions; the price also has to follow the smallest price unit.
Set it with the pxAmendType field when placing the order: 0 means the system may not amend the order price if px exceeds the price limit; 1 lets the system amend the price to the best available value within the limit. With 1, an out-of-range order goes on the book at a price that is no longer the px in your code, so check fills against the amended price.
Which order prices OKX futures reject outright
There are only two rejection conditions, one for each direction. A buy order priced above the highest price limit is rejected; a sell order priced below the lowest price limit is rejected.
OKX calculates both limits in real time for every instrument where the price limit is enabled. Price limit rules are a risk control OKX uses to prevent market manipulation and protect users. On the futures side they cover every USDT-margined, USDC-margined and crypto-margined contract, perpetual and expiry alike, and both opening and closing positions are limited.
So when this message comes up, the place to look is the price field: is this a buy or a sell, and how far is the order price from the index price?
How the highest and lowest price limits follow the index price
For perpetual and expiry futures, the two limits are calculated as in the table below, with different formulas for the first 10 minutes after a contract is generated and for the time after that.
| Phase | Highest price limit | Lowest price limit |
|---|---|---|
| Within 10 minutes of contract generation | Index × (1 + X) | Index × (1 − X) |
| 10 minutes after contract generation | Min[ Max(Index, Index × (1 + Y) + avg. premium in last N mins), Index × (1 + Z) ] | Max[ Min(Index, Index × (1 − Y) + avg. premium in last N mins), Index × (1 − Z) ] |
Index is the index price; each contract uses the index of its trading pair, so the BTCUSDT perpetual uses the BTC/USDT index and the BTCUSD perpetual uses the BTC/USD index. The average premium over the last N minutes shows how far the contract trades above or below the spot index: the platform samples at a fixed interval, and at each point takes the contract mid-price (the average of best ask and best bid) minus the spot index at the same moment to get a premium basis, then averages the bases over the last N minutes. The sampling interval is typically 200 milliseconds and may differ for certain pairs.
Break the after-10-minutes formula down and the highest price limit is squeezed between two lines: never below the index price, never above Index × (1 + Z). The lowest price limit works the same way: never above the index price, never below Index × (1 − Z). Where it lands between those two lines is decided by Y and the average premium. If the contract keeps trading above the index, the average premium is positive and both limits shift up together; if it keeps trading below, both shift down.
Expiry futures have one fixed value: in the 30 minutes before weekly futures are delivered, Z is fixed at 3%. If the index price is 100,000 at that point, the highest price limit can't go above 100,000 × (1 + 3%) = 103,000, and the lowest can't go below 100,000 × (1 − 3%) = 97,000; Y and the average premium still decide how narrow the range actually gets. Perpetuals have no delivery date, so this 3% never comes into play for them.
OKX publishes the real-time values of X, Y and Z, and the value of N, on its perpetual market info page. OKX says the two limits are calculated in real time from more than a dozen parameters, such as trading volume, open interest and the percentage of index deviation, and that the full set of rules isn't completely disclosed, to preserve its risk control effect. The formulas in the table are enough to tell you which way to move your price, but not to work out the boundary to the last digit.
How to adjust a rejected order price so it goes through
If a buy order is rejected, move the order price down; if a sell order is rejected, move it up. Either way, you're moving toward the index price.
The range is calculated in real time. When the index and the average premium move, so do the boundaries, and the same price can give a different result from one attempt to the next. In a fast market, place the order as soon as you've changed the price rather than waiting on the confirmation screen.
Decide how you want it to fill before changing the price. A buy order moved to the best ask or higher fills against the sell side immediately and is charged the taker fee; to fill as a maker, the buy price has to be below the best ask. For a sell order, the same applies against the best bid.
For a newly listed contract, only the Index × (1 ± X) band applies during the first 10 minutes after it's generated; the average premium and Z play no part. A rejection in that window can only be checked against the index price and X.
Limit orders that close a position get rejected too
Closing a position is bound by the same two limits. Closing a long is a sell, so the order price can't be below the lowest price limit; closing a short is a buy, so the order price can't be above the highest price limit.
In a sharp drop, you might try to make sure a long gets closed by placing a limit sell far below the order book; that price may already be under the lowest price limit. The order is rejected, the long stays in your account untouched, and the price keeps falling. Closing a short with a limit buy far above the book during a sharp rise ends the same way. When you see a rejection, first check whether the position is still open, then move the price toward the index price and place it again.
