# Crypto Risk Profile (VaR & Tail Risk) API
> The full risk scorecard of any coin, computed live from its Binance daily candles — no key, nothing stored. Volatility alone hides what matters most for risk: the tails. This returns the Value at Risk (the daily loss not exceeded on 95% / 99% of days), the Conditional VaR / expected shortfall (the average loss on the worst days, beyond VaR), the skewness and excess kurtosis of the return distribution (how asymmetric and how fat-tailed it is — crypto is famously fat-tailed), the maximum drawdown, and the risk-adjusted return ratios (Sharpe and Sortino). The profile endpoint returns the whole scorecard for one coin; the drawdown endpoint returns the worst peak-to-trough decline with its peak, trough and depth plus the current drawdown from the high; the compare endpoint ranks a basket of coins by risk-adjusted return so you can see which carries the most tail risk per unit of return. This is the coin-native risk-distribution / tail-risk cut for crypto — distinct from the generic risk-metrics, CAPM and trade-stats APIs (which compute on a series you pass in) and from the realised-volatility API (which has no VaR, skew, kurtosis or drawdown). Coins are Binance bases (BTC) or symbols (BTCUSDT); the quote defaults to USDT and the window is 30-1000 days. Risk-free rate is assumed 0.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/cryptorisk-api/..."
```

## Pricing
- **Free** (Free) — 450 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 11,200 calls/Mo, 6 req/s
- **Pro** ($37/Mo) — 67,000 calls/Mo, 16 req/s
- **Business** ($86/Mo) — 355,000 calls/Mo, 40 req/s

## Endpoints

### Risk

#### `GET /v1/compare` — Rank a basket by risk-adjusted return

**Parameters:**
- `coins` (query, optional, string) — Comma list of coins (default top majors) Example: `BTC,ETH,SOL,DOGE`
- `window` (query, optional, string) — Lookback in days (30-1000, default 365) Example: `365`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cryptorisk-api/v1/compare?coins=BTC%2CETH%2CSOL%2CDOGE&window=365"
```

**Response:**
```json
{
    "data": {
        "note": "coins ranked by Sharpe (risk-adjusted return). Compare var_95_pct and max_drawdown_pct for tail risk, excess_kurtosis for fat-tailedness.",
        "coins": [
            {
                "coin": "ETH",
                "sharpe": -0.686,
                "var_95_pct": 5.33,
                "excess_kurtosis": 2.503,
                "max_drawdown_pct": -67.52,
                "annualized_return_pct": -37.04,
                "annualized_volatility_pct": 67.5
            },
            {
                "coin": "DOGE",
                "sharpe": -0.94,
                "var_95_pct": 5.41,
                "excess_kurtosis": 4.103,
                "max_drawdown_pct": -71.84,
                "annualized_return_pct": -52.69,
                "annualized_volatility_pct": 79.61
            },
            {
                "coin": "SOL",
                "sharpe": -1.141,
                "var_95_pct": 5.71,
                "excess_kurtosis": 1.688,
                "max_drawdown_pct": -74.87,
                "annualized_return_pct": -56.3,
                "annualized_volatility_pct": 72.57
            },
            {
                "coin": "BTC",
                "sharpe": -1.19,
                "var_95_pct": 3.6,
                "excess_kurtosis": 7.066,
                "max_drawdown_pct": -51.16,
                "annualized_return_pct": -40.05,
                "annualized_volatility_pct": 42.99
            }
        ],
        "count": 4,
        "source": 
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/drawdown` — Worst & current drawdown

