Key Changes When Upgrading from OKX API V3 to V5

·

Since OKX upgraded its API from V3 to V5, several significant changes have improved functionality and security for traders. Here's a breakdown of the key updates:

Enhanced Subaccount Management

The V5 API now allows master accounts to perform CRUD operations (Create, Read, Update, Delete) on subaccount API Keys directly through the API. This streamlines account management for users with multiple subaccounts.

👉 Learn more about API Key security

Mandatory IP Binding for Security

OKX strongly recommends binding API Keys to specific IP addresses to enhance security. During API application, the exchange prompts users to bind IPs to:

Unified API Structure

The V5 API introduces a unified endpoint structure across all products:

For example, all orders now use the same base URL with product type specified in the request body.

Flexible Margin Modes

The V5 API supports OKX's Unified Account System, allowing:

Note: V5 removed the "contract underlying index margin mode" API—traders must now define margin mode at order placement.

Frequently Asked Questions

Why upgrade to V5 API?

V5 offers improved security, simplified structure, and better alignment with OKX's Unified Account System. The unified endpoints reduce development complexity.

How does IP binding enhance security?

IP binding restricts API access to predefined addresses, preventing unauthorized use even if API credentials are compromised.

👉 Explore OKX API documentation

Can I use both V3 and V5 APIs simultaneously?

While possible during transition periods, OKX recommends migrating fully to V5 for access to latest features and ongoing support.

What happened to index margin mode APIs?

These were replaced by specifying margin mode per order, providing greater flexibility in trading strategies.

The V5 API represents a significant step forward in both functionality and security. Traders should plan their migration carefully, taking advantage of the simplified structure and enhanced account management features.