{"data":{"billing":{"currency":"USD","mode":"fixed","priceMicroUsd":"0","rounding":null,"unit":"call","unitQuantity":null},"capabilityId":"0d8d3dc9-93f5-44b4-811d-2551f1f143a4","catalogType":"api","categories":["data","finance","crypto-defi"],"dataPlatform":"DefiLlama","dataPlatformLogoUrl":"https://api-docs.defillama.com/icons/favicon-96x96.png","dataPlatformTranslations":{"ar":"DefiLlama","ja":"DefiLlama","zh":"DefiLlama"},"dataProduct":"prices","description":"Get DefiLlama Historical Token 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 coins, \u003ccoin\u003e, price, token ticker symbol, and on-chain token decimal places for value historical snapshots, audit on-chain events, and reconstruct historical tvl.","descriptionTranslations":{"ar":"استرجع الأسعار التاريخية للرموز عند طابع زمني محدد عبر OpenAny REST بتمرير الوقت ومعرفات الشبكة وعناوين العقود مفصولة بفواصل. يربط الرد كل رمز بسعره بالدولار والرمز المختصر والخانات العشرية والطابع الزمني ودرجة الثقة.","ja":"OpenAny REST で対象 UNIX タイムスタンプとカンマ区切りのチェーン・アドレスを指定し、特定時点のトークン過去価格を取得できます。各トークンキーごとに USD 価格、シンボル、小数桁数、時刻、信頼度スコアを返します。","zh":"通过 OpenAny REST 指定目标 UNIX 时间戳及逗号分隔的链与合约地址标识，即可批量查询代币在特定时刻的历史价格。响应返回各代币的美元价格、符号、精度位数、匹配时间戳与置信度分数，适用于财务记账与历史估值。"},"effectContentHtml":"","executionMode":"sync","id":"fe0409df-c5bb-473a-9914-5bf9fc6abf8b","includedContentHtml":"","inputs":[{"description":"set of comma-separated tokens defined as {chain}:{address}","location":"path","name":"coins","nullable":false,"required":true,"type":"string"},{"description":"UNIX timestamp of time when you want historical prices","location":"path","name":"timestamp","nullable":false,"required":true,"type":"number"}],"logoUrl":"https://api-docs.defillama.com/icons/favicon-96x96.png","method":"GET","name":"DefiLlama — Get historical prices of tokens by contract address","nameTranslations":{"ar":"DefiLlama — الحصول على الأسعار التاريخية للرموز حسب عنوان العقد","ja":"DefiLlama — コントラクトアドレスでトークンの過去価格を取得","zh":"DefiLlama — 按合约地址获取代币历史价格"},"overviewHtml":"\u003ch2\u003eDefiLlama Historical Token Prices API\u003c/h2\u003e\n\u003cp\u003ePass a numeric UNIX \u003ccode\u003etimestamp\u003c/code\u003e and comma-separated \u003ccode\u003e{chain}:{address}\u003c/code\u003e or \u003ccode\u003ecoingecko:{id}\u003c/code\u003e keys in \u003ccode\u003ecoins\u003c/code\u003e. The response returns a \u003ccode\u003ecoins\u003c/code\u003e map with each matched token’s historical price, symbol, decimals, timestamp and confidence.\u003c/p\u003e\n\u003ch2\u003eQuick Facts\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eFact\u003c/th\u003e\n\u003cth\u003eValue\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eAccess\u003c/td\u003e\n\u003ctd\u003eOpenAny REST\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAuthentication\u003c/td\u003e\n\u003ctd\u003eOpenAny API key in the Authorization header\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCore inputs\u003c/td\u003e\n\u003ctd\u003eRequired path parameters: timestamp (UNIX seconds) and coins (comma-separated {chain}:{address} or coingecko:{id} tokens).\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSelected implementation\u003c/td\u003e\n\u003ctd\u003edefillama · DefiLlama — Get historical prices of tokens by contract address\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eBilling\u003c/td\u003e\n\u003ctd\u003eSee the pricing area for the selected implementation and request options\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eWhat You Can Build\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eValue historical snapshots\u003c/strong\u003e: Price every token in a wallet at month-end or fiscal-year-end UNIX timestamps.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eAudit on-chain events\u003c/strong\u003e: Combine with the Closest Block API to match block timestamps with exact token prices.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eReconstruct historical TVL\u003c/strong\u003e: Multiply historical contract balances by point-in-time USD quotes.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003eReturned Data\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eField\u003c/th\u003e\n\u003cth\u003eMeaning\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ecoins\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eMap of requested token identifiers to historical price records\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ecoins.\u0026lt;coin\u0026gt;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eHistorical price object keyed by the token identifier\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ecoins.\u0026lt;coin\u0026gt;.price\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eHistorical token price in USD near the requested timestamp\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ecoins.\u0026lt;coin\u0026gt;.symbol\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eToken ticker symbol\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ecoins.\u0026lt;coin\u0026gt;.decimals\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eOn-chain token decimal places\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ecoins.\u0026lt;coin\u0026gt;.timestamp\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eUNIX timestamp of the matched price observation\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ecoins.\u0026lt;coin\u0026gt;.confidence\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eConfidence score for the historical quote\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eQuick Start\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eSet OPENANY_API_KEY to your OpenAny API key.\u003c/li\u003e\n\u003cli\u003eReview the selected implementation and pricing, then adapt the request below to your target.\u003c/li\u003e\n\u003cli\u003eCheck the HTTP response and business result before reading optional fields.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003ecurl --request GET --get \\\n  https://api.openany.si/v1/agent-apis/defillama/prices/historical/1648680149/ethereum%3A0xdF574c24545E5FfEcb9a659c229253D4111d87e1%2Ccoingecko%3Aethereum%2Cbsc%3A0x762539b45a1dcce3d36d080f74d1aed37844b878%2Cethereum%3A0xdB25f211AB05b1c97D595516F45794528a807ad8 \\\n  -H \u0026#34;Authorization: Bearer ${OPENANY_API_KEY}\u0026#34;\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2\u003eRequest and Response Examples\u003c/h2\u003e\n\u003cp\u003eThe response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://openany.si/api/v1/agent-apis/fe0409df-c5bb-473a-9914-5bf9fc6abf8b\"\u003ePublished DefiLlama Historical Token Prices API implementation contract\u003c/a\u003e.\u003c/p\u003e\n\u003ch2\u003ePricing and Billing\u003c/h2\u003e\n\u003cp\u003eThe pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service\u0026#39;s public availability does not determine OpenAny billing.\u003c/p\u003e\n\u003ch2\u003eFrequently Asked Questions\u003c/h2\u003e\n\u003ch3\u003eWhat unit should timestamp use?\u003c/h3\u003e\n\u003cp\u003ePass timestamp as a numeric UNIX timestamp in seconds (for example, 1648680149).\u003c/p\u003e\n\u003ch3\u003eCan I query multiple tokens at the same timestamp?\u003c/h3\u003e\n\u003cp\u003eYes. Pass a comma-separated list of {chain}:{address} or coingecko:{id} keys in the coins path parameter.\u003c/p\u003e\n\u003ch3\u003eWhat if I need different timestamps for different tokens?\u003c/h3\u003e\n\u003cp\u003eUse the DefiLlama Batch Token Prices API, which accepts a per-coin array of timestamps.\u003c/p\u003e\n\u003ch3\u003eWhy might the returned timestamp differ slightly from my request?\u003c/h3\u003e\n\u003cp\u003eDefiLlama returns the closest available indexed observation and reports its exact UNIX timestamp.\u003c/p\u003e\n\u003ch3\u003eHow do I find the earliest available timestamp for a token?\u003c/h3\u003e\n\u003cp\u003eQuery the DefiLlama First Token Prices API to see the earliest indexed price timestamp.\u003c/p\u003e\n\u003ch3\u003eDoes this endpoint return a full price series?\u003c/h3\u003e\n\u003cp\u003eNo. It returns a single point-in-time quote per token; use the Token Price Chart API for time intervals.\u003c/p\u003e\n\u003ch2\u003eRelated APIs\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/defillama/defillama-get-current-prices-of-tokens-by-contract-address\"\u003eDefiLlama Current Token Prices API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/defillama/defillama-get-historical-prices-for-multiple-tokens-at-multiple-different-timestamps\"\u003eDefiLlama Batch Token Prices API\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/defillama/defillama-get-the-closest-block-to-a-timestamp\"\u003eDefiLlama Closest Block API\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","pagePath":"/markets/apis/defillama/defillama-get-historical-prices-of-tokens-by-contract-address?offering=fe0409df-c5bb-473a-9914-5bf9fc6abf8b","providerId":"defillama","publicPath":"/v1/agent-apis/defillama/prices/historical/{timestamp}/{coins}","requestContentType":"none","revision":4,"samples":[{"http_status":200,"name":"Official UI example (not runtime verified)","request":{"body":null,"headers":{},"path":{"coins":"ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8","timestamp":1648680149},"query":{}},"response_body":{"coins":{"ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1":{"confidence":0.99,"decimals":8,"price":0.022053735051098835,"symbol":"cDAI","timestamp":1648680149}}}}],"seoDescription":"Get DefiLlama Historical Token Prices data via REST or MCP powered by DeFiLlama. Pay per call, no subscription. Get coins and coin in JSON.","updatedAt":"2026-12-03T02:39:12.336Z","usageInstructionsHtml":""}}