# Token Historical Volatility Calculator

> Token Historical Volatility Calculator is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Computes annualized and daily historical volatility (log-return standard deviation) for any CoinGecko-listed cryptocurrency token over a configurable lookback window

## Facts

- Endpoint: POST https://x402.agentutility.ai/token-volatility
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-historical-volatility-calculator-e783bca1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YSlVKeNu8cHbPooCETCwu

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability token-historical-volatility-calculator-e783bca1 -d '<json body>'
```

Example prompt: What's the annualized historical volatility of Solana over the last 60 days? Use its CoinGecko ID 'solana' and give me the daily vol too.

## When to prefer this

Choose this endpoint when you need a fast, single-call annualized volatility figure for any CoinGecko-listed token without building your own price-history pipeline. It is ideal for risk scoring, options input, portfolio analytics, or any agent workflow that needs a reliable crypto vol number backed by CoinGecko data. Prefer it over rolling your own when you want log-return methodology and annualization already handled, and when USDC micropayment via x402 is acceptable.

## Known failure modes

- Invalid or unrecognized CoinGecko token ID returns an error — token must be a valid CoinGecko slug (e.g. 'bitcoin', not 'BTC')
- Requesting too few days (e.g. N=1) may yield insufficient data points for a meaningful standard deviation
- CoinGecko rate limits or downtime may cause upstream failures
- N values beyond CoinGecko's free-tier history window may return incomplete data
- Payment failure via x402 will block the request before computation

## How this service works

Computes historical volatility for any CoinGecko-listed token: log-return standard deviation over the last N days (default 30), annualized by sqrt(365). Returns daily and annualized volatility as percent, count of return observations, and first and last close prices. Backed by CoinGecko's free public market_chart endpoint. Use it as an annualized vol calculator, standard-deviation-of-returns tool, or crypto vol calculator.

## Output

Returns a JSON object containing: daily volatility as a percentage, annualized volatility as a percentage (daily vol × sqrt(365)), the number of log-return observations used in the calculation, and the first and last closing prices from the selected period.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "coingecko_id"
     ],
     "properties": {
      "days": {
       "type": "number",
       "description": "Lookback window in days. Range [7, 365]. Default 30."
      },
      "coingecko_id": {
       "type": "string",
       "description": "CoinGecko coin id (e.g. 'ethereum', 'bitcoin', 'solana'). Lower-case slug, not the symbol."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "days": {
       "type": "integer"
      },
      "source": {
       "type": "string"
      },
      "coingecko_id": {
       "type": "string"
      },
      "returns_count": {
       "type": "integer"
      },
      "last_price_usd": {
       "type": "number"
      },
      "first_price_usd": {
       "type": "number"
      },
      "daily_volatility_pct": {
       "type": "number"
      },
      "annualized_volatility_pct": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "days": 30,
  "source": "coingecko",
  "coingecko_id": "ethereum",
  "returns_count": 30,
  "last_price_usd": 3284.13,
  "first_price_usd": 3142.55,
  "daily_volatility_pct": 3.421,
  "annualized_volatility_pct": 65.3742
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-historical-volatility-calculator-e783bca1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
