{"uid":"cap_y08V8cfWcvsK6n0Y2X1-J","slug":"prices-historical-12c4b1dc","name":"Prices Historical","description":"Pay-per-request access to CoinGecko, DefiLlama, Alchemy, and Etherscan APIs. No auth, no subscriptions.","url":"https://stablecrypto.dev/api/defillama/coins/prices-historical","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"coins":{"type":"string","description":"Comma-separated coin IDs"},"timestamp":{"type":"number","description":"Unix timestamp"},"searchWidth":{"type":"string"}}},"responseSchema":null,"example":{"request":{"coins":"ethereum:0x0000000000000000000000000000000000000000,coingecko:bitcoin","timestamp":1700000000,"searchWidth":"1h"},"response":{"coins":{"coingecko:bitcoin":{"price":35625,"symbol":"BTC","timestamp":1700000098,"confidence":0.99},"ethereum:0x0000000000000000000000000000000000000000":{"price":1986.32,"symbol":"ETH","decimals":18,"timestamp":1700000100,"confidence":0.99}}}},"exampleRequest":{"coins":"ethereum:0x0000000000000000000000000000000000000000,coingecko:bitcoin","timestamp":1700000000,"searchWidth":"1h"},"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_M116U8a4toXfOgmhdTyNc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns historical token prices from DeFiLlama at a specified Unix timestamp","exampleAgentPrompt":"What were the prices of ethereum:0x0000000000000000000000000000000000000000 and coingecko:bitcoin at Unix timestamp 1700000000? Use a searchWidth of 1h.","exampleUseCases":null,"resultDescription":"A JSON object keyed by coin ID, each containing the historical price, symbol, decimals, and timestamp of the closest data point to the requested Unix timestamp.","failureModes":["Invalid or unrecognized coin ID returns empty or missing entry for that coin","Unix timestamp out of range or too old may return no data","Malformed coins string causes validation error","searchWidth too narrow may result in no matching price data","Rate limiting or payment failure returns HTTP 402 or 429"],"whenToPreferThis":"Use this endpoint when you need token prices at a specific historical moment — for example, for tax calculations, portfolio valuation at a past date, or reconciling historical trades. Prefer this over current-price endpoints when the timestamp is in the past and over on-chain oracles when you need aggregated multi-source pricing via DeFiLlama.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:46:45.043Z","isFirstParty":false}