NAV
Java Python Go C++

Upcoming Changes

2026-08-20

WebSocket Orders Channel: Push Behavior Adjustment

To help clients more clearly determine the final status of post-only new orders (including mmp_and_post_only) and rpi new orders β€” and to avoid scenarios where an order is still canceled after the client has already received a state: live event β€” OKX has adjusted the state: live event behavior for post-only and rpi orders in the Order channel.

Impact details

Scenario Before After
post-only order placement failure
(price crosses the BBO
and is canceled)
state: live β†’ state: canceled Only state: canceled (no state: live)
post-only order placed successfully state: live pushed immediately state: live (delayed ~1 ms)
post-only order placed successfully,
then filled by one taker order
state: live β†’ state: filled state: live (delayed ~1 ms) β†’ state: filled
post-only order placed successfully,
then filled by multiple partial fills
state: live β†’ state: partially_filled β†’ state: filled state: live (delayed ~1 ms) β†’ state: partially_filled β†’ state: filled
post-only order with reduceOnly: true,
size modified
state: live β†’ state: live (amendSource: 4, amendResult: 0) state: live (amendSource: 4, amendResult: 0) β†’ state: live
rpi order, rpiPxRound: false,
order placement failure
(canceled due to not meeting the price spacing rule)
N/A Only state: canceled (no state: live)
rpi order, rpiPxRound: true,
and price is modified
N/A state: live (amendSource: 6, amendResult: 0) β†’ state: live

Effective date

Scope of impact

The order types affected are: post_only, mmp_and_post_only, and rpi (Retail Price Improvement).

The push behavior for other order types β€” such as limit (regular limit orders), market (market orders), ioc, and fok β€” remains unchanged.

2026-08-20

Affiliate API documentation clarification

The Affiliate API documentation on the EEA site has been updated to clarify the data coverage and metric definitions under the CPS and TVB incentive models.

Incentive model and data scope

Metric definitions

TVB endpoint descriptions

2026-08-18

RPI maker minimum notional amount

RPI maker orders (ordType: rpi or elp) are now subject to a minimum notional amount. Orders below the threshold are rejected with error code 54051. Effective in production from August 18, 2026.

Minimum thresholds by product type

Product type Minimum notional amount
SWAP / FUTURES 10,000 USD
SPOT 1,000 USD
EVENTS Not applicable

This rule is independent of the existing per-instrument minSz check β€” RPI orders must satisfy both.

Place order

An RPI order whose notional amount is below the applicable threshold is rejected with 54051. In batch requests, each sub-order is validated independently β€” a failing sub-order returns its own sCode: 54051; other sub-orders are unaffected.

Non-RPI orders (including taker orders with rpiTakerAccess: true) are not subject to this rule.

Amend order

In batch amend requests, each sub-order is validated independently β€” same behavior as single amend.

Existing orders

RPI orders already on the book before this rule takes effect are not affected. Validation applies only to new place and amend requests submitted after go-live.

Error code

New error code introduced:

Error Code Message
54051 RPI order rejected. The order value is below the minimum required for RPI orders ({param0} USD).

Applies to all REST and WebSocket trade operations:

2026-08-14

Affiliate REST API alignment with the EEA affiliate program

The Affiliate endpoints on the EEA site have been updated for the EEA affiliate program.

Remove endpoints

Settlement currency change

Regional commission eligibility

2026-08-11

RPI maker spacing and visibility rule update

The RPI maker spacing rule now references only the first visible opposite-side RPI; hidden RPI are excluded from its cross and price-level checks. RPI visibility also governs the tradeable RPI depth shown on the books-rpi order book. No endpoint, parameter, enum value, or error code changes.

Spacing rule

Visibility

Amend

Affects RPI maker order placement and amendment (ordType: rpi), and the books-rpi order book:

2026-08-06

Get historical market data maximum query range reduced

The maximum query range on Get historical market data has been reduced from 20 to 10.

Parameter Type Description
begin String Maximum range: 10 days for daily, 10 months for monthly (previously 20 days / 20 months).

2026-08-03

Affiliate invitee endpoints add UID and join-time filters and rolling-window volume

