For the complete documentation index, see llms.txt. This page is also available as Markdown.

AI / LLM Integration

Integrate Titan swap functionality into AI agents and LLM-powered applications.

Use Titan's swap infrastructure from AI agents, LLM tool-calling workflows, and autonomous trading systems.


Claude Code Skill

The fastest way to build Titan integrations with AI. The @titanexchange/titan-api-skill package gives Claude Code protocol-aware code generation for the Titan API.

What it provides

  • Protocol-aware code generation — Generates TypeScript with correct MessagePack encoding, BigInt amounts, and bs58-decoded token mints matching the Titan WebSocket API spec.

  • SDK and raw WebSocket support — Covers both SDK-based and direct WebSocket integration depending on developer needs.

  • Parameter structure enforcement — Places fields like slippageBps, intervalMs, and num_quotes in their correct nested objects matching the expected request schema.

  • Runnable examples included — Ships with working TypeScript examples that can be executed directly.

Installation

npx (recommended):

# For current project
npx @titanexchange/titan-api-skill

# For all projects (global)
npx @titanexchange/titan-api-skill --global

# Overwrite existing install
npx @titanexchange/titan-api-skill --force

Then type /titan-swap-api in Claude Code to use the skill.

Manual install (curl):

Quick example

Ask Claude Code:

"Help me stream USDC to SOL quotes using Titan API"

Claude will generate protocol-correct code:

Runnable examples

The /examples directory contains working TypeScript examples:

Required credentials

  • WS_URL — Titan WebSocket endpoint.

  • AUTH_TOKEN — API authentication token. See Get API Access.


LLM-friendly docs (llms.txt)

Titan's documentation is automatically available in LLM-optimized formats via the llms.txt standard. AI agents and LLMs can ingest the full docs without scraping HTML.

  • /llms.txt — Index of all doc sections with links to individual pages in Markdown format.

  • /llms-full.txt — The entire documentation as a single Markdown file — ideal for full-context ingestion.

  • Every page as .md — Append .md to any doc page URL to get the raw Markdown version.

These endpoints are generated automatically by GitBook and stay up-to-date with every publish. No configuration needed.


Key things to know

  • Protocol — WebSocket + MessagePack (not JSON).

  • Amounts — Must be BigInt, not number.

  • Token mints — Must be Uint8Array via bs58.decode().

  • ParametersslippageBps goes in swap, intervalMs goes in update.


Last updated