# DefiLlama Token Price Chart

> DefiLlama Token Price Chart is a paid API for AI agents from defillama.use.x402atlas.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Returns an evenly-spaced historical price series for one or many tokens over a specified time window via DefiLlama.

## Facts

- Endpoint: GET https://defillama.use.x402atlas.com/prices-chart?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defillama-token-price-chart-69f36a96
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qDicxKVxUV-2OvueFtVRs

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability defillama-token-price-chart-69f36a96
```

Example prompt: Can you pull me a DefiLlama price chart for ethereum:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 and coingecko:bitcoin from January 1 2024 to March 31 2024, with one data point per day (span 90, period 1d)?

## When to prefer this

Use this endpoint when you need a uniformly-sampled historical price series for one or many tokens — ideal for charting, backtesting, or trend analysis over a defined time window. Prefer this over the price-change endpoint when you need the full series rather than a single percentage delta, and over the current-price endpoint when historical data is required.

## Known failure modes

- Missing required 'coins' parameter returns an error
- Invalid coin identifier format (not {chain}:{address} or coingecko:{id}) returns no data
- Start/end timestamps out of range may return empty series
- Invalid period format may cause parsing errors
- Payment failure (insufficient USDC) returns 402

## How this service works

Token price chart by DefiLlama — an evenly-spaced historical price series for one or many coins over a time window.

## Output

A time series of evenly-spaced historical USD price data points for the requested coins, covering the specified time window with the chosen interval and search width.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "coins"
     ],
     "properties": {
      "coins": {
       "type": "string",
       "pattern": "^[A-Za-z0-9:,._-]+$",
       "maxLength": 3000,
       "minLength": 1,
       "description": "Comma-separated coins as {chain}:{address} or coingecko:{id}"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "queried_at",
      "data"
     ],
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "coins": {
         "type": "object",
         "description": "Keyed by {chain}:{address} or coingecko:{id}",
         "additionalProperties": {
          "type": "object",
          "properties": {
           "prices": {
            "type": "array",
            "items": {
             "type": "object",
             "properties": {
              "price": {
               "type": "number",
               "description": "USD price"
              },
              "timestamp": {
               "type": "integer",
               "description": "Unix timestamp (seconds)"
              }
             }
            }
           },
           "symbol": {
            "type": "string"
           }
          }
         }
        }
       },
       "description": "Raw DefiLlama price chart payload",
       "additionalProperties": true
      },
      "queried_at": {
       "type": "string",
       "format": "date-time",
       "description": "When this bridge fetched the upstream data"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "coins": {
    "coingecko:ethereum": {
     "prices": [
      {
       "price": 3000,
       "timestamp": 1650000000
      }
     ],
     "symbol": "ETH"
    }
   }
  },
  "queried_at": "2026-07-01T12:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defillama-token-price-chart-69f36a96/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defillama.use.x402atlas.com](https://www.zero.xyz/host/defillama.use.x402atlas.com/llms.txt)
