> 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/ohlcv/pool-ohlcv.md).

# OHLCV for a LP address

Retrieve the OHLCV (Open, High, Low, Close, Volume) chart data for a specific liquidity pool, with flexible time range and bucket interval.

***

## **Endpoint**

```
GET /api/v1/partner/pool/ohlcv
```

***

## **Request Parameters**

| Name           | Type   | Required | Description                                                         |
| -------------- | ------ | -------- | ------------------------------------------------------------------- |
| `pool_address` | string | Yes      | The address of the liquidity pool.                                  |
| `bucket`       | int    | Yes      | The interval (in minutes) for each OHLCV data point.                |
| `from`         | int    | No       | Start of the time range (Unix timestamp in seconds).                |
| `to`           | int    | No       | End of the time range (Unix timestamp in seconds). Defaults to now. |
| `limit`        | int    | No       | Number of data points to return.                                    |

**Note:**

* If `from` is omitted, the range is determined by `limit` and `to`.
* If `to` is omitted, it defaults to the current time.
* The `from` and `to` range must be within maximum 500 data points. (e.g., if `bucket` is 1 hour, the range can be up to 500 hours).
* `bucket` is required and determines the granularity of the chart.
* `limit` is optional and defaults to 500, maximum is 500 data points.
* The `bucket` must be one of the following: 1, 5, 15, 60 (1 hour), 240 (4 hours), 1440 (1 day), 10080 (1 week), or 43200 (1 month).

***

## **Headers**

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

***

## **cURL Example**

```bash
curl --location 'http://api.noodles.fi/api/v1/partner/pool/ohlcv?pool_address=0xe4455aac45acee48f8b69c671c245363faa7380b3dcbe3af0fbe00cc4b68e9eb&from=1748502901&to=1748515500&bucket=60' \
--header 'x-api-key: YOUR_API_KEY'
```

***

## **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 OHLCV arrays. Each entry is: `[timestamp, open, high, low, close, volume]` |

**Note:**

* The response data will automatically fill in missing buckets with volume 0.
* The `data` array contains OHLCV data points for the specified pool and time range.

| Index | Field       | Description                           |
| ----- | ----------- | ------------------------------------- |
| 0     | `timestamp` | Unix timestamp for the bucket period. |
| 1     | `open`      | The opening price.                    |
| 2     | `high`      | The highest price.                    |
| 3     | `low`       | The lowest price.                     |
| 4     | `close`     | The closing price.                    |
| 5     | `volume`    | Trading volume.                       |

### Success Response

```json
{
    "code": 200,
    "message": "OK",
    "data": [
        [
            1748502000,
            0.5640961796670526,
            0.5595948162096896,
            0.5586378762421685,
            0.5592318582652738,
            3204.2430800228926
        ],
        [
            1748505600,
            0.5699857507176219,
            0.5699857507176219,
            0.5572834728839413,
            0.5640961796670526,
            25786.94030720097
        ],
        [
            1748509200,
            0.5719349030778709,
            0.5719349030778709,
            0.5642972547605669,
            0.5699857507176219,
            25241.783807255088
        ],
        [
            1748512800,
            0.5699857507177203,
            0.5719504054806599,
            0.5699857507177203,
            0.5719349030778709,
            5910.344406629964
        ]
    ]
}
```

***

> **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/ohlcv/pool-ohlcv.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.
