Nie wszystkie wymienione produkty są dostępne we wszystkich jurysdykcjach.

Changes to V5 API WebSocket subscription parameter and URL

Opublikowano 24 kwi 20233 min czytania

Dear OKX users,

To ensure the stability of V5 API WebSocket, V5 API WebSocket will adjust subscription parameter and the service address of certain channels.
Meanwhile, in order to secure our users' interests and minimize impact on trading functions, the adjustment originally scheduled for the end of May 2023 has been postponed. The updated schedule is from 9:10 am to 9:50 am UTC on June 20, 2023.

1. Adjustment to V5 API WebSocket subscription parameter

Currently the websocket subscription parameter uly is mapped to the parameter instFamily. After the adjustment, the subscription parameter uly will return error and no longer be processed. In API requests, please stop using the subscription parameter "uly" and use the subscription parameter "instFamily" instead.

2. V5 API WebSocket adjusts the service address of some channels.

The WebSocket channels below (see Table 1 for details) are now available from "/business" URL. The current URL ("/private" or "/public") will no longer service the WebSocket channels listed below from 20 June 2023. The changes apply to both demo and live trading. Please change the URL as soon as possible.

Please complete the "instFamily" change listed above first, then switch to the new "/business" URL.

Table 1: The channels affected

Only the channels listed below are required to switch to the new "/business" URL.

Channel type Channels
Block trading
Rfqs channel: rfqs


Quotes channel: quotes


Structure block trades channel: struc-block-trades


Public structure block trades channel: public-struc-block-trades


Public block trades channel: public-block-trades


Block tickers channel: block-tickers

Algo and strategy trading
Algo orders channel: orders-algo


Advance algo orders channel: algo-advance


Spot grid algo orders channel: grid-orders-spot


Contract grid algo orders channel: grid-orders-contract


Moon grid algo orders channel: grid-orders-moon


Grid positions channel: grid-positions


Grid sub orders channel: grid-sub-orders


Recurring buy orders channel: algo-recurring-buy

Candlesticks related
Candlesticks channel: candle


Mark price candlesticks channel: mark-price-candle


Index candlesticks channel: index-candle

Table 2: Production service address details

Only the channels listed on Table 1 are required to switch to the new "/business" URL.

Live trading URL
Current

Public addresses:

wss://ws.okx.com:8443/ws/v5/public

wss://wsaws.okx.com:8443/ws/v5/public

Private addresses:

wss://ws.okx.com:8443/ws/v5/private

wss://wsaws.okx.com:8443/ws/v5/private

Updated

wss://ws.okx.com:8443/ws/v5/business

wss://wsaws.okx.com:8443/ws/v5/business

Applicable to public and private channels

Table 3: Demo trading service address details

Only the channels listed on Table 1 are required to switch to the new "/business" URL.

Demo trading URL
Current

Public address:wss://wspap.okx.com:8443/ws/v5/public?brokerId=9999

Private address:wss://wspap.okx.com:8443/ws/v5/private?
brokerId=9999

Updated
wss://wspap.okx.com:8443/ws/v5/business?brokerId=9999

Applicable to public and private channels

OKX
April 24, 2023