# DefiLlama — Get token prices at regular time intervals

Get DefiLlama Token Price Chart data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by DeFiLlama, pass parameters such as period, span, start, and retrieve structured data including coins, <coin>, token ticker symbol, on-chain token decimal places, and confidence to render token price charts, compute realized volatility, and compare requested sampling intervals.

Documentation: https://openany.si/defillama/defillama-get-token-prices-at-regular-time-intervals/63d75454-3074-457a-8e61-a35418ffc33a/
API ID: 63d75454-3074-457a-8e61-a35418ffc33a
Provider: defillama
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/defillama/chart/{coins}
Page update time: 2026-12-03T02:39:15.516Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:39:13.679Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## DefiLlama Token Price Chart API

Pass comma-separated `{chain}:{address}` or `coingecko:{id}` tokens in `coins`, and tune the time grid with optional `start`, `end`, `span` and `period` query parameters. Each coin entry returns `symbol`, `decimals`, `confidence` and a `prices[]` array.

## What You Can Build

- **Render token price charts**: Fetch 2-day or daily interval series using start, span and period for front-end charting libraries.
- **Compute realized volatility**: Pull evenly spaced hourly or daily prices for multiple DeFi tokens in one request.
- **Compare requested sampling intervals**: Retain each returned observation timestamp when aligning token series rather than assuming identical source coverage.

## Returned Data

| Field | Meaning |
| --- | --- |
| `coins` | Map of requested token identifiers to price chart objects |
| `coins.<coin>` | Chart payload keyed by the token identifier |
| `coins.<coin>.symbol` | Token ticker symbol |
| `coins.<coin>.decimals` | On-chain token decimal places |
| `coins.<coin>.confidence` | Confidence score reported for the price series |
| `coins.<coin>.prices` | Array of interval price points |
| `coins.<coin>.prices[].timestamp` | UNIX timestamp of the chart point |
| `coins.<coin>.prices[].price` | Token USD price at that interval point |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DefiLlama — Get token prices at regular time intervals request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "coins": {
          "type": "string",
          "description": "set of comma-separated tokens defined as {chain}:{address}"
        }
      },
      "required": [
        "coins"
      ]
    },
    "query": {
      "type": "object",
      "properties": {
        "start": {
          "type": "number",
          "description": "unix timestamp of earliest data point requested"
        },
        "end": {
          "type": "number",
          "description": "unix timestamp of latest data point requested"
        },
        "span": {
          "type": "number",
          "description": "number of data points returned, defaults to 0"
        },
        "period": {
          "type": "string",
          "description": "duration between data points, defaults to 24 hours"
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "coins": {
      "type": "object",
      "properties": {
        "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
          "type": "object",
          "properties": {
            "confidence": {
              "type": "number"
            },
            "decimals": {
              "type": "integer"
            },
            "prices": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "price": {
                    "type": "number"
                  },
                  "timestamp": {
                    "type": "integer"
                  }
                }
              }
            },
            "symbol": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Official UI example (not runtime verified)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/defillama/chart/ethereum%3A0xdF574c24545E5FfEcb9a659c229253D4111d87e1%2Ccoingecko%3Aethereum%2Cbsc%3A0x762539b45a1dcce3d36d080f74d1aed37844b878%2Cethereum%3A0xdB25f211AB05b1c97D595516F45794528a807ad8?period=2d&span=10&start=1664364537' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "coins": {
    "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
      "confidence": 0.99,
      "decimals": 8,
      "prices": [
        {
          "price": 0.984519,
          "timestamp": 1666790570
        }
      ],
      "symbol": "HUSD"
    }
  }
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### How do start, end, span and period work together?
Set start or end (UNIX timestamps), span (number of data points) and period (interval such as 24h or 2d) to define the sampling grid.

### What are the defaults for span and period?
Per the contract, span defaults to 0 and period defaults to 24 hours.

### Can I chart multiple tokens in one request?
Yes. Pass comma-separated {chain}:{address} or coingecko:{id} values in the coins path parameter.

### Does each point contain OHLC candles?
No. The response establishes timestamp and price observations, not open, high, low and close candle fields.

### How do I find the earliest valid start timestamp for a token?
Query the DefiLlama First Token Prices API to get the token’s earliest indexed timestamp.

### When should I use Batch Token Prices instead of Token Price Chart?
Use Batch Token Prices when you need arbitrary, irregular timestamps per token rather than regular intervals.

## Available implementations
- defillama: https://openany.si/defillama/defillama-get-token-prices-at-regular-time-intervals/63d75454-3074-457a-8e61-a35418ffc33a/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
