Coin snapshot on a date

$0.005 per call · USDC via x402 · GET /api/coin-history

Price, market cap and 24h volume of a coin on ONE past date (00:00 UTC snapshot), in every currency at once plus your chosen one called out. Send GET /api/coin-history with the required field coin and pay $0.005 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, fetchedAt, cached, id, symbol and 7 more.

Pass `date` (YYYY-MM-DD) or `daysAgo` (1-365). The point-in-time sibling of crypto-history (which returns a series): use it to value a position as of a date, compute a since-date return, or check a tax-lot basis. Historical range on this plan is the past 365 days, enforced before the call. Cached in-process for 5 minutes.

Category: Crypto & onchain data · Tags: crypto history snapshot price date market-cap tax · Also found as: coin-snapshot-on-a-date coin-snapshot historical-coin-price

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
coinstringyesCoin id (bitcoin, ethereum, ...). Also accepted as symbol, id, ticker, asset.
datestringnoSnapshot date YYYY-MM-DD (UTC), within the past 365 days. Alternative to daysAgo.
daysAgonumbernoDays before today, 1-365 (used when date is absent; default 30).
currencystringnoCurrency to call out (default usd); all currencies are still returned under `allCurrencies`.

Example request

curl -i "https://agent402.tools/api/coin-history?coin=bitcoin&daysAgo=30&currency=usd"

Without payment this returns HTTP 402 Payment Required with the exact price for coin-history; any x402 v2 or MPP client pays it and retries.

Example response

{
  "source": "coingecko",
  "fetchedAt": "2026-08-22T13:20:00.000Z",
  "cached": false,
  "id": "bitcoin",
  "symbol": "BTC",
  "name": "Bitcoin",
  "date": "2026-07-23",
  "currency": "usd",
  "price": 118412.55,
  "marketCap": 2356000000000,
  "volume24h": 41000000000,
  "allCurrencies": {
    "price": {
      "usd": 118412.55,
      "eur": 100812.3,
      "btc": 1
    },
    "marketCap": {
      "usd": 2356000000000
    },
    "volume24h": {
      "usd": 41000000000
    }
  }
}
FieldTypeAlways presentIn the example
sourcestringyescoingecko
fetchedAtstringyes2026-08-22T13:20:00.000Z
cachedbooleanyesfalse
idstringyesbitcoin
symbolstringyesBTC
namestringyesBitcoin
datestringyes2026-07-23
currencystringyesusd
pricenumberyes118412.55
marketCapnumberyes2356000000000
volume24hnumberyes41000000000
allCurrenciesobjectyes3 fields: price, marketCap, volume24h

From an MCP client

catalog.call {
  "slug": "coin-history",
  "params": {
    "coin": "bitcoin",
    "daysAgo": 30,
    "currency": "usd"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for coin-history; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/coin-history?coin=bitcoin&daysAgo=30&currency=usd");

Related tools

Token price history (USD)

$0.004 · POST /api/token-price-history

Historical USD price series for a token, by ticker symbol (ETH, BTC, SOL, ...) or by ERC-20 contract + network, at 5-min…

Wallet token transfers (filtered)

$0.003 · POST /api/asset-transfers

Recent token transfers for a wallet on Base, Ethereum and other EVM chains, newest first. Filtered transfer log for an E…

Chain info snapshot

$0.001 · GET /api/chain-info

One-call chain state snapshot: chain id, latest block number, and current gas price (wei + gwei) for Ethereum, Base, Pol…

Crypto categories by market cap

$0.005 · GET /api/coin-categories

Coin categories (Layer 1, Meme, AI, DeFi, Stablecoins, RWA, ...) ranked by market cap, with 24h market cap change %, 24h…

Coin market chart for a time window

$0.008 · GET /api/coin-market-chart-range

Price, market cap and volume series for a coin over an ARBITRARY time window: `from`/`to` as unix seconds or ISO dates, …

Token price by contract address

$0.005 · GET /api/coin-price-by-contract

Live price, market cap, 24h volume and 24h change for ERC-20 / SPL / other chain tokens looked up by CONTRACT ADDRESS on…