V5 API WebSocket Subscription Parameter and URL Updates

·

To enhance the stability of the V5 API WebSocket service, OKX has implemented adjustments to the subscription parameters and service addresses for specific channels. These updates are designed to improve system performance and ensure a seamless trading experience for all users.

Originally planned for late May 2023, these changes were rescheduled to minimize disruption to trading activities. The update was successfully implemented between 9:10 am and 9:50 am UTC on June 20, 2023.

Key Changes to Subscription Parameters

The parameter uly, previously used for subscription requests, has been deprecated and replaced by instFamily. Following the update, any API request utilizing uly will return an error. It is essential to adopt the new parameter to maintain uninterrupted access to WebSocket services.

Action Required: Immediately update all API integration code to use instFamily instead of uly for subscription requests.

Service Address Updates for Specific Channels

Several WebSocket channels have been migrated to a new service endpoint. Channels previously accessible via /public or /private URLs must now use the /business endpoint. This change affects both live and demo trading environments.

Action Required: Update the service URL for the affected channels to the new /business endpoint at your earliest convenience.

List of Affected Channels

The following channels now require the /business URL:

Updated Service Addresses

For Live Trading:

For Demo Trading:

It is highly recommended to first update your subscription parameters to use instFamily before switching to the new /business service URL to ensure a smooth transition.

👉 Explore the API documentation for implementation details

Frequently Asked Questions

What is the difference between uly and instFamily?
Both parameters are used to specify an instrument family for subscription requests. The uly parameter has been phased out and replaced by instFamily to align with internal system upgrades. Using uly will now result in an error.

Do I need to change the URL for all my WebSocket connections?
No. Only the specific channels listed in the announcement are affected. If you are using any of the block trading, algo trading, or candlestick channels mentioned, you must update their endpoint to /business. All other channels continue to use their existing /public or /private URLs.

Will my existing algorithms still work after the update?
Your algorithms will continue to function only if you update the subscription parameter from uly to instFamily and, if applicable, change the service URL for the affected channels. Failure to make these changes will result in connection errors and a loss of data subscription.

Is there a grace period for making these changes?
The changes are now active. The original deadline was June 20, 2023. To avoid service interruptions, it is critical to update your API integration immediately.

How can I test these changes before going live?
You can thoroughly test all modifications using the OKX demo trading environment. The demo system uses a parallel infrastructure, allowing you to validate your updated code without risking real funds. 👉 Get started with the demo environment today

Who should I contact if I encounter issues?
For technical support regarding API integration, refer to the comprehensive developer resources available on the OKX website. The documentation provides detailed guidance, code samples, and troubleshooting tips for a smooth migration process.