> ## 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 Token OHLCV Chart

Retrieves OHLCV candlestick data for a token, auto-aggregated from its most liquid pool. Returns up to 1000 candles per request with customizable timeframes; uses highest-liquidity pool for accuracy. Ideal for: token price charts, technical analysis, trading signals for on-chain tokens.

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

Retrieves OHLCV candlestick data for a token, auto-aggregated from its most liquid pool. Returns up to 1000 candles per request with customizable timeframes; uses highest-liquidity pool for accuracy. Ideal for: token price charts, technical analysis, trading signals for on-chain tokens.


## At a Glance

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

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `network` | `string` | Yes | Network ID \(e.g., 'eth', 'solana'\). |
| `tokenAddress` | `string` | Yes | Token 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. |
| `includeEmptyIntervals` | `boolean` | No | Include intervals with no trade data. |
| `includeInactiveSource` | `boolean` | No | Include data from inactive pools. |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `candles` | `array` | Yes | List of OHLCV candles. |
| `baseToken` | `object` | No | Base token metadata \(optional, may not be present for all responses\). |
| `quoteToken` | `object` | No | Quote token metadata \(optional, may not be present for all responses\). |

## Examples

**Workflow node**

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

```bash
curl -X POST "https://api.b3os.org/v1/actions/coingecko-get-token-ohlcv/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "network": "example-network",
    "tokenAddress": "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.