> This page is for API Reference.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://okx-demo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://okx-demo.ferndocs.com/_mcp/server.

# Overview

The OKX V5 API is organized into the product areas in the sidebar — Trading Account, Order Book Trading, Market Data, Public Data, Funding, and more. Every endpoint lists its parameters, a real response example, and code snippets.

New to the API? Start with [Create an API Key](/docs/get-started/create-an-api-key) and [REST Authentication](/docs/authentication/rest-authentication).

Welcome to our API documentation. OKX provides REST and WebSocket APIs to suit your trading needs.

> **Info**
>
> **Important - OKX API Agreement: continued use constitutes acceptance**
>
> We encourage you to review the [OKX API Agreement](https://www.okx.com/help/okx-api-agreement) in full before continuing to use the API Services. Your continued use of any OKX API Services following the date of this notice constitutes your acceptance of the Agreement in full.
>
> If you do not agree to the Agreement, you must immediately cease all use of the OKX API Services, including disconnecting any active API integrations, Agent Trade Kit connections, and automated systems that access OKX via APIs.

> **Info**
>
> **Important - Regional API Domain Requirement**\
> Depending on where you registered, you **must** use the correct domain for both API calls and documentation.\
> Using `openapi.okx.com` will not work for the regions below.\
> **US & AU users** (registered on [app.okx.com](https://app.okx.com)): Use `us.okx.com` as your API domain. See the [US & AU API documentation](https://app.okx.com/docs-v5/en/).
> **EU users** (registered on [my.okx.com](https://my.okx.com)): Use `eea.okx.com` as your API domain. See the [EU API documentation](https://my.okx.com/docs-v5/en/).