DefiLlama token prices

GET https://api.api.sh/defillama/v1/prices
1 credit / call finance & crypto try it in the playground →

Current or historical USD prices of tokens by contract address or CoinGecko id, with symbol, decimals, price time and confidence. Optionally each coin's percentage change over a period (change_percent) and a price chart (chart: time and price points) ending at date or now.

Every response includes credits_used: the credits this call cost.

Parameters

nametypedescription
coinsrequired string Up to 100, comma-separated: chain:address (ethereum:0x..., solana:...) or coingecko:<id>. Example: coingecko:ethereum,coingecko:bitcoin
date string Price at this time instead of now (ISO date or unix time).
search_width string How far from the requested time a price may be taken, e.g. 30m, 6h (default), 1d.
change_period string Adds change_percent per coin: the price change over this period ending at date or now, e.g. 1h, 24h, 7d, 4w.
chart_period string Adds chart per coin: one price every this interval, e.g. 1h, 1d, 1w, ending at date or now.
chart_points integer With chart_period: number of points (1-500, default 30).

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/defillama/v1/prices?coins=coingecko%3Aethereum%2Ccoingecko%3Abitcoin" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.