Skip to content

Crypto history statistics by API

Agent402 answers questions about a coin's past year with statistics computed here: one-year return, largest drawdown and annualized volatility. The routes return those figures, not the price series behind them, paid per call from an agent's wallet with no account or key.

Powered by CoinGecko.

One-year return, drawdown and volatility for a list of coins

POST /api/token-diligence costs $0.01 a coin, quoted in the 402 for the coins you send. It reads a year of price candles for each coin and reduces them to the figures below, then ranks the list.

curl -i -X POST https://agent402.tools/api/token-diligence \
  -H 'Content-Type: application/json' \
  -d '{"coins":["bitcoin","chainlink"]}'

The first answer is HTTP 402 with the price and the ways to pay. An x402 client signs the payment and sends the same request again.

What comes back

Each row's computed block carries return1yPct, maxDrawdown1yPct, volatilityAnnualizedPct and candles:

comparison ranks the coins you sent (byReturn1y and byVolatilityLowFirst), and flags names measured conditions such as a deep drawdown or high volatility. The method field of every answer states each formula, so a figure can be recomputed. The tool page shows the full answer shape.

A stablecoin's worst day and week against its peg

GET /api/stablecoin-depeg-watch costs $0.005 a call. For every large USD stablecoin it answers the distance from the peg now and the widest distance over the past 24 hours and 7 days, in basis points (deviationBps, maxDeviation24hBps and maxDeviation7dBps), with a status and flags for the ones that left it.

curl -i "https://agent402.tools/api/stablecoin-depeg-watch?minMarketCapUsd=100000000"

Look-back statistics for one coin

More routes answer a single coin over a window you choose. Each returns a computed summary (changePct, volatilityPct, maxDrawdownPct, fromHighPct and fromLowPct) and never the points it was computed from.

curl -i "https://agent402.tools/api/crypto-history?coin=BTC&days=7&currency=usd"
curl -i "https://agent402.tools/api/coin-history?coin=bitcoin&daysAgo=30&currency=usd"
curl -i "https://agent402.tools/api/coin-ohlc?coin=bitcoin&days=7&currency=usd"
curl -i "https://agent402.tools/api/coin-market-chart-range?coin=ethereum&lookback=3d"

What these routes are

They are computed answers: ratios, ranks, deviations and flags worked out by deterministic code, with no model in any route on this page. They do not return candles, a price series or a coin's price on a past date, so they suit a question such as "how far did this coin fall in the past year" and not a chart or a backtest that needs every point.

From an agent

Over MCP, the hosted connector at https://agent402.tools/mcp reaches each of them: catalog.find with a task such as "one-year drawdown for a coin" returns the route, its input schema and its price, and catalog.call runs it. Over HTTP, /api/find answers the same question.

Source and use

The figures are computed from market data. Powered by CoinGecko; every answer carries the same credit. Agent402 is not affiliated with or endorsed by CoinGecko.

Information only, not investment advice. A past return, drawdown or volatility describes what happened, and says nothing about what happens next.

More