> For the complete documentation index, see [llms.txt](https://docs.bloxroute.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bloxroute.com/solana/aggregator.md).

# Aggregator

The bloXroute Solana Aggregator finds optimized swap routes across supported Solana liquidity venues and builds the transaction, or the instruction set, needed to execute the swap.

## Base URLs

| Environment    | URL                       | Access                                                                                                                                                                                        |
| -------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Production     | `https://api.blox.ag`     | Paid bloXroute customers. Requires a bloXroute `Authorization` header and whitelisting on API side (please [contact support](https://docs.bloxroute.com/introduction/contact-us.md#support)). |
| Public Testing | `https://api-dev.blox.ag` | Free, rate-limited public endpoint for general use.                                                                                                                                           |

## On-chain program

The aggregator program is deployed at:

```
BLXJD1miMgFTjCNR9B9KRPnhXMQZQaANvC7EGRVeTphD
```

Every swap the API builds is a single instruction to this program, which executes the full route (including multi-hop and split routes) atomically.

## Endpoints

| Endpoint                                                                                                   | Method | Auth | Description                                                                |
| ---------------------------------------------------------------------------------------------------------- | ------ | ---- | -------------------------------------------------------------------------- |
| [`/v1/swap`](https://docs.bloxroute.com/solana/aggregator/api-reference/swap.md)                           | GET    | Yes  | Returns a compiled, unsigned, base64-encoded Solana v1 transaction.        |
| [`/v1/swap-instructions`](https://docs.bloxroute.com/solana/aggregator/api-reference/swap-instructions.md) | GET    | Yes  | Returns the uncompiled instruction set and the transaction configuration.  |
| [`/v1/tokens`](https://docs.bloxroute.com/solana/aggregator/api-reference/tokens.md)                       | GET    | Yes  | Searches tradable tokens, or looks tokens up by mint address.              |
| [`/v1/dexes`](https://docs.bloxroute.com/solana/aggregator/api-reference/dexes.md)                         | GET    | Yes  | Lists the DEX names accepted by the `dexes` and `excludeDexes` parameters. |
| [`/v1/health`](https://docs.bloxroute.com/solana/aggregator/api-reference/health.md)                       | GET    | No   | Service health check.                                                      |

{% hint style="info" %}
Use **`/v1/swap`** when you want a ready-to-sign transaction.

Use **`/v1/swap-instructions`** when your application needs to compose the aggregator swap with additional instructions before signing.
{% endhint %}

## Where to go next

* [Authentication](https://docs.bloxroute.com/solana/aggregator/getting-started/authentication.md): set up the `Authorization` header.
* [Quickstart](https://docs.bloxroute.com/solana/aggregator/getting-started/quickstart.md): request your first swap.
* [Errors and Status Codes](https://docs.bloxroute.com/solana/aggregator/errors.md): handle failures.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bloxroute.com/solana/aggregator.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
