Public APIs
OKEx favicon

OKEx

Cryptocurrency

Cryptocurrency exchange based in Seychelles.

OKEx's website screenshot

About OKEx

OKX provides REST and WebSocket APIs for cryptocurrency trading and market data access. The API supports order book trading, block trading, grid trading, copy trading, and conversion, alongside public and market data endpoints and trading statistics. Account management functions cover trading accounts, funding accounts, and sub-accounts.

Access requires creating an API key through an OKX account, and registration and API usage are free, though trading fees apply according to OKX's fee schedule. A simulated trading (demo) environment is available for testing before live use. The service targets developers building trading applications, market makers, brokers, and institutional users, offering additional programs such as a market maker program, broker program, and RFQ for large-volume spot and derivatives trades. Supporting resources include a Python SDK and a Python spot trading API tutorial.

Key features

  • REST and WebSocket APIs for trading and market data
  • Order book trading, block trading, grid trading, and copy trading APIs
  • Public market data, trading statistics, and historical market data endpoints
  • Demo trading (paper trading) environment for testing API keys
  • Python SDK and Python spot trading API tutorial
  • Sub-account management for trading

Frequently asked questions

Is the OKX API free?

Registering with OKX and using the APIs is free; trading fees are listed separately on the fee schedule.

How do I create OKX API keys?

Log in to your OKX account, click the user icon, select API from the dropdown, choose the account, and click Create API Keys.

Does OKX offer a testing environment?

Yes, users can switch to demo trading under Assets and create API keys for demo trading purposes.

What is the difference between REST and WebSocket APIs?

REST APIs require sending an HTTP request for each response and suit one-time state checks, while WebSocket APIs push continuous updates over a persistent TCP connection without repeated requests.

How do I start using the OKX API?

Public REST APIs can be tested directly in a browser, while private REST and WebSocket APIs are recommended to be used with tools like Jupyter Notebook or Postman.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product