Skip to main content
OKX operates three distinct regional domains, each with its own API endpoints. The SDK defaults to OKX Global and requires only a single option change to target a different region.

Supported regions

Global

Domain: www.okx.comThe default region. No extra configuration needed.market: 'GLOBAL' (or omit entirely)

EEA

Domain: my.okx.comFor users registered under the European Economic Area entity.market: 'EEA'

US

Domain: app.okx.comFor users registered under the OKX US entity.market: 'US'
Available functionality differs between regions. Refer to the corresponding API documentation for your region: Global, EEA, US.

Configuring the RestClient

Pass the market option to the RestClient constructor. All subsequent REST calls will be routed to the correct regional domain.

Configuring the WebsocketClient

The WebsocketClient (and WebsocketAPIClient) accept the same market option.

The market option

The market property is typed as APIMarket and is shared between RestClientOptions and WSClientConfigurableOptions:
Omitting market is equivalent to setting market: 'GLOBAL'.

Demo trading mode

All regions support OKX’s paper/demo trading environment. Set demoTrading: true alongside your region to use demo trading credentials without touching live funds.
Demo trading API keys are separate from live keys. Generate them under OKX Demo Trading by selecting the demo environment.