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.
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 |
2025-12-15
- Started to support spot margin.
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-08-27
Fiat buy/sell is supported.
2025-07-24
- Added
toAddrTypeparameter in the following endpoints:
| Parameter | Type | Required | Description |
|---|---|---|---|
| toAddrType | String | No | Address type1: wallet address, email, phone, or login account name2: 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
- 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.
Fiat
Fiat deposits and withdrawals are supported.
2025-07-02
Added new endpoint
The request parameter has been updated as follows:
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 | PagingType1: Timestamp of the bill record2: Bill ID of the bill recordThe default is 1 |
- Added new response parameter
| Parameter | Type | Description |
|---|---|---|
| notes | String | Notes |
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} |
2025-02-12
- Added new parameters
| Parameter | Type | Description |
|---|---|---|
| notionalUsdForBorrow | String | Notional value for Borrow in USDApplicable to Spot mode/Multi-currency margin/Portfolio margin |
| notionalUsdForSwap | String | Notional value of positions for Perpetual Futures in USDApplicable to Multi-currency margin/Portfolio margin |
| notionalUsdForFutures | String | Notional value of positions for Expiry Futures in USDApplicable to Multi-currency margin/Portfolio margin |
| notionalUsdForOption | String | Notional value of positions for Option in USDApplicable 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 Typeexchange: Withdraw to exchange walletIf 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.
- Users under the EEA entity need to pass in the following field information of the recipient (rcvrFirstName, rcvrLastName). For the exchange wallet belongs to business recipient,
rcvrFirstNamemay input the company name,rcvrLastNamemay input "N/A". The examples are as follows:
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
- Added new response parameters
| Parameter | Type | Description |
|---|---|---|
| note | String | Withdrawal note |
- Added new enumerations
| 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
- Added new response parameters
| Parameter | Type | Description |
|---|---|---|
| enableSpotBorrow | Boolean | Whether borrow is allowed or not in Spot modetrue: Enabledfalse: Disabled |
| spotBorrowAutoRepay | Boolean | Whether auto-repay is allowed or not in Spot modetrue: Enabledfalse: Disabled |
- Added new response parameters
| Parameter | Type | Description |
|---|---|---|
| ccy | String | Currency |
- Added new response parameters
| Parameter | Type | Description |
|---|---|---|
| isTradeBorrowMode | String | Whether borrowing currency automatically true false Only applicable to trigger order, trailing order and twap order |
2024-09-18
- Added new endpoints: