> For the complete documentation index, see [llms.txt](https://docs.triton.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.triton.one/solana/rpc-methods/sending-transactions/titan/titan-quote.md).

# Titan quotes

Stream real-time swap quotes over the Titan Swap API WebSocket.

Titan streams swap quotes in real time over a WebSocket, instead of REST polling. The Argos meta-aggregator sources from multiple DEX aggregators and RFQ venues, and DART (Dynamically Allocated Real-Time routing) re-optimises the trade at execution time. Connect over `wss://`, not `https://`.

The WebSocket carries binary MessagePack frames, not JSON, and the server sends quotes only after you open a quote stream. The [`@titanexchange/sdk-ts`](https://www.npmjs.com/package/@titanexchange/sdk-ts) TypeScript SDK handles the encoding, compression, and requests for you.

## Connect

{% tabs %}
{% tab title="TypeScript" %}

```typescript
// npm install @titanexchange/sdk-ts bs58
import { V1Client } from "@titanexchange/sdk-ts";
import bs58 from "bs58";

const client = await V1Client.connect(
  "wss://<your-endpoint>.mainnet.rpcpool.com/<your-token>/titan/api/v1/ws",
);

const { stream } = await client.newSwapQuoteStream({
  swap: {
    inputMint: bs58.decode("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"), // USDC
    outputMint: bs58.decode("So11111111111111111111111111111111111111112"), // wrapped SOL
    amount: 1_000_000, // raw amount: 1 USDC
  },
  transaction: {
    userPublicKey: bs58.decode("<your-wallet-public-key>"),
  },
});

for await (const update of stream) {
  for (const [provider, route] of Object.entries(update.quotes)) {
    console.log(provider, route.outAmount, route.instructions.length);
  }
}
```

{% endtab %}
{% endtabs %}

For a single price without a stream, call the SDK's `getSwapPrice()`.

For the full message protocol (requests, quote payloads, DART routing fields), see the [Titan Swap API reference](https://titan-exchange.gitbook.io/titan/developer-doc/swap-api/reference).

***

<i class="fa-life-ring">:life-ring:</i> Contact support by clicking the chat icon in your [customer dashboard](https://customers.triton.one)\ <i class="fa-briefcase">:briefcase:</i> Sales questions? [Contact us](https://triton.one/contact)\ <i class="fa-sparkles">:sparkles:</i> AI agent? Read [llms.txt](https://docs.triton.one/llms.txt)\ <i class="fa-rss">:rss:</i> Follow updates: [Blog](https://blog.triton.one) · [X](https://x.com/triton_one) · [YouTube](https://www.youtube.com/@triton_one_ltd) · [Telegram](https://t.me/tritonone) · [GitHub](https://github.com/rpcpool)
