# DefiLlama — Get historical prices of all stablecoins

Get DefiLlama Stablecoin Prices data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by DeFiLlama, configure supported query parameters and filters, and retrieve structured data including prices, dai, usdc, and usdt to analyze depeg severity, feed risk models, and cross-check supply and price, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/defillama/defillama-get-historical-prices-of-all-stablecoins/f5efcb9b-2ab4-476f-b776-9caeea42dea0/
API ID: f5efcb9b-2ab4-476f-b776-9caeea42dea0
Provider: defillama
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/defillama/stablecoinprices
Page update time: 2026-12-03T02:39:15.362Z
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.176Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## DefiLlama Stablecoin Prices API

Call this parameter-free GET endpoint to retrieve a time-series array of historical stablecoin prices. Each element pairs a UNIX `date` with a `prices` dictionary keyed by stablecoin symbol.

## What You Can Build

- **Analyze depeg severity**: Measure maximum deviation from $1.00 across USDT, USDC, DAI and smaller stablecoins.
- **Feed risk models**: Supply historical stablecoin price series to collateral haircut and liquidation models.
- **Cross-check supply and price**: Correlate depeg windows with circulating supply shifts from Stablecoin Mcap History.

## Returned Data

| Field | Meaning |
| --- | --- |
| `[]` | Time-series array of historical stablecoin price snapshots |
| `[].date` | UNIX timestamp of the price snapshot |
| `[].prices` | Map of stablecoin symbols to historical USD prices |
| `[].prices.DAI` | Historical USD price of DAI at that timestamp |
| `[].prices.USDC` | Historical USD price of USDC at that timestamp |
| `[].prices.USDT` | Historical USD price of USDT at that timestamp |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DefiLlama — Get historical prices of all stablecoins 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": {}
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "date": {
        "type": "integer"
      },
      "prices": {
        "type": "object",
        "properties": {
          "DAI": {
            "type": "number"
          },
          "USDC": {
            "type": "number"
          },
          "USDT": {
            "type": "number"
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Official UI example (not runtime verified)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/defillama/stablecoinprices' \
  -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
[
  {
    "date": 1609459200,
    "prices": {
      "DAI": 1.002,
      "USDC": 0.999,
      "USDT": 1.001
    }
  }
]
```

## 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
### Are any parameters required to call this endpoint?
No. Send a GET request with your OpenAny API key and no query or path parameters.

### How are stablecoin prices keyed inside each snapshot?
Each array item has a numeric UNIX date and a prices object keyed by stablecoin symbol such as DAI, USDC and USDT.

### Can I request only one stablecoin symbol in the query?
No filter parameter is defined in the contract; select the desired symbol keys from each snapshot’s prices map.

### Does this endpoint include circulating market cap?
No. Use the DefiLlama Stablecoin Mcap History API or Stablecoins List API for supply figures.

### How do I check current prices for non-stablecoin tokens?
Use the DefiLlama Current Token Prices API with {chain}:{address} identifiers.

### What format is the date field?
In the reference example, date is a numeric UNIX timestamp in seconds.

## Available implementations
- defillama: https://openany.si/defillama/defillama-get-historical-prices-of-all-stablecoins/f5efcb9b-2ab4-476f-b776-9caeea42dea0/

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