# SwapHunt BTC Correlation Calculator

> SwapHunt BTC Correlation Calculator is a paid API for AI agents from x402.swaphunt.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Returns the Pearson correlation coefficient of a coin's returns vs BTC over a 7d or 30d period to assess diversification and co-movement.

## Facts

- Endpoint: GET https://x402.swaphunt.dev/v1/market/correlation
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swaphunt-btc-correlation-calculator-644e4350
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Vv_s4bRxxcECSehoAo6eE

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 swaphunt-btc-correlation-calculator-644e4350
```

Example prompt: What's the Pearson correlation between SOL and BTC over the last 30 days — is SOL moving independently or just tracking Bitcoin?

## When to prefer this

Use this endpoint when you need a statistically rigorous, single-number summary of how closely an altcoin tracks Bitcoin returns, particularly for portfolio diversification analysis or when deciding if an alt provides genuine exposure diversification vs. being a BTC proxy. Prefer this over general market data endpoints when the specific question is about co-movement or correlation, not price levels.

## Known failure modes

- Unsupported coin symbol returns error or empty result
- Invalid period value (not '7d' or '30d') may return validation error
- Unsupported quote currency returns an error
- Insufficient historical data for very new coins
- Payment failure due to insufficient USDC balance ($0.003 required)
- Network timeout if market data source is unavailable

## How this service works

Pearson correlation of a coin's returns vs BTC (-1 to +1) over the period. Use to judge diversification and whether an alt is moving independently or just tracking BTC. A correlation coefficient, not a beta or causation claim.

## Output

A Pearson correlation coefficient between -1 and +1 representing how closely the specified coin's returns track BTC over the chosen period, useful for judging diversification and independence of price action.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "coin": {
       "type": "string",
       "default": "ETH",
       "description": "Coin to analyze"
      },
      "quote": {
       "type": "string",
       "default": "USDT",
       "description": "Quote currency (USDT, USDC, EUR)"
      },
      "period": {
       "type": "string",
       "default": "7d",
       "description": "Period (7d, 30d)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swaphunt-btc-correlation-calculator-644e4350/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.swaphunt.dev](https://www.zero.xyz/host/x402.swaphunt.dev/llms.txt)
