# DefiLlama — Get percentage change in price over time

Get DefiLlama Token Price Change data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by DeFiLlama, pass parameters such as lookForward, period, timestamp, and retrieve structured data including coins and <coin> to build top movers tables, measure post-event performance, and trigger volatility alerts, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/defillama/defillama-get-percentage-change-in-price-over-time/a0015713-e194-47f9-adcb-f4bc4400c1f0/
API ID: a0015713-e194-47f9-adcb-f4bc4400c1f0
Provider: defillama
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/defillama/percentage/{coins}
Page update time: 2026-12-03T02:39:15.437Z
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:12.957Z. 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 Change API

Supply comma-separated `{chain}:{address}` or `coingecko:{id}` tokens in the `coins` path parameter, plus optional `timestamp`, `period` (default 24h) and `lookForward` (default false) query parameters. The response maps each coin key to its percentage change.

## What You Can Build

- **Build top movers tables**: Batch watchlist contract addresses with period=24h or 7d to rank gainers and losers.
- **Measure post-event performance**: Set timestamp to a governance vote or listing time with lookForward=true to measure subsequent returns.
- **Trigger volatility alerts**: Poll percentage moves across collateral tokens to flag sharp drawdowns automatically.

## Returned Data

| Field | Meaning |
| --- | --- |
| `coins` | Map of requested token identifiers to percentage price change values |
| `coins.<coin>` | Numeric percentage price change over the requested period (positive or negative) |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DefiLlama — Get percentage change in price over time 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": {
        "timestamp": {
          "type": "number",
          "description": "timestamp of data point requested, defaults to time now"
        },
        "lookForward": {
          "type": "boolean",
          "description": "whether you want the duration after your given timestamp or not, defaults to false (looking back)"
        },
        "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": "number"
        }
      }
    }
  }
}
```

## Request example
Scenario: Official UI example (not runtime verified)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/defillama/percentage/ethereum%3A0xdF574c24545E5FfEcb9a659c229253D4111d87e1%2Ccoingecko%3Aethereum%2Cbsc%3A0x762539b45a1dcce3d36d080f74d1aed37844b878%2Cethereum%3A0xdB25f211AB05b1c97D595516F45794528a807ad8?lookForward=false&period=3w&timestamp=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": -2.3009954568977147
  }
}
```

## 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
### What is the default time period if period is omitted?
According to the contract, period defaults to 24 hours and timestamp defaults to the current time.

### What does lookForward=true do?
When true, the API measures the percentage change forward from timestamp; when false (default), it looks backward. This chooses the comparison direction; it does not forecast future prices.

### What format should period use?
Use compact duration strings such as 24h, 7d or 3w (as shown in the reference request).

### How are the returned percentage values represented?
Each value under coins.<coin> is a signed number representing percentage change (for example, -2.30 means -2.30%).

### Can I query multiple tokens in one request?
Yes. Separate multiple {chain}:{address} or coingecko:{id} keys with commas in the coins path segment.

### How do I get the underlying USD prices instead of percentage change?
Use the DefiLlama Current Token Prices API or Token Price Chart API.

## Available implementations
- defillama: https://openany.si/defillama/defillama-get-percentage-change-in-price-over-time/a0015713-e194-47f9-adcb-f4bc4400c1f0/

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