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:
return1yPct: the change from the first candle's open to the last candle's close of the year.maxDrawdown1yPct: the largest fall from a running high to a later candle's low.volatilityAnnualizedPct: the standard deviation of close-to-close log returns, scaled to a year.candles: how many candles the figures were computed from, and their width.
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.
GET /api/crypto-historycosts $0.015 a call: the last N days, with the peak, trough and recovery times of the largest drawdown. Tool page.GET /api/coin-historycosts $0.005 a call: what changed since one past date. Tool page.GET /api/coin-ohlccosts $0.003 a call: candle statistics for a window, answered without the candles. Tool page.GET /api/coin-market-chart-rangecosts $0.008 a call: any window, set by two dates or by a look-back ending now. Tool page.
curl -i "https://agent402.tools/api/crypto-history?coin=BTC&days=7¤cy=usd"
curl -i "https://agent402.tools/api/coin-history?coin=bitcoin&daysAgo=30¤cy=usd"
curl -i "https://agent402.tools/api/coin-ohlc?coin=bitcoin&days=7¤cy=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.