> For the complete documentation index, see [llms.txt](https://docs.ferra.ag/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ferra.ag/integration/aggregator-v2/typescript-sdk/overview.md).

# Overview

## Ferra Aggregator V2 SDK

The Ferra Aggregator V2 SDK is a powerful TypeScript library for integrating decentralized exchange (DEX) aggregation functionality into your Sui blockchain applications. It aggregates quotes from multiple external DEX providers and executes swaps through Ferra's unified wrapper contracts.

### Key Features

* **Multi-Provider Aggregation**: Get the best quotes from Cetus, FlowX, and Bluefin aggregators
* **Unified Execution**: Execute swaps through Ferra's wrapper contracts for consistent interface
* **Flexible Configuration**: Enable/disable providers dynamically
* **Customizable Slippage**: Configure slippage tolerance in basis points
* **Type Safety**: Full TypeScript support with comprehensive type definitions
* **Transaction Composability**: Build complex multi-step transactions with customizable swap functions

### Architecture

```
┌─────────────────────────────────────────────────────────────────┐
│                    Ferra Aggregator V2 SDK                      │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌──────────────┐    ┌──────────────┐    ┌──────────────┐       │
│  │    Cetus     │    │    FlowX     │    │   Bluefin    │       │
│  │  Aggregator  │    │  Aggregator  │    │  Aggregator  │       │
│  └──────┬───────┘    └──────┬───────┘    └──────┬───────┘       │
│         │                   │                   │               │
│         └───────────────────┼───────────────────┘               │
│                             │                                   │
│                             ▼                                   │
│                   ┌──────────────────┐                          │
│                   │   Quote Router   │                          │
│                   │                  │                          │
│                   └────────┬─────────┘                          │
│                            │                                    │
│                            ▼                                    │
│                   ┌──────────────────┐                          │
│                   │   TxBuilder      │                          │
│                   │  (Swap Builder)  │                          │
│                   └────────┬─────────┘                          │
│                            │                                    │
│                            ▼                                    │
│         ┌──────────────────────────────────────┐                │
│         │     Ferra Wrapper Contracts (Sui)    │                │
│         │  ┌────────┐ ┌────────┐ ┌──────────┐  │                │
│         │  │ Cetus  │ │ FlowX  │ │ Bluefin  │  │                │
│         │  │Wrapper │ │Wrapper │ │ Wrapper  │  │                │
│         │  └────────┘ └────────┘ └──────────┘  │                │
│         └──────────────────────────────────────┘                │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
```

### Supported Providers

| Provider    | Status   | Description                         |
| ----------- | -------- | ----------------------------------- |
| **Cetus**   | ✅ Active | Cetus Aggregator - primary provider |
| **FlowX**   | ✅ Active | FlowX DEX aggregator                |
| **Bluefin** | ✅ Active | Bluefin 7K aggregator               |
