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

# Overview

Peach Aggregator is a BSC DEX aggregation service with a TypeScript SDK for route discovery, quote retrieval, transaction preparation, simulation, and swap execution.

### What It Does <a href="#what-it-does" id="what-it-does"></a>

Peach is built for integrators that need:

* **Route discovery** — find optimal swap paths across multiple DEX protocols
* **Quote retrieval** — get real-time price quotes with gas estimates and price impact
* **Transaction preparation** — build ready-to-sign approval and swap transactions

### Supported DEX Protocols <a href="#supported-dex-protocols" id="supported-dex-protocols"></a>

<table><thead><tr><th width="194.1015625">Provider</th><th width="218.83203125">Protocol</th><th>Description</th></tr></thead><tbody><tr><td><code>PANCAKEV1</code></td><td>PancakeSwap V1</td><td>AMM constant-product</td></tr><tr><td><code>PANCAKEV2</code></td><td>PancakeSwap V2</td><td>AMM constant-product pools</td></tr><tr><td><code>PANCAKEV3</code></td><td>PancakeSwap V3</td><td>Concentrated liquidity pools</td></tr><tr><td><code>PANCAKE_INFINITY_CL</code></td><td>PancakeSwap Infinity CL</td><td>PancakeSwap Infinity concentrated liquidity</td></tr><tr><td><code>PANCAKE_INFINITY_LB</code></td><td>PancakeSwap Infinity LB</td><td>Infinity liquidity book (bins)</td></tr><tr><td><code>UNISWAPV2</code></td><td>Uniswap V2</td><td>AMM constant-product</td></tr><tr><td><code>UNISWAPV3</code></td><td>Uniswap V3</td><td>Concentrated liquidity pools</td></tr><tr><td><code>UNISWAPV4</code></td><td>Uniswap V4</td><td>Singleton pool architecture</td></tr><tr><td><code>DODO</code></td><td>DODO</td><td>PMM (Proactive Market Maker) pools</td></tr><tr><td><code>THENAV3</code></td><td>Thena V3</td><td>Concentrated liquidity (Algebra)</td></tr><tr><td><code>THENA_FUSION</code></td><td>Thena Fusion</td><td>Algebra Fusion concentrated liquidity</td></tr><tr><td><code>NOMISWAP_STABLE</code></td><td>Nomiswap Stable</td><td>Stableswap-style pools</td></tr><tr><td><code>WOMBAT</code></td><td>Wombat</td><td>Single-sided stableswap</td></tr><tr><td><code>LISTA_STABLE</code></td><td>Lista StableSwap</td><td>Stableswap</td></tr><tr><td><code>BISWAP</code></td><td>BiSwap</td><td>AMM constant-product pools</td></tr><tr><td><code>APESWAP</code></td><td>APESWAP</td><td>AMM constant-product pools</td></tr><tr><td><code>BABYDOGESWAP</code></td><td>BabyDogeSwap</td><td>AMM constant-product pools</td></tr><tr><td><code>BABYSWAP</code></td><td>BabySwap</td><td>AMM constant-product pools</td></tr><tr><td><code>BAKERYSWAP</code></td><td>BakerySwap</td><td>AMM constant-product</td></tr><tr><td><code>SQUADSWAP_V2</code></td><td>SquadSwap V2</td><td>AMM constant-product</td></tr><tr><td><code>SQUADSWAP_V3</code></td><td>SquadSwap V3</td><td>Concentrated liquidity</td></tr><tr><td><code>SUSHISWAP_V2</code></td><td>SushiSwap V2</td><td>AMM constant-product</td></tr><tr><td><code>SUSHISWAP_V3</code></td><td>SushiSwap V3</td><td>Concentrated liquidity</td></tr></tbody></table>

All 24 providers are enabled by default. You can restrict to specific providers via `options.providers` in `getQuote()`.

### Integration Entry Points <a href="#integration-entry-points" id="integration-entry-points"></a>

#### SDK <a href="#sdk" id="sdk"></a>

{% embed url="<https://www.npmjs.com/package/@masterpeach/aggregator-sdk>" %}

Use the SDK when you want the fastest integration path and a cleaner abstraction around quotes, approvals, and transaction building.

```ts
import { PeachClient, BSC_MAINNET_CONFIG } from "@masterpeach/aggregator-sdk";

const client = new PeachClient(config, provider?, options?);
```

Recommended flow:

1. `getQuote()` — retrieve a quote with routing details
2. `swap()` — build approval + swap transaction requests
3. Send transactions via your wallet/signer

#### Execution Router

The Execution Router is an additional execution path. The legacy `getQuote()` and `swap()` PeachRouter flow remains supported.

It supports two role-based modes:

* `DIRECT_ALLOWANCE` when `payer == executor`
* `PERMIT2_WITNESS` when `payer != executor`

The SDK validates responses cryptographically and structurally before signing or sending. `PeachConfig.executionRouterAddress` optionally pins the router address. Without a pin, the SDK uses the API-returned address and validates that the transaction or authorization binds to it.

See [Core Features](/documentation/bsc/aggregator/editor.md) for workflow details.

#### API <a href="#api" id="api"></a>

Use the API directly when you want full control over the request layer and map Peach routing into your own internal models.

* `GET /router/find_routes` — returns route paths, amounts, gas estimate, and contract addresses
* `GET /router/status` — returns available providers and chainflow sync status


---

# 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.peach.ag/documentation/bsc/aggregator/readme.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.
