Skip to content

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

OKX V5 API — Flat Markdown Docs

Machine-friendly, flattened Markdown of the OKX V5 REST API, generated from the official documentation source. Built for AI agents and tooling to read and to write/verify OKX API integration code across multiple sites.

The primary lookup flow is for REST endpoints: endpoint path -> module index -> site/language doc. WebSocket Markdown is included when present as supplemental documentation and can be searched when needed, but it does not have the same deterministic REST endpoint routing/index.

Generated content — do not edit by hand. sites.json and index.json each carry a version (semver) and a generated_at timestamp so you can tell which release you are reading.

Layout

This repository ships a self-contained skill: the okx-v5-api skill and all of its data live together under skills/okx-v5-api/. Installing the skill (e.g. npx skills add) brings the routing tables and the endpoint bodies with it — there is nothing else to clone and no path to configure.

skills/okx-v5-api/               # self-contained okx-v5-api skill
  SKILL.md                       #   the skill (router instructions)
  sites.json                     #   site -> REST and WS domains (+ version, generated_at)
  index/                         #   layered lookup tables (primary navigation)
    modules.md                   #     module list + per-site endpoint counts
    <module>.md                  #     one table per module: method|path|name|doc|per-site supported
  index.json                     #   full machine index: every endpoint, per-site "supported" + doc path (+ version, generated_at)
  docs/<site>/<lang>/...md       #   endpoint bodies (usually one endpoint per file)
  LICENSE                        #   MIT (bundled so the standalone skill carries its own license)
README.md                        # this file
LICENSE                          # MIT (repo-level)

Other skills may live alongside under skills/ (e.g. an integration guide); they are maintained independently of this generated okx-v5-api corpus.

Versioning

sites.json and index.json carry a version field using semver MAJOR.MINOR.PATCH (a bare string, e.g. 0.1.0 — no v prefix):

  • MAJOR — breaking change to the data format (layout/schema). Tooling that consumes these files may need updating.
  • MINOR — endpoints added or changed.
  • PATCH — documentation fixes.

generated_at records when the build was produced. Use version to check compatibility and generated_at for freshness.

Content notes

  • Sites: okex (Global), us, my (EEA), turkey (Hong Kong is not covered). Each site's docs are flattened and self-contained — the domain and the set of supported endpoints already reflect that site. Do not assume the Global site's endpoints or domain apply elsewhere.
  • Languages: en and zh.
  • Each endpoint Markdown file carries YAML frontmatter (method, path, site, lang, rest, ws, module) so tools can read the essentials without parsing prose.
  • Some multi-endpoint source pages are preserved as one Markdown file and marked multi_endpoint: true. Those files include an Endpoint sections table near the top so AI agents can locate a target method path and read only the matching section. In multi-endpoint files, the frontmatter method/path identifies the first endpoint only; use index.json plus the target section for the endpoint-specific method/path.

Navigation (the index/ layer)

All paths below are relative to skills/okx-v5-api/. index/ is the primary way to find an endpoint. It is plain Markdown — no code, no runtime, all local.

  • index/modules.md lists every module with its total endpoint count and how many are supported per site — a quick overview and jump-off point.
  • index/<module>.md is a small table for one module. The module is the 2nd path segment (/api/v5/<module>/..., e.g. /api/v5/trade/order → trade). Each row has method | path | name | doc plus a per-site ✓ / ✗ column.
  • index.json remains available as the full machine index (per-site doc is a per-language { "en": ..., "zh": ... } map), but for lookups prefer the index/ tables — they are smaller and easier to scan.

For AI agents

All data paths are relative to skills/okx-v5-api/.

  1. Read sites.json to get the target site's rest domain. Use that as the REST base URL - never hardcode a single global domain. sites.json also carries ws domains for supplemental WebSocket docs.
  2. Derive the module from the endpoint path (2nd segment) and open index/<module>.md. Confirm the endpoint's column for your site is ✓. If it is ✗ (not supported), do not generate that call.
  3. The module table's doc is a reference path. For the exact per-site/per-lang path, look up the endpoint in index.json by method + path, take sites.<site>.doc.<lang>, and read docs/<site>/<lang>/<that> (or more generally <docs_dir>/<lang>/<that>, where docs_dir comes from sites.json, e.g. docs/us → docs/us/en/<that>). For normal single-endpoint files, YAML frontmatter carries the endpoint method/path/ rest/ws; the prose covers parameters, response, and rate limits.
    • If the doc frontmatter has multi_endpoint: true, do not read the entire file for a single endpoint. Use the generated Endpoint sections table or rg -n -F "<search key>" docs/<site>/<lang>/<that> to locate the target section, then read only that section and nearby shared definitions. For these files, keep the target method/path from index.json or the matched section; the file frontmatter method/path names only the first endpoint in the file.

Skill & install model

The skills/okx-v5-api/ skill is pure Markdown + bundled data — no Python, no scripts, no runtime dependency, and no network at query time. Unlike earlier releases, the routing layer and the endpoint bodies now travel with the skill, so there is nothing separate to clone and no docs_path/config file to set up.

npx skills add (or copying the skills/okx-v5-api/ directory) installs SKILL.md together with sites.json, index.json, index/, and docs/. The skill resolves everything relative to its own directory:

  1. Route: read sites.json + index/ (next to SKILL.md) to find the site domain, per-site support, and the target doc path.
  2. Read the body: open docs/<site>/<lang>/<doc> under the skill directory.

Provenance & disclaimer

Generated from the upstream OKX V5 API documentation source; see version and generated_at in sites.json / index.json for the exact release. For the authoritative, always-current reference, see the official OKX API documentation. This mirror is provided to make the docs consumable by AI tooling; verify against the official docs before relying on it in production.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors