> 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/reference/gateway/gateway-quote-price.md).

# Quote Price

**Returns a price quote without instructions or transaction data.** Use it when you need to **display prices** without the overhead of building executable transactions. The Gateway equivalent of [GetSwapPrice](/titan/developer-doc/swap-api/reference/direct/get-swap-price.md).

```
GET /api/v1/quote/price
```

**Authentication** — `Authorization: Bearer <token>` header or `?auth=<token>` query param. See [Connection & Negotiation](/titan/developer-doc/swap-api/reference/direct/connection.md#authentication) for JWT details.

***

## Query parameters

### Required

* **`inputMint`** — Input token mint address (base58).
* **`outputMint`** — Output token mint address (base58).
* **`amount`** — Amount in the smallest unit (e.g. lamports for SOL). **Not scaled by decimals.**

### Routing options

* **`dexes`** — Comma-separated venue labels to **include**. See [GetVenues](/titan/developer-doc/swap-api/reference/gateway/gateway-info.md#venues) for valid labels.
* **`excludeDexes`** — Comma-separated venue labels to **exclude**.

{% hint style="info" %}
This endpoint **does not** accept `userPublicKey`, `feeAccount`, or any transaction-related parameters. To get executable swap data, use [Quote Swap](/titan/developer-doc/swap-api/reference/gateway/gateway-quote-swap.md).
{% endhint %}

***

## Response

**The response body is MessagePack-encoded.** Set `Accept: application/vnd.msgpack` in your request headers.

The response is a [`SwapPrice`](/titan/developer-doc/swap-api/reference/direct/get-swap-price.md) object — **the same type returned by the Titan Direct `GetSwapPrice` RPC method.** See [GetSwapPrice](/titan/developer-doc/swap-api/reference/direct/get-swap-price.md) for the full type definition.

***

## Example

```typescript
import { Decoder } from '@msgpack/msgpack';

// useBigInt64 required — amounts are u64
const decoder = new Decoder({ useBigInt64: true });

// 1 SOL → USDC price check
const params = new URLSearchParams({
  inputMint: 'So11111111111111111111111111111111111111112',   // SOL
  outputMint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC
  amount: '1000000000', // 1 SOL in lamports
});

// Fetch price from Gateway
const res = await fetch(
  `${process.env.TITAN_ENDPOINT}/api/v1/quote/price?${params}`,
  {
    headers: {
      'Authorization': `Bearer ${process.env.TITAN_API_KEY}`,
      'Accept': 'application/vnd.msgpack', // Required for MessagePack response
    },
  }
);

if (!res.ok) {
  throw new Error(`${res.status}: ${res.statusText}`);
}

// Decode the MessagePack response
const buffer = await res.arrayBuffer();
const price = decoder.decode(new Uint8Array(buffer)) as any;

console.log('Output amount:', price.amountOut);
```

***

## Error responses

* **`400`** — **Invalid parameters.** Malformed pubkey, missing required field, or value out of bounds.
* **`401`** — **Missing or invalid authentication token.** Check your JWT and its claims.
* **`404`** — **No routes found** for this swap pair. Try relaxing routing constraints.

***

## Related pages

* [Quote Swap](/titan/developer-doc/swap-api/reference/gateway/gateway-quote-swap.md) — Full quote with executable transaction instructions, ready to sign and send
* [GetSwapPrice](/titan/developer-doc/swap-api/reference/direct/get-swap-price.md) — Direct (WebSocket) equivalent; returns the same `SwapPrice` type
* [Configure Routing](/titan/developer-doc/swap-api/guides/configure-routing.md) — Venue filtering strategies using `dexes` and `excludeDexes`
