Changes to V5 API WebSocket Subscription Parameter and URL

·

Dear OKX Users,

To enhance the stability of V5 API WebSocket services, OKX will implement adjustments to subscription parameters and service addresses for specific channels. These changes aim to improve performance while minimizing disruptions to your trading experience.

Key Timeline Updates

The originally planned end-of-May 2023 adjustment has been rescheduled to:
June 20, 2023 | 9:10 am – 9:50 am UTC

👉 View real-time system status updates


1. Subscription Parameter Changes

Transition from uly to instFamily

Example:

{
  "op": "subscribe",
  "args": [{
    "channel": "candle1D",
    "instFamily": "BTC-USD"
  }]
}

2. WebSocket URL Updates for Specific Channels

New Base URL: /business

Effective June 20, 2023, the following channels will exclusively use /business URLs (see Table 1). Current /public and /private paths will be discontinued for these channels.

Table 1: Affected Channels

Channel TypeSpecific Channels
Block Tradingrfqs, quotes, struc-block-trades, public-struc-block-trades, public-block-trades, block-tickers
Algo/Strategyorders-algo, algo-advance, grid-orders-spot, grid-orders-contract, grid-orders-moon, grid-positions, grid-sub-orders, algo-recurring-buy
Candlestickscandle, mark-price-candle, index-candle

Implementation Guide

  1. Production Environment

    Service TypeUpdated URL
    Live Tradingwss://ws.okx.com:8443/ws/v5/business
    wss://wsaws.okx.com:8443/ws/v5/business
  2. Demo Environment

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

👉 Test your connection now


Recommended Action Plan

  1. Update all ulyinstFamily parameters
  2. Migrate affected channels to new /business URLs
  3. Complete changes before June 20 maintenance window

FAQs

Q: Will historical WebSocket connections break after June 20?
A: Yes—for channels listed in Table 1. Update URLs to avoid disconnections.

Q: Can I use both uly and instFamily during transition?
A: No. uly will immediately return errors post-update.

Q: Are other WebSocket channels affected?
A: Only the specified channels require URL changes. All others remain unchanged.


For urgent support, contact our 24/7 technical team via the OKX Help Center.