Upcoming Changes
Delist initial snapshot and checksum field in order book channels
Last update: February 12, 2026
To improve the user experience and the stability of the market data push,the following order book channels will delist the initial snapshot and checksum push field.
After the delisting, the initial snapshot and checksum push field will not be returned, please use the GET / Order book endpoint to get the snapshot data, and use seqId/prevSeqId to verify the data accuracy before the delisting.
Note: The WebSocket connection now fully enforces TLS (wss://), providing protection against eavesdropping, 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, achieving integrity protection equivalent to, or even stronger than, the original checksum mechanism.
The delisting date of demo trading environment: early May 2026
The delisting date of production environment: early August 2026
Delist the initial snapshot and
checksumpush field.- WS / Order book channel
books/books-elp/books-l2-tbt/books50-l2-tbt
- WS / Order book channel
How to manage a local order book correctly
- Open a JSON WebSocket connection and subscribe to the incremental order book channel.
- Buffer the events received from the stream. Ignore the first event received (action is
snapshot), and record theprevSeqIdof the second event. - Get a depth snapshot from GET / Order book, e.g.
https://www.okx.com/api/v5/market/books?instId=BTC-USDT-SWAP&source=0 - If the
seqIdfrom the snapshot is strictly less than theprevSeqIdfrom step 2, go back to step 3. - In the buffered events, discard any event where stream
seqIdis <= snapshotseqIdof the snapshot. - The first buffered event should satisfy the condition: stream
prevSeqId<= snapshotseqId< streamseqId. - Set your local order book to the snapshot. Its sequence ID is snapshot
seqId. - Apply the update procedure below to all buffered events, and then to all subsequent events received.
- For each price level in bids and asks, set the new quantity in the order book:
- If the price level does not exist in the order book, insert it with new quantity.
- If the quantity is zero, remove the price level from the order book.
- Set the order book sequence ID to the latest sequence ID (
seqId) in the processed event.
Note: Not all snapshotseqIdwill appear in thebooks-l2-tbtchannels.
- For each price level in bids and asks, set the new quantity in the order book:
To support using the GET / Order book endpoint to manage the local order book, the endpoint already added the
seqIdresponse parameter, to support getting the snapshot data of the ELP order book, source request parameter will be added on March 5, 2026.
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| source | String | No | The source of the order book. 0: Normal order book, default value. 1: ELP order book |
Delist instId request parameter in WS order operation channels
Last update: January 29, 2025
To reduce latency of WebSocket order operations, the following order operation channels have introduced a new request parameter, instIdCode. In the demo trading environment, the instId request parameter has been delisted. In the production environment, instId will be delisted in phases. After the delisting, any instId value provided will be ignored.
- Phase 1 delisting date: March 5, 2026. The affected channels include:
- Phase 2 delisting date: March 10, 2026. The affected channels include:
| 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: Users can use the Get instruments interface to map instIdCode to instId.
OKX trading fee scheme update
Last updated: 2025/11/3
OKX will update the trading fee scheme for improved fee differentiation across tiers. Please refer to the announcement for more details.
Instruments endpoint/channel
- Add a new response parameter groupId to indicate which group a specific symbol belongs to.
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| groupId | String | Instrument trading fee group ID Spot: 1: Spot USDT2: Spot USDC & Crypto3: Spot TRY4: Spot EUR5: Spot BRL7: Spot AED8: Spot AUD9: Spot USD10: Spot SGD11: Spot zero12: Spot group one13: Spot group two14: Spot group threeExpiry futures: 1: Expiry futures crypto-margined2: Expiry futures USDT-margined3: Expiry futures USDC-margined4: Expiry futures premarket5: Expiry futures group one6: Expiry futures group twoPerpetual futures: 1: Perpetual futures crypto-margined2: Perpetual futures USDT-margined3: Perpetual futures USDC-margined4: Perpetual futures group one5: Perpetual futures group twoOptions: 1: Options crypto-margined2: Options USDC-marginedinstType and groupId should be used together to determine a trading fee group. Users should use this endpoint together with fee rates endpoint to get the trading fee of a specific symbol. Some enum values may not apply to you; the actual return values shall prevail. |
Response Example
{
"code":"0",
"msg":"",
"data":[
{
"alias": "",
"auctionEndTime": "",
"baseCcy": "BTC",
"category": "1",
"ctMult": "",
"ctType": "",
"ctVal": "",
"ctValCcy": "",
"contTdSwTime": "1704876947000",
"expTime": "",
"futureSettlement": false,
"groupId": "13"
"instFamily": "",
"instId": "BTC-USDT",
"instType": "SPOT",
"lever": "10",
"listTime": "1606468572000",
"lotSz": "0.00000001",
"maxIcebergSz": "9999999999.0000000000000000",
"maxLmtAmt": "1000000",
"maxLmtSz": "9999999999",
"maxMktAmt": "1000000",
"maxMktSz": "",
"maxStopSz": "",
"maxTriggerSz": "9999999999.0000000000000000",
"maxTwapSz": "9999999999.0000000000000000",
"minSz": "0.00001",
"optType": "",
"openType": "call_auction",
"preMktSwTime": "",
"quoteCcy": "USDT",
"tradeQuoteCcyList": [
"USDT"
],
"settleCcy": "",
"state": "live",
"ruleType": "normal",
"stk": "",
"tickSz": "0.1",
"uly": "",
"instIdCode": 1000000000
}
]
}
Get fee rates endpoint
- Add new response parameter feeGroup. Fields that will be deprecated: maker, makerU, makerUSDC, taker, takerU, takerUSDC.
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| feeGroup | Array of objects | Fee groups. Applicable to SPOT/MARGIN/SWAP/FUTURES/OPTION |
| > taker | String | Taker fee |
| > maker | String | Maker fee |
| > groupId | String | Instrument trading fee group ID instType and groupId should be used together to determine a trading fee group. Users should use this endpoint together with instruments endpoint to get the trading fee of a specific symbol. |
Response Example
{
"code": "0",
"msg": "",
"data": [{
"category": "1", //Deprecated
"delivery": "",
"exercise": "",
"feeGroup": [
{
"taker": "0.001",
"maker": "0.0001",
"groupId": "1"
},
{
"taker": "0.01",
"maker": "0.001",
"groupId": "2"
},
{
"taker": "0.1",
"maker": "0.01",
"groupId": "3"
},
......
],
"instType": "SPOT",
"level": "lv1",
"maker": "-0.0008", //Deprecated
"makerU": "", //Deprecated
"makerUSDC": "", //Deprecated
"taker": "-0.001", //Deprecated
"takerU": "", //Deprecated
"takerUSDC": "", //Deprecated
"ruleType": "normal",
"ts": "1608623351857",
"fiat": []
}
]
}
Delist old attached stop profit and stop loss parameters
Last update: November 20, 2025
In order to streamline the placement parameters and order information parameters, Open API will delist the old stop-loss and take-profit parameters.
- Related request parameters will be delisted in mid-October or later (the parameters in the array attachAlgoOrds aren’t affected), no specific time will be further notified.
| Parameter | Type | Description |
|---|---|---|
| attachAlgoClOrdId | String | Client-supplied Algo ID when placing order attaching TP/SL. |
| tpTriggerPx | String | Take-profit trigger price. |
| tpTriggerPxType | String | Take-profit trigger price type. last: last priceindex: index pricemark: mark price |
| tpOrdPx | String | Take-profit order price. |
| slTriggerPx | String | Stop-loss trigger price. |
| slTriggerPxType | String | Stop-loss trigger price type. last: last priceindex: index pricemark: mark price |
| slOrdPx | String | Stop-loss order price. |
2026-02-12
- Added new parameters
| 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 |
2026-01-15
Rename XAUT Perpetual Contract
To enhance your trading experience, OKX renamed XAUTUSDT perpetual to XAUUSDT perpetual and the trading of XAUTUSDT perpetual will be suspended from 8:05 am to 8:25 am on Jan 15, 2026 (UTC), more details can be found in announcement details.
When renaming:
- Instruments channel will first push the update data of
instId: XAUT-USDT-SWAP,state: expired, then push the update data ofinstId: XAU-USDT-SWAP,state: live.
- Instruments channel will first push the update data of
After renaming:
- The
instId,instFamily,ulyin the pushed data will use the new parameter values. - OKX will no longer support subscribing to the WebSocket channels for this perpetual using
instId: XAUT-USDT-SWAPorinstFamily: XAUT-USDT, nor will it support sending HTTP requests via OpenAPI with these parameters. Please useinstId: XAU-USDT-SWAPorinstFamily: XAU-USDTfor related trading operations after the contract is renamed. - For the
tradesand regular snapshot push ofpositionschannels, the old subscriptions will still push data, please resubscribe using the new parameter values after the renaming. - For order book channels, old subscriptions will continue to receive data. After the renaming, please first cancel the subscription using the new parameter values, then resubscribe using the new values.
- For other channels, they will no longer push any data, please resubscribe using the new parameter values after the renaming.
instIdCodewill remain unchanged.
- The
The parameters to be renamed are as follows:
| Value Type | instId | uly | instFamily | ctValCcy |
|---|---|---|---|---|
| Before Renaming | XAUT-USDT-SWAP |
XAUT-USDT |
XAUT-USDT |
XAUT |
| After Renaming | XAU-USDT-SWAP |
XAU-USDT |
XAU-USDT |
XAU |
2025-11-20
- Added new request parameter
instIdCode
| 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-09-03
- Fiat deposits and withdrawals are supported.
2025-08-20
Unified USD orderbook revamp
To revamp unified USD orderbook, more details for the first type users, more details for the second type users.
OKX delisted the Crypto-USDC trading pairs and upgrade the Crypto-USD trading pairs for accessibility to all users.
Users are categorized into two types based on their country or region, with varying solutions for each. If you get valid data from GET /api/v5/account/instruments?instType=SPOT&instId=BTC-USD, you belong to the first type users, if you get an empty array [] data from that URL, you belong to the second type.
- If you are going to trade
Crypto-USDCpairs after the revamp:- The
instIdshould be set toCrypto-USD, such asBTC-USD. - The
tradeQuoteCcyis used to determine the settlement quote currency and must be set asUSDC. - The value for
tradeQuoteCcyshould be one of the enumerated values fromtradeQuoteCcyList, which can be obtained from the endpoint Get instruments (private).
- The
- What you need to do:
- For the first type users:
- Regarding Trade, Algo Trading and and in Block Trading, you currently have two options to trade
Crypto-USDC. The first option is to trade directly with"instId": "Crypto-USDC"without specifyingtradeQuoteCcy. The second option is to trade using"instId": "BTC-USD"with"tradeQuoteCcy": "USDC". The first option will not be available after the revamp. For more details, please refer to the Example 1 below.
- Regarding Trade, Algo Trading and and in Block Trading, you currently have two options to trade
- For the second type of users, you are allowed to trade only with
"instId": "Crypto-USDC"before the revamp. Afterward, you must use"instId": "Crypto-USD"with"tradeQuoteCcy": "USDC". - When trading
Crypto-USDCafter the revamp, Get maximum available balance/equity and Get maximum order quantity will also need to use"instId": "BTC-USD"with"tradeQuoteCcy": "USDC". - For market data related
Crypto-USDCandCrypto-USDtrading, after the revamp, they will share the same order book, both using"instId": "Crypto-USD", such asBTC-USD. ThetradeQuoteCcyis not supported.
- For the first type users:
Example 1: Placing an order with BTC-USDC:
| Type | Before upgrading | After upgrading |
|---|---|---|
| Operation | Trading BTC-USDC |
Trading BTC-USDC |
Request fields for "op": "order" |
First option: { "instId": "BTC-USDC", "tradeQuoteCcy": "" } Second option: { "instId": "BTC-USD", "tradeQuoteCcy": "USDC" } |
Only option: { "instId": "BTC-USD", "tradeQuoteCcy": "USDC" } |
| Response body from Get instruments (private) |
[ { "instId": "BTC-USDC", "tradeQuoteCcyList": ["USDC"], ...... }, { "instId": "BTC-USD", "tradeQuoteCcyList": ["USD", "USDC"], ...... } ] |
[ { "instId": "BTC-USD", "tradeQuoteCcyList": ["USD", "USDC"], ...... } ] |
2025-08-14
- MARGIN and OPTION trading are permitted in specific countries and regions.
2025-07-08
Open API supports Unified USD Orderbook
For more details, please refer to Unified USD Orderbook FAQ
- Added new request parameter
| 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. |
- Added new response parameter
| Parameter | Type | Description |
|---|---|---|
| tradeQuoteCcyList | Array of strings | List of quote currencies available for trading, e.g. ["USD", "USDC"]. |
- Added new response parameter
| 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.
2025-07-02
Added new endpoint
Added new response parameter
| Parameter | Type | Description |
|---|---|---|
| notes | String | Notes |
2025-06-26
- Futures and swap trading are permitted in specific countries and regions.
2025-06-24
- Added new endpoint
2025-05-28
- Added endpoints. Bills details (since 2021) endpoints below have been released in production
2025-04-17
Added endpoints
Added new error codes
| 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} |
2024-09-18
- Added new endpoints: