> For the complete documentation index, see [llms.txt](https://docs.liqd.ag/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.liqd.ag/liquidswap-integration/find-pools.md).

# Find Pools

Returns all pools that contain a specific token pair. This endpoint is useful for discovering available liquidity sources, comparing rates across different DEXs, and analyzing market depth for specific token pairs.

**Endpoint:** `GET https://api.liqd.ag/pools`

**Authentication**: None required - publicly accessible

**Rate Limits**: No rate limits

### Required Parameters

| Name     | Type    | Description                 | Required |
| -------- | ------- | --------------------------- | -------- |
| `tokenA` | address | Address of the first token  | Yes      |
| `tokenB` | address | Address of the second token | Yes      |

### Optional Parameters

| Name           | Type   | Description                                            | Default |
| -------------- | ------ | ------------------------------------------------------ | ------- |
| `excludeDexes` | string | Comma-separated list of router indices to exclude      | none    |
| `includeDexes` | string | Comma-separated list of router indices to include only | none    |

**Parameter Details:**

* **tokenA & tokenB**: The order doesn't matter - the API will find pools containing both tokens regardless of which is specified first
* **excludeDexes**: Useful if you want to exclude specific protocols from your analysis. Refer to the router indices in the response to identify which numbers correspond to which DEXs
* **includeDexes**: Useful if you want to include only specific protocols in your analysis. Cannot be used together with excludeDexes - use one or the other

**Example Requests:**

```
# Basic pool discovery
GET https://api.liqd.ag/pools?tokenA=0x47bb061C0204Af921F43DC73C7D7768d2672DdEE&tokenB=0xF26A8ab118f4C46A2D3C0C5cF4bf446008efBf8c

# Exclude specific DEXs (router indices 1 and 3)
GET https://api.liqd.ag/pools?tokenA=0x47bb061C0204Af921F43DC73C7D7768d2672DdEE&tokenB=0xF26A8ab118f4C46A2D3C0C5cF4bf446008efBf8c&excludeDexes=1,3

# Include only specific DEXs (router indices 5 and 15)
GET https://api.liqd.ag/pools?tokenA=0x47bb061C0204Af921F43DC73C7D7768d2672DdEE&tokenB=0xF26A8ab118f4C46A2D3C0C5cF4bf446008efBf8c&includeDexes=5,15


```

**Example Response:**

```json
{
  "success": true,
  "data": [
    {
      "poolAddress": "0x...",
      "pairedToken": "0x...",
      "routerIndex": 1,
      "fee": 0,
      "stable": true,
      "protocol": "KittenSwap",
      "pair": "WETH/USDC",
      "price": "1845.32"
    },
    {
      "poolAddress": "0x...",
      "pairedToken": "0x...",
      "routerIndex": 3,
      "fee": 500,
      "stable": false,
      "protocol": "HyperSwapV3",
      "pair": "WETH/USDC",
      "price": "1842.75"
    }
  ]
}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.liqd.ag/liquidswap-integration/find-pools.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
