How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

OKEx

Cryptocurrency exchange based in Seychelles

This event API exposes 57 operations across 56 channels, and defines 95 schemas. It is described by AsyncAPI 2.6.0, at version 5.0.0.

The API connects through 3 servers: ws.okx.com:8443 (wss), ws.okx.com:8443 (wss), ws.okx.com:8443 (wss).

57 operations 56 channels 95 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 2.6.0
API Version
5.0.0
Base URL
https://www.okex.com/docs/
Contact
Resource Areas
1

Channels & Operations 57

Across 56 channels, the API surfaces 57 operations. Each is listed below with its action, channel, parameters, and response codes.

Channels 57
SUB
/ops
Receive subscribe/login/error/pong acknowledgements
receiveEvent body
PUB
/ops
Send an operation frame (subscribe, login, ping, order, etc.)
sendOp body
SUB
instruments
Push when instrument state changes (new listing, expiry, suspension).
onInstruments body
SUB
open-interest
Push open interest for SWAP, FUTURES, OPTION instruments every 3s.
onOpenInterest body
SUB
funding-rate
Funding rate for SWAP perpetuals. Pushed when rate changes or on schedule.
onFundingRate body
SUB
price-limit
Maximum buy / minimum sell limit prices, pushed every 5s.
onPriceLimit body
SUB
estimated-price
Estimated delivery / exercise / settlement price for FUTURES and OPTION.
onEstimatedPrice body
SUB
mark-price
Mark price for MARGIN, FUTURES, SWAP, OPTION; pushed every 200ms when changed.
onMarkPrice body
SUB
mark-price-candlesticks
Mark price candlesticks. Channel names: mark-price-candle1Y/6M/3M/1M/1W/1D/2D/3D/5D/ 12H/6H/4H/2H/1H/30m/15m/5m/3m/1m and their UTC variants (-utc suffix).
onMarkPriceCandles body
SUB
index-tickers
Index ticker for an underlying index (e.g. BTC-USD index).
onIndexTickers body
SUB
index-candlesticks
Index candlesticks. Channel names: index-candle1Y/6M/3M/1M/1W/1D/2D/3D/5D/ 12H/6H/4H/2H/1H/30m/15m/5m/3m/1m and -utc variants.
onIndexCandles body
SUB
liquidation-orders
Recent liquidation orders for SWAP, FUTURES, OPTION, MARGIN.
onLiquidationOrders body
SUB
adl-warning
Auto-deleveraging warning per instrument.
onAdlWarning body
SUB
option-summary
Aggregated option summary (Greeks, IV) per option underlying.
onOptionSummary body
SUB
economic-calendar
Economic calendar events. Login may be required for full data.
onEconomicCalendar body
SUB
tickers
24h ticker per instrument; pushed every 100ms when changed.
onTickers body
SUB
candlesticks
OHLCV candles. Subscribe with channel name from candle1Y, candle6M, candle3M, candle1M, candle1W, candle1D, candle2D, candle3D, candle5D, candle12H, candle6H, candle4H, candle2H, candle1H, candle30m,…
onCandlesticks body
SUB
trades
Public trades feed (aggregated, pushed up to 100ms after match).
onTrades body
SUB
trades-all
All-trades feed (every trade, non-aggregated).
onTradesAll body
SUB
option-trades
Public option trades. Subscribe with instType=OPTION and instFamily.
onOptionTrades body
SUB
books
400-level order book; initial snapshot then incremental updates (100ms).
onBooks body
SUB
books5
Top-5 order book snapshot pushed every 100ms when changed.
onBooks5 body
SUB
books50-l2-tbt
50-level L2 tick-by-tick order book (10ms). VIP4+ required.
onBooks50L2Tbt body
SUB
books-l2-tbt
400-level L2 tick-by-tick order book (10ms). VIP5+ required.
onBooksL2Tbt body
SUB
bbo-tbt
Tick-by-tick best bid / best offer (top of book), 10ms.
onBboTbt body
SUB
call-auction-details
Call auction state for instruments in auction phase.
onCallAuctionDetails body
SUB
event-contract-markets
Event contract market data updates.
onEventContractMarkets body
SUB
account
Account balance updates per currency. Requires login.
onAccount body
SUB
positions
Position updates per instrument and side. Requires login.
onPositions body
SUB
balance-and-position
Combined balance and position deltas (1-stream consistency). Requires login.
onBalanceAndPosition body
SUB
position-risk-warning
Liquidation / margin-call risk warnings. Requires login.
onPositionRiskWarning body
SUB
liquidation-warning
Imminent forced liquidation warning. Requires login.
onLiquidationWarning body
SUB
orders
Order create / update / fill / cancel notifications. Requires login.
onOrders body
SUB
fills
Trade fill stream (VIP5+). Requires login.
onFills body
SUB
deposit-info
Deposit notifications per currency. Requires login.
onDepositInfo body
SUB
withdrawal-info
Withdrawal status updates. Requires login.
onWithdrawalInfo body
SUB
account-greeks
Portfolio Greeks per currency. Requires login.
onAccountGreeks body
SUB
orders-algo
Algo order updates (TP/SL, trigger, trailing stop, iceberg, TWAP). Requires login.
onOrdersAlgo body
SUB
algo-advance
Advanced algo (iceberg/TWAP) order updates. Requires login.
onAlgoAdvance body
SUB
grid-orders-spot
Spot grid bot order updates. Requires login.
onGridOrdersSpot body
SUB
grid-orders-contract
Contract grid bot order updates. Requires login.
onGridOrdersContract body
SUB
grid-positions
Grid position details and PnL. Requires login.
onGridPositions body
SUB
grid-sub-orders
Individual grid sub-order events. Requires login.
onGridSubOrders body
SUB
recurring-buy
Recurring buy plan order updates. Requires login.
onRecurringBuy body
SUB
copytrading-notification
Copy-trading notifications for lead traders and followers. Requires login.
onCopytradingNotification body
SUB
rfqs
Request-for-quote events for the subscribed account. Requires login.
onRfqs body
SUB
quotes
Quote events for RFQs. Requires login.
onQuotes body
SUB
struc-block-trades
Account-scoped structured block trade confirmations. Requires login.
onStrucBlockTrades body
SUB
public-struc-block-trades
Public structured block trades.
onPublicStrucBlockTrades body
SUB
public-block-trades
Public block trades per instrument.
onPublicBlockTrades body
SUB
block-tickers
Block trading ticker.
onBlockTickers body
SUB
sprd-orders
Spread trading order updates. Requires login.
onSprdOrders body
SUB
sprd-trades
Spread trading fill stream. Requires login.
onSprdTrades body
SUB
sprd-public-trades
Public spread trades.
onSprdPublicTrades body
SUB
sprd-books
Spread order book.
onSprdBooks body
SUB
sprd-tickers
Spread ticker (account scope). Requires login for private fields.
onSprdTickers body
SUB
sprd-public-tickers
Public spread ticker.
onSprdPublicTickers body