Parameter Type Required Description
uid String No External user UIDs for exact match. Single UID or up to 100 UIDs, comma-separated. Unknown UIDs are silently skipped; if none resolve, an empty page is returned.
joinTimeBegin String Conditional Filter lower bound on joinTime, Unix timestamp in millisecond format, inclusive. Required together with joinTimeEnd; span up to 90 days, not earlier than 180 days ago.
joinTimeEnd String Conditional Filter upper bound on joinTime, Unix timestamp in millisecond format, inclusive. Required together with joinTimeBegin.
Parameter Type Description
periodType (request) String Stats window for volPeriod: last_7d, last_30d, this_month, last_month, total, today, this_week. When omitted, volPeriod is not returned.
volPeriod (response) String Trading volume within the selected periodType window, unit in USDT. Only returned when periodType is supplied. 0 if the user has not traded in the window.

2026-07-28

Rebranding ELP to RPI (Retail Price Improvement) Program

OKX is rebranding Enhanced Liquidity Program (ELP) to Retail Price Improvement (RPI). This includes a new consolidated RPI order book (books-rpi) over WebSocket and REST, a renamed rpi maker order type (replacing elp), an expanded rpiTakerAccess order parameter (replacing isElpTakerAccess), a new rpiPxRound parameter for the RPI maker spacing rule, and renamed rpi/rpiMaker account fields.

ELP name deprecation deadline: October 31, 2026

OKX will run the ELP and RPI names in parallel until this date, in two distinct ways:

Existing integrations continue to operate without changes. The ELP names will be retired after the sunset date above β€” migrate every integration to the RPI names before then.

New consolidated order book: books-rpi (WS + REST)

Each asks/bids element is [price, totalQty, nonRpiQty, count] β€” totalQty is the total depth at that price level, nonRpiQty is the organic-only portion, count is the aggregated order count at that level.

REST request: instId (required), sz (depth per side, max 400, default 1).

Taker parameter: rpiTakerAccess (replaces isElpTakerAccess)

Applies to place / amend, REST + WS:

Parameter Type Required Description
rpiTakerAccess Boolean No Default false.
When true, the order can access RPI liquidity, for all standard order types (previously ioc only).
A speedbump mechanism applies to all ordType, including post_only, on both placement and amend when rpiTakerAccess is true.
Not inherited on amend β€” must be re-specified on each amend request (omitted = false for that amend).

Maker order type: rpi (replaces elp)

Applies to place, REST + WS:

Maker parameter: rpiPxRound

Applies to place / amend, REST + WS (same interfaces as rpiTakerAccess above).

Parameter Type Required Description
rpiPxRound Boolean No Default false. When true, a price that violates the spacing rule is auto-rounded outward to the nearest placeable, non-crossing level instead of being rejected.

RPI maker spacing rule

RPI maker orders are subject to a spacing rule (rpiMinLevel / rpiMinPxBand below). An order that violates it is rejected unless rpiPxRound is true, in which case the price is auto-rounded to the nearest compliant level instead (see rpiPxRound above).

Parameter Type Description
rpiMinLevel String Minimum spacing between the RPI bid and RPI ask, in organic price levels. Default 4; 0 for Event Contracts.
rpiMinPxBand String Minimum distance from the opposite-side organic best price required to satisfy the spacing rule, in basis points (bps), e.g. 20.

RPI maker permission field: rpi (replaces elp)

Parameter Type Description
rpi String RPI maker permission.
0: not enabled for this instrument
1: enabled, but the current user has no permission to place RPI orders
2: enabled and permitted
A 1/2 value does not imply RPI liquidity is present.

RPI maker fee rate field: rpiMaker (replaces elpMaker)

Parameter Type Description
rpiMaker String RPI maker effective fee rate. Returns "" if RPI is not applicable to the instrument.

Trade source field: source

Error code changes

Error messages updated from ELP to RPI:

Error Code Previous Message Updated Message
54039 ELP orders can't be reduce-only orders. RPI orders can't be reduce-only orders.
54040 ELP orders can't be used with TP/SL settings. RPI orders can't be used with TP/SL settings.
54041 ELP orders aren't supported for {param0}. RPI orders aren't supported for {param0}.
54042 You don't have permission to place ELP orders for {param0}. You don't have permission to place RPI orders for {param0}.
54043 You can only place up to {param1} ELP orders for {param0}. You can only place up to {param1} RPI orders for {param0}.
54044 ELP is not enabled for {param0}. You can't place orders that take ELP liquidity of it. RPI is not enabled for {param0}. You can't place orders that take RPI liquidity of it.
54046 You can't place orders to take ELP liquidity. You can't place orders to take RPI liquidity.
54049 API users can't place orders that take ELP liquidity now because system is busy. To proceed, set isElpTakerAccess:false. API users can't place orders that take RPI liquidity now because system is busy. To proceed, set rpiTakerAccess:false.

