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.
Package: @titanexchange/titan-api-skill
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, andnum_quotesin 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 --forceThen 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.mdto any doc page URL to get the raw Markdown version.
Key things to know
Protocol — WebSocket + MessagePack (not JSON).
Amounts — Must be
BigInt, notnumber.Token mints — Must be
Uint8Arrayviabs58.decode().Parameters —
slippageBpsgoes inswap,intervalMsgoes inupdate.
Related pages
SDK Reference — TypeScript and Rust SDK documentation
Connection & Negotiation — WebSocket setup and protocol details
Quickstart — End-to-end integration example
Last updated

