> 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/direct/venues-providers.md).

# GetVenues / ListProviders

Discover available venues and quote providers at runtime.

**Use `GetVenues` to list every on-chain venue Titan can route through, and `ListProviders` to list the quote providers that compete for best execution.** Both are lightweight lookups you can issue at any time on an open connection.

***

## GetVenues

Returns venue labels (and optionally their Solana program IDs) that are valid values for the `dexes` and `excludeDexes` routing parameters.

### Request

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

```rust
struct GetVenuesRequest {
  /// Whether to include the program ID for each venue.
  includeProgramIds: Option<bool>,
}
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
interface GetVenuesRequest {
  // Whether to include the program ID for each venue.
  includeProgramIds?: boolean;
}
```

{% endtab %}
{% endtabs %}

### Response

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

```rust
struct VenueInfo {
  /// List of venue labels. Each is a valid value for `dexes` and `excludeDexes`.
  labels: Vec<String>,
  /// Program ID for each label, same order. Only present when `includeProgramIds` is true.
  programIds: Option<Vec<Pubkey>>,
}
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
interface VenueInfo {
  // Venue labels, valid for `dexes` and `excludeDexes` parameters.
  labels: string[];
  // Program ID for each label. Only present when `includeProgramIds` is true.
  programIds?: Pubkey[];
}
```

{% endtab %}
{% endtabs %}

### Example

```typescript
// Request all venues with their on-chain program IDs
await sendRequest(ws, requestId++, {
  GetVenues: { includeProgramIds: true },
});

ws.on('message', async (raw: Buffer) => {
  const msg = await decodeMessage(raw);

  if ('Response' in msg && 'GetVenues' in msg.Response.data) {
    const venues = msg.Response.data.GetVenues;
    console.log('Venue count:', venues.labels.length);
    console.log('Labels:', venues.labels);
    // e.g. ['Raydium', 'Whirlpool', 'Phoenix', 'Meteora', ...]
  }
});
```

See [Connection & Negotiation](/titan/developer-doc/swap-api/reference/direct/connection.md#sending-a-request) for `sendRequest` and `decodeMessage` setup.

***

## ListProviders

**Returns the list of quote providers currently active on the server.** Each provider independently competes to deliver the best-priced route for every quote stream.

### Request

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

```rust
struct ListProvidersRequest {
  /// Whether to include icon URLs for each provider.
  /// By default, icons are not included.
  includeIcons: Option<bool>,
}
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
interface ListProvidersRequest {
  // Whether to include icon URLs for each provider.
  // By default, icons are not included.
  includeIcons?: boolean;
}
```

{% endtab %}
{% endtabs %}

### Response

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

```rust
struct ProviderInfo {
  /// Provider identifier. Valid value for the `providers` routing parameter.
  id: String,
  /// Human-readable display name.
  name: String,
  /// What kind of provider this is.
  kind: ProviderKind,
  /// URI for a 48x48 icon, if requested and available.
  iconUri48: Option<String>,
}

enum ProviderKind {
  DexAggregator,
  RFQ,
}
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
interface ProviderInfo {
  // Provider identifier. Valid for the `providers` routing parameter.
  id: string;
  // Human-readable display name.
  name: string;
  // What kind of provider this is.
  kind: ProviderKind;
  // URI for a 48x48 icon, if requested and available.
  iconUri48?: string;
}

type ProviderKind = "DexAggregator" | "RFQ";
```

{% endtab %}
{% endtabs %}

### Example

```typescript
// Request all active providers
await sendRequest(ws, requestId++, {
  ListProviders: { includeIcons: false },
});

ws.on('message', async (raw: Buffer) => {
  const msg = await decodeMessage(raw);

  if ('Response' in msg && 'ListProviders' in msg.Response.data) {
    const providers = msg.Response.data.ListProviders;
    providers.forEach((p: any) => {
      console.log(`${p.name} (${p.id}) — ${p.kind}`);
      // e.g. "Titan (Titan) — DexAggregator"
    });
  }
});
```

See [Connection & Negotiation](/titan/developer-doc/swap-api/reference/direct/connection.md#sending-a-request) for `sendRequest` and `decodeMessage` setup.

***

## Related pages

* [Configure Routing](/titan/developer-doc/swap-api/guides/configure-routing.md) — filter by venue or provider when opening a quote stream
* [GetInfo](/titan/developer-doc/swap-api/reference/direct/get-info.md) — server settings and protocol version
* [NewSwapQuoteStream](/titan/developer-doc/swap-api/reference/direct/new-swap-quote-stream.md) — open a streaming swap quote
