V5 API WebSocket Subscription Parameters and Channel URL Updates Announcement

ยท

Dear Valued Users,

To enhance the stability of our V5 API WebSocket service, we're implementing adjustments to subscription parameters and select channel URLs.

Key Timeline Update

Originally scheduled for late May 2023, these changes will now take effect on June 20, 2023, 5:10 PM - 5:50 PM (UTC+8) to minimize disruption to your trading activities.


Part 1: Subscription Parameter Changes

Currently, the uly parameter processes subscriptions as instFamily. Post-update:


Part 2: Channel URL Migrations

Selected channels (see Table 1) will migrate to a new endpoint (/business). Legacy URLs (/private and /public) will become unsupported for these channels post-update. This affects both live and demo environments.

Migration Sequence:

  1. Complete instFamily parameter updates
  2. Transition to new /business URLs

Table 1: Affected Channels

Only these channels require endpoint updates:

Channel CategorySpecific Channels
Block TradingRFQs (rfqs), Quotes (quotes), Structured Block Trades (struc-block-trades)
Public Block Trades (public-struc-block-trades, public-block-trades)
Block Tickers (block-tickers)
Strategy OrdersAlgo Orders (orders-algo), Advanced Algos (algo-advance)
Grid StrategiesSpot Grids (grid-orders-spot), Contract Grids (grid-orders-contract)
Moon Grids (grid-orders-moon), Grid Positions (grid-positions)
Grid Sub-Orders (grid-sub-orders), Recurring Buys (algo-recurring-buy)
CandlesticksRegular (candle), Mark Price (mark-price-candle), Index (index-candle)

URL Reference Tables

Live Environment Updates

EnvironmentLegacy URLsNew Unified URL
Publicwss://ws.okx.com:8443/ws/v5/public
wss://wsaws.okx.com:8443/ws/v5/public
wss://ws.okx.com:8443/ws/v5/business
wss://wsaws.okx.com:8443/ws/v5/business
Privatewss://ws.okx.com:8443/ws/v5/private
wss://wsaws.okx.com:8443/ws/v5/private

Demo Environment Updates

EnvironmentLegacy URLsNew Unified URL
Publicwss://wspap.okx.com:8443/ws/v5/public?brokerId=9999wss://wspap.okx.com:8443/ws/v5/business?brokerId=9999
Privatewss://wspap.okx.com:8443/ws/v5/private?brokerId=9999

FAQs

Q: Will historical WebSocket connections break after the update?

A: Yes - all connections using legacy parameters/URLs for affected channels will require reconnection to the new endpoints.

Q: Is there a version deprecation schedule?

A: The V5 API remains fully supported. Only specific channel URLs and parameters are being optimized.

Q: How can I test these changes beforehand?

A: Utilize our ๐Ÿ‘‰ demo environment to validate updates without live trading impact.


OKX Team
April 24, 2023