crypto_price
Retrieves the current USD price of a cryptocurrency by CoinGecko or DefiLlama ID. Useful for agents needing spot prices for portfolio valuation or before on-chain actions.
Instructions
[costs $0.005 USDC per call] Get the current USD price of a cryptocurrency by ID. Live cryptocurrency price API: current USD price for any coin by CoinGecko id ('bitcoin', 'ethereum') or DefiLlama id ('coingecko:bitcoin', 'chain:address' for tokens by contract address). Sourced from DefiLlama's aggregated market feed with the source's own confidence score (0-1) and the unix timestamp of the observation. Ideal for agents needing spot prices, portfolio valuation, or price checks before on-chain actions. Cached up to 60 seconds; freshness in meta.fetchedAt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coinId | Yes | Coin identifier: a CoinGecko id ('bitcoin') or DefiLlama id ('coingecko:bitcoin', '<chain>:<address>'). |