Messages & Schemas 95

The contract defines 95 schemas that model the data carried by its messages. The most detailed are Instrument (27 properties), OrderArg (14 properties), SubscribeArg (10 properties), EventResponse (8 properties). Each schema is shown below with its type and property counts.

SubscribeOp
message
Subscribe to one or more channels.
UnsubscribeOp
message
Unsubscribe from one or more channels.
LoginOp
message
Authenticate the connection for private / business channels.
PingFrame
message
Plain-text ping frame (literal string "ping").
PongFrame
message
Plain-text pong response (literal string "pong").
EventAck
message
Subscribe/unsubscribe/login/error acknowledgement.
PlaceOrderOp
message
BatchOrdersOp
message
AmendOrderOp
message
CancelOrderOp
message
MassCancelOp
message
OrderOpAck
message
InstrumentsPush
message
OpenInterestPush
message
FundingRatePush
message
PriceLimitPush
message
EstimatedPricePush
message
MarkPricePush
message
IndexTickerPush
message
CandlesticksPush
message
LiquidationOrdersPush
message
AdlWarningPush
message
OptionSummaryPush
message
EconomicCalendarPush
message
TickersPush
message
TradesPush
message
OptionTradesPush
message
OrderBookPush
message
CallAuctionDetailsPush
message
EventContractMarketsPush
message
AccountPush
message
PositionsPush
message
BalanceAndPositionPush
message
PositionRiskWarningPush
message
LiquidationWarningPush
message
OrdersPush
message
FillsPush
message
DepositInfoPush
message
WithdrawalInfoPush
message
AccountGreeksPush
message
AlgoOrdersPush
message
GridOrdersPush
message
GridPositionsPush
message
GridSubOrdersPush
message
RecurringBuyPush
message
CopytradingNotificationPush
message
RfqsPush
message
QuotesPush
message
BlockTradesPush
message
SprdOrdersPush
message
SprdTradesPush
message
SubscribeRequest
object
3 properties 2 required
UnsubscribeRequest
object
3 properties 2 required
SubscribeArg
object
Channel selector. Different channels accept different combinations of instType (SPOT, MARGIN, SWAP, FUTURES, OPTION, ANY), instFamily, instId, ccy, algoId, uly…
10 properties 1 required
LoginRequest
object
2 properties 2 required
EventResponse
object
8 properties
PlaceOrderRequest
object
4 properties 2 required
BatchOrdersRequest
object
4 properties 2 required
AmendOrderRequest
object
4 properties 2 required
CancelOrderRequest
object
3 properties 2 required
MassCancelRequest
object
3 properties 2 required
OrderArg
object
14 properties 5 required
AmendArg
object
7 properties 1 required
CancelArg
object
3 properties 1 required
OrderOpResponse
object
7 properties
PushEnvelope
object
3 properties
GenericEvent
object
InstrumentsEvent
object
Instrument
object
27 properties
OpenInterestEvent
object
FundingRateEvent
object
PriceLimitEvent
object
EstimatedPriceEvent
object
MarkPriceEvent
object
IndexTickerEvent
object
CandlesticksEvent
object
Push payload data is an array of candle rows. Each row is itself a string array: [ts, open, high, low, close, vol, volCcy, volCcyQuote, confirm] - ts: open tim…
LiquidationOrdersEvent
object
AdlWarningEvent
object
OptionSummaryEvent
object
EconomicCalendarEvent
object
TickersEvent
object
TradesEvent
object
OptionTradesEvent
object
OrderBookEvent
object
Order book push. action is "snapshot" on first message and "update" for deltas (channels: books, books-l2-tbt, books50-l2-tbt). Snapshot-only channels (books5,…
CallAuctionDetailsEvent
object
AccountEvent
object
PositionsEvent
object
BalanceAndPositionEvent
object
OrdersEvent
object
FillsEvent
object
DepositInfoEvent
object
WithdrawalInfoEvent
object
AccountGreeksEvent
object
AlgoOrdersEvent
object
GridOrdersEvent
object

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

okx-asyncapi.yml Raw ↑
Where this information came from

This is an independent, third-party profile of OKEx, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.