> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Pool OHLCV Chart

Retrieves OHLCV candlestick data for a specific DEX pool with customizable timeframes and aggregation. Returns up to 1000 candles per request; supports day/hour/minute/second intervals with pagination. Ideal for: DEX trading charts, technical analysis on specific pools, backtesting pool-specific strategies.

![Get Pool OHLCV Chart logo](https://ai-icon.b3.fun/logo/coingecko)
Catalog action Blockchain Data

Retrieves OHLCV candlestick data for a specific DEX pool with customizable timeframes and aggregation. Returns up to 1000 candles per request; supports day/hour/minute/second intervals with pagination. Ideal for: DEX trading charts, technical analysis on specific pools, backtesting pool-specific strategies.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `coingecko-get-pool-ohlcv` |
| Category | Blockchain Data |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `coingecko`, `onchain`, `pool`, `ohlcv`, `chart`, `candle`, `dex`, `read` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `network` | `string` | Yes | Network ID \(e.g., 'eth', 'solana'\). |
| `poolAddress` | `string` | Yes | Pool contract address. |
| `timeframe` | `string` | Yes | Chart timeframe: day, hour, minute, second. |
| `aggregate` | `string` | No | Time aggregation period. Day: 1; Hour: 1,4,12; Minute: 1,5,15; Second: 1,15,30. |
| `beforeTimestamp` | `number` | No | Return OHLCV data before this Unix timestamp. |
| `limit` | `number` | No | Number of results \(default: 100, max: 1000\). |
| `currency` | `string` | No | Currency for prices: usd or token. |
| `token` | `string` | No | Token for reference: base, quote, or token address. |
| `includeEmptyIntervals` | `boolean` | No | Include intervals with no trade data. |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `candles` | `array` | Yes | List of OHLCV candles. |
| `baseToken` | `object` | No | - |
| `quoteToken` | `object` | No | - |

## Examples

**Workflow node**

```json
{
  "type": "coingecko-get-pool-ohlcv",
  "payload": {
    "network": "example-network",
    "poolAddress": "0x0000000000000000000000000000000000000000",
    "timeframe": "day"
  },
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/coingecko-get-pool-ohlcv/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "network": "example-network",
    "poolAddress": "0x0000000000000000000000000000000000000000",
    "timeframe": "day"
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.