Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/tiagosiebler/coinbase-api/llms.txt

Use this file to discover all available pages before exploring further.

Large language models trained on general code may produce plausible but incorrect usage of the coinbase-api SDK — inventing method names, guessing parameter shapes, or mixing up API clients. The SDK ships an llms.txt file specifically designed to fix this by giving AI tools accurate, structured knowledge of every function and its parameters.

What is llms.txt?

llms.txt is a compact, AI-optimised representation of the entire SDK surface area. It is generated using Repomix and contains:
  • A complete listing of all SDK functions across every client (CBAdvancedTradeClient, CBAppClient, CBExchangeClient, CBInternationalClient, CBPrimeClient, CBCommerceClient, and WebsocketClient)
  • Parameter names and types for each method
  • Structural context about how clients, authentication, and WebSocket keys relate to one another
  • Enough surrounding code structure for an LLM to reason about patterns like error handling, subscription flow, and signing
When an LLM has this file in its context window, it produces correct method names, accurate parameter types, and idiomatic usage patterns rather than hallucinating an API shape.

Where to Find the File

The llms.txt file is included in the npm package’s files field, so it is shipped with every install:
# After installing the package:
cat node_modules/coinbase-api/llms.txt
You can also access it directly from the GitHub repository:
https://github.com/tiagosiebler/coinbase-api/blob/master/llms.txt

How to Use It with AI Tools

Copy the full contents of llms.txt and paste it at the start of your conversation before asking your coding question:
Here is the SDK reference for coinbase-api. Use this as the authoritative
source for all method names and parameters:

[paste llms.txt contents here]

Now help me write a function that subscribes to the BTC-USD ticker...

Why It Dramatically Improves Code Generation

Without SDK context, LLMs frequently make these mistakes when writing coinbase-api code:
Without llms.txtWith llms.txt
Invents method names that don’t existUses exact method names from the SDK
Guesses parameter structuresUses the correct TypeScript parameter types
Confuses which client to use for which APICorrectly maps API groups to their clients
Misses required fields like client_order_idIncludes all required fields with proper values
Uses incorrect WebSocket key stringsUses valid WsKey values from WS_KEY_MAP
Combine llms.txt with this documentation for the best results. Use llms.txt to give your AI assistant accurate function signatures, and reference these docs pages for conceptual guidance on error handling, authentication patterns, and WebSocket lifecycle management.

The File is Always Up to Date

Because llms.txt is included in the npm package’s files field alongside the compiled dist/ output, the version of llms.txt in your node_modules always matches the version of the SDK you have installed. Updating the package with npm update coinbase-api automatically updates the AI context file too.
// package.json (from the coinbase-api package)
{
  "files": [
    "dist/*",
    "llms.txt"
  ]
}
The llms.txt file is generated using Repomix and contains a compressed, structured view of the most important parts of the codebase. Binary files, test files, and auto-generated endpoint lists are excluded to keep the context window usage efficient.

Build docs developers (and LLMs) love