Skip to content
Fourohtwo

Batch historical token prices by DefiLlama

defillama.use.x402atlas.com/batch-historical

Batch historical token prices by DefiLlama — prices for many coins at many timestamps in one call (coins is a JSON map).

BasePolygonArbitrumSolanaAnswering
GEThttps://defillama.use.x402atlas.com/batch-historical

Uptime100% of 3 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://defillama.use.x402atlas.com/batch-historical?coins=%7B%22ethereum%3A0xdAC17F958D2ee523a2206206994597C13D831ec7%22%3A%5B1650000000%2C1660000000%5D%7D&searchWidth=4h");
console.log(await res.json());

Example input

{
  "coins": "{\"ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7\":[1650000000,1660000000]}",
  "searchWidth": "4h"
}

More from DefiLlama DeFi TVL & YieldsProvider status