81trust / 100

Coin History

by Coin snapshot on a date in Onchain & crypto

x402 APIPassing, checked 46 min ago

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. 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.

GET https://agent402.tools/api/coin-history

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
185 ms typical, 185 ms slowest 5%
Last check
46 min ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://agent402.tools/api/coin-history?coin=bitcoin&currency=usd&daysAgo=30"
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%2Fagent402.tools%2Fapi%2Fcoin-history
const res = await pay("https://agent402.tools/api/coin-history?coin=bitcoin&currency=usd&daysAgo=30");
console.log(await res.json());

Example input

{
  "coin": "bitcoin",
  "currency": "usd",
  "daysAgo": 30
}

Example output

{
  "allCurrencies": {
    "marketCap": {
      "usd": 2356000000000
    },
    "price": {
      "btc": 1,
      "eur": 100812.3,
      "usd": 118412.55
    },
    "volume24h": {
      "usd": 41000000000
    }
  },
  "cached": false,
  "currency": "usd",
  "date": "2026-07-23",
  "fetchedAt": "2026-08-22T13:20:00.000Z",
  "id": "bitcoin",
  "marketCap": 2356000000000,
  "name": "Bitcoin",
  "price": 118412.55,
  "source": "coingecko",
  "symbol": "BTC",
  "volume24h": 41000000000
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
46 min agoPassed402185 ms$0.005
6 h agoPassed402285 ms$0.005