> For the complete documentation index, see [llms.txt](https://titan-exchange.gitbook.io/titan/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api.md).

# Swap API

- [Quickstart](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/quickstart.md): Get your first swap quote with Titan.
- [Guides](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/guides.md): Step-by-step guides for common Titan Swap API workflows.
- [Swap V2 vs Swap V3](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/guides/swap-v2-vs-v3.md): What Swap V3 changes over V2 and how to opt in.
- [Stream & Execute a Swap](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/guides/stream-and-execute.md): Connect to Titan Direct, stream live quotes, and execute a swap end to end.
- [Configure Routing](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/guides/configure-routing.md): Control which venues, providers, and route shapes Titan uses when computing swap quotes.
- [Fee Collection](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/guides/fee-collection.md): Collect a fee on every swap by specifying a fee account and basis-point rate in your request.
- [Transaction Template](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/guides/transaction-template.md): Reserve room in the swap transaction for your own instructions and address lookup tables — so the route Titan returns still fits when you assemble the final transaction.
- [Error Handling & Reconnect](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/guides/error-handling.md): Handle server errors, stream failures, and connection drops in Titan Direct integrations.
- [API Reference](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference.md): Complete API reference for Titan Direct (WebSocket) and Titan Gateway (REST).
- [Titan Direct vs Titan Gateway](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/direct-vs-gateway.md): Side-by-side comparison of Titan's two integration paths.
- [Titan Direct](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/direct.md): Titan Direct — persistent WebSocket API with real-time streaming swap quotes.
- [Connection & Negotiation](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/direct/connection.md): Connect to Titan Direct, negotiate the protocol version and compression, and send your first request.
- [GetInfo](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/direct/get-info.md): Read the server's protocol version and default settings before opening streams.
- [NewSwapQuoteStream](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/direct/new-swap-quote-stream.md): Open a streaming swap quote that updates continuously as on-chain state changes.
- [StopStream](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/direct/stop-stream.md): Stop an active quote stream by its ID.
- [GetVenues / ListProviders](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/direct/venues-providers.md): Discover available venues and quote providers at runtime.
- [GetSwapPrice](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/direct/get-swap-price.md): Get a price-only quote without transaction data.
- [Titan Gateway](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/gateway.md): Titan Gateway — simple REST endpoints backed by the Argos routing engine.
- [Quote Swap](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/gateway/gateway-quote-swap.md): Request swap quotes with executable instructions via REST.
- [Quote Price](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/gateway/gateway-quote-price.md): Get a price-only quote via REST without transaction data.
- [Info / Venues / Providers](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/gateway/gateway-info.md): Server info, venues, and providers via REST.
- [Wire Protocol](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/wire-protocol.md): MessagePack encoding conventions, data types, and serialization rules for Titan's API.
- [Types Reference](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/types.md): Quick reference index for all Titan API types — links to the page where each type is defined.
- [Error Codes](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference/error-codes.md): Error codes returned by the Titan API.
