> For the complete documentation index, see [llms.txt](https://noodles-finance.gitbook.io/docs.noodles.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://noodles-finance.gitbook.io/docs.noodles.fi/dex-pools/pool-events.md).

# Pool Events

Retrieve all events (both liquidity and trading events) for a specific liquidity pool with pagination support.

***

## **Endpoint**

```curl
GET /api/v1/partner/pool/event/all
```

***

## **Request Parameters**

| Name              | Type   | Required | Description                                                                                                                                                     |
| ----------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pool_address`    | string | No       | The address of the liquidity pool.                                                                                                                              |
| `protocols`       | string | No       | Comma-separated list of protocol identifiers (e.g., `cetus-clmm,aftermath-cpmm`). Maximum 20 protocols per request.                                             |
| `action`          | string | No       | Filter by action: `join`, `exit`, `buy`, `sell`, or multiple values separated by comma (e.g., `join,exit` or `buy,sell`). If omitted, all actions are returned. |
| `limit`           | int    | No       | Number of records to return (default: 20, max: see backend config).                                                                                             |
| `desc`            | bool   | No       | Fetch order: `true` for descending (default), `false` for ascending.                                                                                            |
| `cursor`          | int64  | No       | Cursor for pagination.                                                                                                                                          |
| `from`            | int64  | No       | Start time filter (Unix millisecond timestamp). Must be used with `to`.                                                                                         |
| `to`              | int64  | No       | End time filter (Unix millisecond timestamp). Must be used with `from`.                                                                                         |
| `from_checkpoint` | int64  | No       | Start checkpoint filter. Must be used with `to_checkpoint`.                                                                                                     |
| `to_checkpoint`   | int64  | No       | End checkpoint filter. Must be used with `from_checkpoint`.                                                                                                     |

#### List of Supported Protocols

See [Pool Data Supported Protocol](https://github.com/NoodlesFi/docs/blob/main/api/supported-protocols.md#pool-data-supported-protocol) for the complete list of protocol identifiers and their names.

**Pagination Notes:**

* If `desc=false`, `cursor` must be provided.
* If `desc=true`, `cursor` can be omitted for the first page.
* If you want to fetch the latest events, you can omit `cursor`, just provide `pool_address` and `limit`.
* If you want to fetch the next page, you must provide `cursor`.
* If you want to fetch the previous page, you must provide `cursor` with `desc=false`.

**Filter Notes:**

* **Time Range**: Both `from` and `to` must be provided together. Maximum range is 60 days.
* **Checkpoint Range**: Both `from_checkpoint` and `to_checkpoint` must be provided together. Maximum range is 2 million checkpoints.
* Time and checkpoint filters can be used independently or together with other parameters.

***

## **Headers**

| Header      | Required | Description                |
| ----------- | -------- | -------------------------- |
| `x-api-key` | No       | API key for authorization. |

***

## **cURL Examples**

### Get All Events

```bash
curl --location 'https://api.noodles.fi/api/v1/partner/pool/event/all?pool_address=0x682f4b17874ec47723bb527cf21e18b630eba0699d10781740cd0a7964dc6b19&cursor=865526449' \
--header 'x-api-key: YOUR_API_KEY'
```

### Filter by Action Type

```bash
curl --location 'https://api.noodles.fi/api/v1/partner/pool/event/all?pool_address=0x682f4b17874ec47723bb527cf21e18b630eba0699d10781740cd0a7964dc6b19&action=join&limit=10' \
--header 'x-api-key: YOUR_API_KEY'
```

### Filter by Time Range

```bash
curl --location 'https://api.noodles.fi/api/v1/partner/pool/event/all?pool_address=0x682f4b17874ec47723bb527cf21e18b630eba0699d10781740cd0a7964dc6b19&from=1765118000000&to=1765120000000&limit=20' \
--header 'x-api-key: YOUR_API_KEY'
```

### Filter by Checkpoint Range

```bash
curl --location 'https://api.noodles.fi/api/v1/partner/pool/event/all?pool_address=0x682f4b17874ec47723bb527cf21e18b630eba0699d10781740cd0a7964dc6b19&from_checkpoint=1000000&to_checkpoint=1050000&limit=20' \
--header 'x-api-key: YOUR_API_KEY'
```

### Filter by Multiple Actions

```bash
curl --location 'https://api.noodles.fi/api/v1/partner/pool/event/all?pool_address=0x682f4b17874ec47723bb527cf21e18b630eba0699d10781740cd0a7964dc6b19&action=join,exit,trade&limit=20' \
--header 'x-api-key: YOUR_API_KEY'
```

### Filter by Protocols

```bash
curl --location 'https://api.noodles.fi/api/v1/partner/pool/event/all?protocols=cetus-clmm,aftermath-cpmm,bluefin-clmm&limit=20' \
--header 'x-api-key: YOUR_API_KEY'
```

### Filter by Protocols and Actions

```bash
curl --location 'https://api.noodles.fi/api/v1/partner/pool/event/all?protocols=cetus-clmm,aftermath-cpmm&action=join,exit&limit=20' \
--header 'x-api-key: YOUR_API_KEY'
```

***

## **Response Format**

The endpoint returns a unified response containing both trade and liquidity events, sorted by timestamp.

### Response Fields

| Field        | Type     | Nullable | Description                         |
| ------------ | -------- | -------- | ----------------------------------- |
| `code`       | `number` | No       | HTTP status code (200 for success). |
| `message`    | `string` | No       | Status message.                     |
| `data`       | `array`  | No       | Array of event objects.             |
| `pagination` | `object` | No       | Pagination info for next page.      |

### Pagination Object

| Field            | Type  | Nullable | Description                              |
| ---------------- | ----- | -------- | ---------------------------------------- |
| `last_cursor`    | int64 | Yes      | Cursor for next page.                    |
| `last_timestamp` | int64 | Yes      | **Deprecated:** Timestamp for next page. |
| `limit`          | int64 | Yes      | Page size.                               |

***

## **Event Object Structure**

Each event in the response contains the following base fields, with additional fields depending on the event type:

### Base Event Fields

| Field           | Type   | Nullable | Description                             |
| --------------- | ------ | -------- | --------------------------------------- |
| `id`            | int64  | No       | Unique event ID.                        |
| `timestamp`     | int64  | No       | Event timestamp (ms since epoch).       |
| `action`        | string | No       | Event type: `join`, `exit`, or `trade`. |
| `pool_address`  | string | No       | Pool address.                           |
| `coin_a_type`   | string | No       | Coin A type.                            |
| `coin_b_type`   | string | No       | Coin B type.                            |
| `coin_a_symbol` | string | No       | Coin A symbol.                          |
| `coin_b_symbol` | string | No       | Coin B symbol.                          |
| `amount_a`      | float  | No       | Amount of coin A.                       |
| `amount_b`      | float  | No       | Amount of coin B.                       |
| `amount_a_usd`  | float  | No       | USD value of amount A.                  |
| `amount_b_usd`  | float  | No       | USD value of amount B.                  |
| `tx_digest`     | string | No       | Transaction digest.                     |
| `sender`        | string | No       | Sender address.                         |

### Additional Fields for Trade Events

| Field    | Type   | Nullable | Description                                           |
| -------- | ------ | -------- | ----------------------------------------------------- |
| `price`  | float  | Yes      | Trade price (only present for trade events).          |
| `a_to_b` | bool   | Yes      | Trade direction: true if A to B (only for trades).    |
| `source` | string | Yes      | Source DEX name (only for trade events, may be null). |

***

## **Response Examples**

```json
{
    "code": 200,
    "data": [
        {
            "id": 652887168561184772,
            "timestamp": 1765119631042,
            "action": "trade",
            "pool_address": "0xb0a595cb58d35e07b711ac145b4846c8ed39772c6d6f6716d89d71c64384543b",
            "coin_a_type": "0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068::usdt::USDT",
            "coin_b_type": "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
            "coin_a_symbol": "USDT",
            "coin_b_symbol": "USDC",
            "price": 1,
            "amount_a": 3.964677,
            "amount_b": 3.965594,
            "amount_a_usd": 3.964677,
            "amount_b_usd": 3.964677,
            "a_to_b": true,
            "tx_digest": "7Hn4TyvSTAakYME2TjSZCd6oFzKyBjdNoFJmBooAMqP1",
            "sender": "0xcf4fc9c115c58cf82437d2953898419b1b10ff61ead1901a188782e6534cadb4",
            "source": "7k-aggregator"
        },
        {
            "id": 652881706491052034,
            "timestamp": 1765118328783,
            "action": "trade",
            "pool_address": "0xb0a595cb58d35e07b711ac145b4846c8ed39772c6d6f6716d89d71c64384543b",
            "coin_a_type": "0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068::usdt::USDT",
            "coin_b_type": "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
            "coin_a_symbol": "USDT",
            "coin_b_symbol": "USDC",
            "price": 1,
            "amount_a": 1.111845,
            "amount_b": 1.112101,
            "amount_a_usd": 1.111845,
            "amount_b_usd": 1.111845,
            "a_to_b": true,
            "tx_digest": "38aGi6r7FynQKEpymXi7LBvsDCw3ASwphy7iBQN5zBZb",
            "sender": "0xce1bf5805a35572df6eb11bb52fed620ad6872be693382ef7b04bf0461c1daf5",
            "source": "7k-aggregator"
        },
        {
            "id": 652880548015898635,
            "timestamp": 1765118052581,
            "action": "trade",
            "pool_address": "0xb0a595cb58d35e07b711ac145b4846c8ed39772c6d6f6716d89d71c64384543b",
            "coin_a_type": "0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068::usdt::USDT",
            "coin_b_type": "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
            "coin_a_symbol": "USDT",
            "coin_b_symbol": "USDC",
            "price": 1,
            "amount_a": 0.384256,
            "amount_b": 0.384344,
            "amount_a_usd": 0.384256,
            "amount_b_usd": 0.384256,
            "a_to_b": true,
            "tx_digest": "GZ8f97WXB1PwiRDMykB7innxTvNwenAD5t5PYpvHfTF ",
            "sender": "0x71e0e0803d53d5c4d8f0e8ff0dda78a0490067410e2fccc0646191373ec73e54",
            "source": "7k-aggregator"
        }
    ],
    "message": "OK",
    "pagination": {
        "last_cursor": 652880548015898635,
        "last_timestamp": 1765118052581,
        "limit": 3
    }
}
```

### Response when no data is available

```json
{
    "code": 200,
    "message": "OK",
    "data": [],
    "pagination": {
        "last_cursor": null,
        "last_timestamp": null,
        "limit": 20
    }
}
```

***

## **Use Cases**

This unified API is useful for:

* Building comprehensive pool analytics dashboards with all event types
* Creating unified timeline views of pool activity
* Tracking complete pool history (trades and liquidity changes)
* Analyzing correlations between trading and liquidity events
* Building real-time pool monitoring systems
* Creating detailed pool activity reports
* Developing pool performance analytics tools

***

> **See also:** [Environment Setup](/docs.noodles.fi/environment-setup/environment.md)


---

# 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://noodles-finance.gitbook.io/docs.noodles.fi/dex-pools/pool-events.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.
