> 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/market/market-stats.md).

# Market Stats

## Overview

Get aggregated market statistics for one or more protocols over a specified timeframe and interval.

## Endpoint

```
GET /api/v1/partner/market/stats
```

## Query Parameters

| Parameter   | Type   | Required | Description                                                                                                                               |
| ----------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `timeframe` | string | Yes      | Time window for aggregation (e.g. `1d`).                                                                                                  |
| `protocols` | string | No       | Comma-separated list of protocol identifiers to include (e.g. `flowx-clmm,flowx-cpmm`). If not provided, returns stats for all protocols. |

#### List of supported timeframes:

| Timeframe Key | Duration |
| ------------- | -------- |
| `1d`          | 1 day    |
| `1w`          | 1 week   |

#### List of supported protocols:

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

## Headers

| Header      | Required | Description                               |
| ----------- | -------- | ----------------------------------------- |
| `x-api-key` | No       | API key for authentication (if required). |

## **cURL Examples**

### Get Stats for Specific Protocols

```sh
curl --location 'https://api.noodles.fi/api/v1/partner/market/stats?timeframe=1w&protocols=flowx-clmm,flowx-cpmm' \
  --header 'Accept: application/json' \
  --header 'x-api-key: YOUR_API_KEY'
```

### Get Stats for All Protocols

```sh
curl --location 'https://api.noodles.fi/api/v1/partner/market/stats?timeframe=1w' \
  --header 'Accept: application/json' \
  --header 'x-api-key: YOUR_API_KEY'
```

## **Response**

### Fields

| Field     | Type   | Description                              |
| --------- | ------ | ---------------------------------------- |
| `code`    | number | HTTP-like response code (200 = success). |
| `message` | string | Human-readable status message.           |
| `data`    | array  | Array of protocol statistics objects.    |

#### Protocol statistics object:

| Field           | Type    | Description                                     |
| --------------- | ------- | ----------------------------------------------- |
| `protocol`      | string  | Protocol identifier.                            |
| `trade`         | integer | Number of trades in the selected timeframe.     |
| `volume`        | number  | Traded volume (USD) in the selected timeframe.  |
| `fee`           | number  | Fees collected (USD) in the selected timeframe. |
| `active_wallet` | integer | Count of unique active wallets.                 |
| `market_cap`    | number  | Market capitalization (USD).                    |
| `tvl`           | number  | Total value locked (USD).                       |

### Success Response

```json
{
    "code": 200,
    "message": "OK",
    "data": [
        {
            "protocol": "flowx-clmm",
            "trade": 35877,
            "volume": 8436971.423051924,
            "fee": 177.13389906195562,
            "tvl": 3352421.793046631
        },
        {
            "protocol": "flowx-cpmm",
            "trade": 3131,
            "volume": 27044.38049921295,
            "fee": 84.12411452460161,
            "tvl": 587171.3803198142
        }
    ]
}
```

***

> **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/market/market-stats.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.
