80trust / 100

Batch Historical

by DefiLlama DeFi TVL & Yields in Onchain & crypto

x402 APIPassing, checked 12 min ago

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

GET https://defillama.use.x402atlas.com/batch-historical

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
377 ms typical, 377 ms slowest 5%
Last check
12 min ago
Next check
in 18 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://defillama.use.x402atlas.com/batch-historical?coins=%7B%22ethereum%3A0xdAC17F958D2ee523a2206206994597C13D831ec7%22%3A%5B1650000000%2C1660000000%5D%7D&searchWidth=4h"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fdefillama.use.x402atlas.com%2Fbatch-historical
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"
}

Example output

{
  "data": {
    "coins": {
      "ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7": {
        "prices": [
          {
            "price": 1,
            "timestamp": 1650000000
          }
        ],
        "symbol": "USDT"
      }
    }
  },
  "queried_at": "2026-07-01T12:00:00Z"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
12 min agoPassed402377 ms$0.005
5 h agoPassed402407 ms$0.005