Deprecated error code:

Error Code Message Reason
54045 OpenAPI users can only place IOC orders that take ELP liquidity. Retired β€” rpiTakerAccess now applies to all order types, not IOC-only.

2026-07-27

Four new Affiliate REST API endpoints under /api/v5/affiliate/tvb/* extend Trading Volume Bonus (TVB) reporting beyond the aggregated performance summary β€” a per-fee-tier bonus breakdown, a paginated invitee list, a single-invitee detail lookup, and a per-link performance list. All amounts are settled in USDC.

2026-07-20

TVB (Trading Volume Bonus) affiliate performance endpoint

A new Affiliate REST API endpoint under /api/v5/affiliate/tvb/* reports Trading Volume Bonus (TVB) performance β€” accrued bonus, valid and eligible trading volume, valid/eligible trader and invitee counts, deposits, first-time trader/depositor counts, and the affiliate bonus multiplier over a selectable stats window. Bonus is settled in USDC.

Add new endpoint

2026-07-06

Affiliate REST API expansion

The following Affiliate endpoints, already available on the Global site, are now live on the EEA site. The invitee's detail endpoint also gains two new response parameters and an updated rate limit.

Add new endpoint

Add new response parameter

Parameter Type Description
wdAmt String Accumulated amount of withdrawal in USDT. If user has not withdrawn, 0 will be returned.
totalVol String Lifetime accumulated trading volume in USDT. If user has not traded, 0 will be returned.

Rate limit change

2026-06-30

Price limit XYZ parameters for instruments

Parameter Type Description
initPxLmtPct String Initial price-limit band applied during the first 10 minutes after contract listing, e.g. 0.05 represents 5%. Use GET /api/v5/public/price-limit for the computed price limits.
Only applicable to SPOT/MARGIN/SWAP/FUTURES, returns "" for OPTION and EVENTS.
floatPxLmtPct String Floating price-limit band during normal trading, e.g. 0.03 represents 3%. Use GET /api/v5/public/price-limit for the computed price limits.
Only applicable to SPOT/MARGIN/SWAP/FUTURES, returns "" for OPTION and EVENTS.
maxPxLmtPct String Maximum price-limit cap (hard ceiling on order-price deviation from the index price), e.g. 0.15 represents 15%. Use GET /api/v5/public/price-limit for the computed price limits.
Only applicable to SPOT/MARGIN/SWAP/FUTURES, returns "" for OPTION and EVENTS.

2026-06-23

Deprecation of checksum field in order book channels

To improve the efficiency and stability of the market data feed, the following order book channels have deprecated the checksum field in both snapshot and incremental updates. The checksum field is still present in snapshot and incremental updates, but its value is fixed to 0 and must no longer be used for integrity verification. Please use seqId/prevSeqId to verify the data continuity and accuracy.

Note:
1. books5 and bbo-tbt channels do not carry a checksum field and are not affected by this change.
2. The WebSocket connection now fully enforces TLS (wss://), providing protection against eavesdropping and tampering, and ensuring data integrity. Together with rigorous validation of seqId and prevSeqId, it effectively prevents out-of-order messages, partial data loss, or malicious injection, providing integrity protection equivalent to or stronger than the original checksum mechanism.

2026-05-26

Error Code HTTP Status Code Error Message
54092 200 Action Required: Please accept the TradFi Perps disclaimer on Web or App by attempting to place a TradFi Perp trade via the frontend. Each account, including sub-accounts, must separately accept the disclaimer before API trading is enabled

2026-05-07

New Endpoints

Request Parameters

Parameter Type Required Description
type String Yes Direction of adjustment.
increase: add to balance
reduce: deduct from balance
One direction per request; increase and reduce cannot be mixed.
adjustments Array Yes List of currency adjustments. At least one item required. Duplicate currencies are not allowed.
> ccy String Yes Currency. Supported values: BTC ETH USDT OKB
> amt String Yes Adjustment amount. Must be non-negative. Decimal places must not exceed the precision defined for the currency.
Increase limits per request: BTC: 1, ETH: 1, USDT: 5000, OKB: 100.
Reduce has no per-request amount limit β€” only constrained by available balance β‰₯ 0.

Response Parameters

Parameter Type Description
remainCnt String Remaining daily increase quota. Also returned for reduce requests, but reduce does not consume quota.
totalCnt String Total daily increase quota (default: 3).
details Array Per-currency operation details.
> ccy String Currency.
> amt String Adjustment amount applied.
> bal String Post-operation balance for this currency.

Error Codes

Error code HTTP status code Error message
59691 200 Daily increase limit reached {param0}. Please retry after UTC 0:00 or reset your demo account.
59692 200 Insufficient {param0} balance. Balance cannot go below zero after operation.
59693 200 {param0} transferable balance insufficient. Some funds are occupied by open orders or positions. Please cancel orders or close positions and try again.

2026-05-06

Changes to Existing Endpoints

Request Parameters

Parameter Type Required Description
slippagePct String No Maximum acceptable slippage for spot and spot margin market-side orders, where tgtCcy is the received currency (base_ccy for buy, quote_ccy for sell).
Range: 0 to 0.05 (0% to 5%, inclusive). Up to 2 decimal places of the percentage, e.g., 0.01 (1%) and 0.0123 (1.23%) are accepted; 0.01234 (1.234%) is rejected.
If not specified or empty, defaults to 0.00%.
Slippage cannot be modified on an existing order. Cancel and resubmit to change the slippage setting.
Only applicable to SPOT and SPOT margin market orders.

Error Codes

Error code HTTP status code Error message
54084 200 Your slippage setting must be between 0% and 5% (inclusive).
54085 200 Your slippage percentage can't exceed 2 decimal places.

Response Parameters

Parameter Type Description
state String Instrument status
post_only: only post-only orders are accepted; existing post-only orders can be amended and cancelled. Other order types (market, IOC, FOK, normal limit) are rejected. Only applicable to SWAP

2026-04-14

OKX launches perpetual-style expiry futures (X-Perps)

2026-04-07

Trading Fee Tier Requirement Changes

Endpoint or Channel Before After (Current) Error Code Change
SBE trades channel and books-l2-tbt channel >= VIP6 >= VIP4 64003 unchanged
JSON books-l2-tbt channel >= VIP6 >= VIP4 60029 β†’ 64003
JSON books50-l2-tbt channel >= VIP5 >= VIP4 60030 β†’ 64003
JSON fills channel >= VIP6 >= VIP4 60029 β†’ 64003

Deprecate instId Request Parameter in WS Order Operation Channels

To reduce latency in WS order operations, the instId request parameter from the following order operation channels has been deprecated.

Request Parameters

Parameter Type Required Description
instId String - Instrument ID
Deprecated, will be ignored

Note: You can use the Get instruments endpoint to map instIdCode to instId.

KYC Level 2 Required for Placing Orders

OKX will require users to complete KYC Level 2 or above in order to place orders via WebSocket and REST API endpoints. Users who have not completed KYC Level 2 will receive error code 59113 when attempting to place orders. This requirement applies to live trading only β€” demo trading is not affected.

Affected Endpoints

Endpoint or Channel Description
WS / Place order Place a single order
WS / Place multiple orders Place orders in batch
POST / Place order Place a single order
POST / Place multiple orders Place orders in batch

Error Code

Error Code Description
59113 KYC level 2 or above is required for placing orders

Notes:

Bills Management Updates

Request parameters

Parameter Type Required Description
type String No Bill type
Please refer to Get bill types for the list of available types

2026-03-26

Request Parameters

Parameter Type Required Description
instId String - Instrument ID
Delisted. Any value provided will be ignored.

Note: Users can use the Get instruments interface to map instIdCode to instId.

2026-02-12

Parameter Type Description
instCategory String The category of the instrument’s base currency (the first part of the instrument ID). For example, for BTC-USDT-SWAP, the instCategory refers to the category of BTC.
1: Crypto

2025-12-15

2025-11-20

Request Parameter Name Type Required Description
> instIdCode Integer Conditional Instrument ID code.
If both instId and instIdCode are provided, instIdCode takes precedence.
> instId String Conditional Instrument ID
Will be deprecated on March 2026.

Note: You can use the Get instruments interface to map instIdCode to instId.

2025-08-27

Fiat buy/sell is supported.

2025-07-24

Parameter Type Required Description
toAddrType String No Address type
1: wallet address, email, phone, or login account name
2: UID (only applicable for dest=3)

2025-07-08

Open API supports Unified USD Orderbook

For more details, please refer to Unified USD Orderbook FAQ

Parameter Type Required Description
tradeQuoteCcy String No The quote currency used for trading. Only applicable to SPOT.
The default value is the quote currency of the instId, for example: for BTC-USD, the default is USD.
Parameter Type Description
tradeQuoteCcyList Array of strings List of quote currencies available for trading, e.g. ["USD", "USDC"].
Parameter Type Description
tradeQuoteCcy String The quote currency used for trading.

Trades channel adds seqId field

Parameter Type Description
data Array Subscribed data
> seqId Integer Sequence ID of the current message.

Note: The seqId may be the same for different trade updates that occur at the same time.

Fiat

Fiat deposits and withdrawals are supported.

2025-07-02

Before

Parameter Type Required Description
after String No Pagination of data to return records earlier than the requested ts, Unix timestamp format in milliseconds, e.g. 1597026383085
before String No Pagination of data to return records newer than the requested ts, Unix timestamp format in milliseconds, e.g. 1597026383085

After

Parameter Type Required Description
after String No Pagination of data to return records earlier than the requested ts or billId, Unix timestamp format in milliseconds, e.g. 1597026383085
before String No Pagination of data to return records newer than the requested ts or billId, Unix timestamp format in milliseconds, e.g. 1597026383085
pagingType String No PagingType
1: Timestamp of the bill record
2: Bill ID of the bill record
The default is 1
Parameter Type Description
notes String Notes

2025-05-28

2025-04-17

Error code Error Message
59515 You are currently not on the custody whitelist. Please contact customer service for assistance.
59516 Please create the Copper custody funding account first.
59517 Please create the Komainu custody funding account first.
59518 You can’t create a sub-account using the API; please use the app or web.
59519 You can’t use this function/feature while it's frozen, due to: {freezereason}

2025-02-12

Parameter Type Description
notionalUsdForBorrow String Notional value for Borrow in USD
Applicable to Spot mode/Multi-currency margin/Portfolio margin
notionalUsdForSwap String Notional value of positions for Perpetual Futures in USD
Applicable to Multi-currency margin/Portfolio margin
notionalUsdForFutures String Notional value of positions for Expiry Futures in USD
Applicable to Multi-currency margin/Portfolio margin
notionalUsdForOption String Notional value of positions for Option in USD
Applicable to Spot mode/Multi-currency margin/Portfolio margin

2025-01-14

Withdrawal API adjustment for EEA entity users

Due to compliance requirements, EEA entity users need to pass in the field rcvrInfo when making on-chain/lightning withdrawal.

Parameters Type Required Description
rcvrInfo Object Conditional Recipient information
For the specific entity users to do on-chain withdrawal/lightning withdrawal, this information is required.
> walletType String Yes Wallet Type
exchange: Withdraw to exchange wallet
If withdrawal to the exchange wallet, relevant information about the recipient must be provided.
For the exchange wallet belongs to business recipient, rcvrFirstName may input the company name, rcvrLastName may input "N/A"
> exchId String Conditional Exchange ID
You can query supported exchanges through the endpoint of Get exchange list (public)
If the exchange is not in the exchange list, fill in '0' in this field.
> rcvrFirstName String Conditional Receiver's first name, e.g. Bruce
> rcvrLastName String Conditional Receiver's last name, e.g. Wayne

Withdraw assets to the exchange wallet

If users withdraw assets to the exchange wallet, they need to provide recipient information.

Withdraw assets to the private wallet

You can't withdraw to a private wallet via API. Please withdraw via our app or website instead.

Other API adjustment

Parameter Type Description
note String Withdrawal note
Parameter Type Description
state String 17: Pending response from Travel Rule vendor

Newly added error code

Error code Error Message
58239 You can't withdraw to a private wallet via API. Please withdraw via our app or website instead.

2024-12-30

2024-09-19

Parameter Type Description
enableSpotBorrow Boolean Whether borrow is allowed or not in Spot mode
true: Enabled
false: Disabled
spotBorrowAutoRepay Boolean Whether auto-repay is allowed or not in Spot mode
true: Enabled
false: Disabled
Parameter Type Description
ccy String Currency
Parameter Type Description
isTradeBorrowMode String Whether borrowing currency automatically
true
false
Only applicable to trigger order, trailing order and twap order

2024-09-18