Skip to main content
The okx-api repository ships a bundled llms.txt file designed to be fed directly into AI coding assistants and LLMs. Loading this file gives the model a compact, accurate representation of the entire SDK — dramatically improving the quality of generated code.

What is llms.txt?

The file is generated by Repomix and contains a packed, AI-optimised representation of the most important parts of the repository:
  • Directory structure of the SDK
  • All TypeScript source files (types, clients, utilities)
  • All example files (examples/Rest/, examples/Websocket/, examples/Auth/)
  • Compressed with a ⋮---- delimiter between code blocks to reduce token count
  • Sorted by git change frequency so the most actively maintained code appears last (highest weight for the model)
Files excluded from the pack include tests, compiled output (lib/, dist/), images, and the endpoint function list.

File format

Where to find it

The file is committed to the root of the repository:

How to use it

Claude

Attach llms.txt as a file in your conversation, or paste its contents. Claude will use it as context when generating SDK code.

ChatGPT

Upload llms.txt via the file attachment button. GPT-4o and later models handle large context files well.

Cursor

Add llms.txt to your Cursor project or reference it with @file llms.txt in your prompt. Cursor will index it for autocomplete.

Other tools

Any tool that accepts a context file or system prompt can consume llms.txt. Paste it into the system prompt or upload it as a document.

Example prompt

Once you have loaded llms.txt into your AI tool, you can ask questions like:
The model will generate accurate code using the real SDK interfaces rather than hallucinating method names or parameter shapes.
Refresh llms.txt periodically from the GitHub link above to ensure the AI is working with the latest SDK version.

Why it matters

Without llms.txt, LLMs often generate plausible-looking but incorrect SDK code — wrong method names, missing required parameters, or outdated patterns. With llms.txt loaded, the model has access to:
  • Every exported function and its exact signature
  • All TypeScript interfaces for request and response objects
  • Real working examples for REST, WebSocket, and WebSocket API patterns
  • Region configuration, demo trading, and authentication patterns