**Parameters:**
- `coin` (query, required, string) — Coin or Binance symbol Example: `BTC`
- `window` (query, optional, string) — Lookback in days (30-1000, default 365) Example: `365`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cryptorisk-api/v1/drawdown?coin=BTC&window=365"
```

**Response:**
```json
{
    "data": {
        "coin": "BTC",
        "note": "max_drawdown_pct is the worst peak-to-trough decline over the window; current_drawdown_pct is how far the last close sits below the window high. Indices count days from the window start.",
        "source": "Binance",
        "last_close": 63354.69,
        "peak_index": 116,
        "window_days": 365,
        "observations": 366,
        "trough_index": 359,
        "all_time_high": 124658.54,
        "max_drawdown_pct": -51.16,
        "current_drawdown_pct": -49.18,
        "drawdown_length_days": 243
    },
    "meta": {
        "timestamp": "2026-06-12T01:41:05.666Z",
        "request_id": "643f4485-ef1f-436a-9df3-25c4e4ee368d"
    },
    "status": "ok",
    "message": "Drawdown retrieved successfully",
    "success": true
}
```

#### `GET /v1/profile` — Full risk scorecard: VaR, skew, kurtosis, Sharpe

**Parameters:**
- `coin` (query, required, string) — Coin or Binance symbol Example: `BTC`
- `window` (query, optional, string) — Lookback in days (30-1000, default 365) Example: `365`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cryptorisk-api/v1/profile?coin=BTC&window=365"
```

**Response:**
```json
{
    "data": {
        "coin": "BTC",
        "note": "Daily metrics from log returns. var_95_pct is the daily loss not exceeded on 95% of days (historical VaR); cvar_95_pct is the average loss on the worst 5% of days. Negative skew + high excess kurtosis = crash-prone fat tails. Risk-free rate assumed 0.",
        "sharpe": -1.19,
        "source": "Binance",
        "sortino": -1.125,
        "skewness": -0.546,
        "var_95_pct": 3.6,
        "var_99_pct": 5.78,
        "cvar_95_pct": 5.27,
        "cvar_99_pct": 8.65,
        "window_days": 365,
        "best_day_pct": 12.19,
        "observations": 365,
        "worst_day_pct": -14.02,
        "excess_kurtosis": 7.066,
        "max_drawdown_pct": -51.16,
        "current_drawdown_pct": -49.18,
        "annualized_return_pct": -40.05,
        "positive_day_rate_pct": 47.9,
        "annualized_volatility_pct": 42.99
    },
    "meta": {
        "timestamp": "2026-06-12T01:41:06.009Z",
        "request_id": "c56f2a61-0795-402f-8467-c9496b6cfcbd"
    },
    "status": "ok",
    "message": "Profile retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/cryptorisk-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "coin is a Binance base (BTC, ETH) or symbol (BTCUSDT); quote defaults to USDT. window is 30-1000 days (default 365). VaR/CVaR are historical (non-parametric). Risk-free rate assumed 0. Read fresh per call; only the tradable-symbol list is cached hourly.",
        "source": "Binance public REST (api.binance.com/api/v3/klines, daily, live)",
        "service": "cryptorisk-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/compare": "Rank a basket of coins by risk-adjusted return (coins=BTC,ETH,SOL, window=365).",
            "GET /v1/profile": "Full risk scorecard: VaR, CVaR, skew, kurtosis, drawdown, Sharpe, Sortino (coin=BTC, window=365).",
            "GET /v1/drawdown": "Worst peak-to-trough decline and current drawdown from the high (coin=BTC)."
        },
        "description": "Crypto risk profile and tail risk, computed live from a coin's Binance daily candles (no key, nothing stored). profile returns the full scorecard for one coin — Value at Risk and CVaR at 95%/99%, skewness, excess kurtosis, max drawdown, Sharpe, Sortino, annualised return and volatility. drawdown returns the worst peak-to-trough decline and the current drawdown from the high. compare ranks a basket of coins by risk-adjusted return. The coin-native risk-distribution / tail-risk cut — distinct from the generic risk-metrics, CAPM and trade-stats APIs (which compute on a series you pass in) and from the realised-volatilit
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/cryptorisk-api
OpenAPI spec: https://www.oanor.com/api/cryptorisk-api/openapi.json
