# PreReason Bitcoin On-Chain Health API

> PreReason Bitcoin On-Chain Health API is a paid API for AI agents from api.prereason.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-11).

Returns Bitcoin on-chain health metrics including active addresses, MVRV proxy, and transaction data with trend signals.

## Facts

- Endpoint: GET https://api.prereason.com/api/btc/onchain?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/prereason-bitcoin-on-chain-health-api-7500ddd5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3TvOcGymNnCVszY14-3Yq

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 prereason-bitcoin-on-chain-health-api-7500ddd5
```

Example prompt: Can you pull the btc.on-chain briefing from PreReason for today and give me the active addresses, MVRV proxy, and transaction metrics in JSON format?

## When to prefer this

Use this endpoint when you need structured Bitcoin on-chain health data (active addresses, MVRV proxy, transaction metrics) with pre-computed trend signals and confidence scores, especially when building automated market context pipelines or LLM-friendly briefings via the markdown format option.

## Known failure modes

- Invalid briefing ID returns 400 error — must use one of the 17 valid enum values
- Date out of range for subscription tier returns access denied — Free tier limited to 30 days, Basic from Jan 2025
- Missing required 'briefing' query parameter returns 400 validation error
- Invalid date format (not YYYY-MM-DD) returns 400 pattern mismatch
- Payment not completed returns 402 Payment Required

## How this service works

Bitcoin on-chain analytics. Active addresses, MVRV proxy, hash rate, transaction volume. Blockchain network health for crypto research agents.

## Output

Returns a JSON or markdown object containing Bitcoin on-chain health context including active address counts, MVRV proxy values, transaction volume metrics, trend signals (bullish/bearish), confidence scores, and a generated_at timestamp.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "format": "json",
   "briefing": "btc.quick-check"
  }
 }
}
```

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "date": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
       "description": "Historical date in YYYY-MM-DD format. A paid call serves today or any ?date= on record."
      },
      "format": {
       "enum": [
        "json",
        "markdown"
       ],
       "type": "string",
       "description": "Response format. markdown is token-optimized for LLMs, json is structured. Default is markdown."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "metrics": {
   "hash-ribbon": {
    "name": "hash-ribbon"
   },
   "bitcoin-price": {
    "name": "bitcoin-price"
   },
   "bitcoin-tx-count": {
    "name": "bitcoin-tx-count"
   },
   "bitcoin-hash-rate": {
    "name": "bitcoin-hash-rate"
   },
   "bitcoin-tx-volume": {
    "name": "bitcoin-tx-volume"
   },
   "bitcoin-difficulty": {
    "name": "bitcoin-difficulty"
   },
   "on-chain-velocity-30d": {
    "name": "on-chain-velocity-30d"
   },
   "bitcoin-active-addresses": {
    "name": "bitcoin-active-addresses"
   }
  },
  "briefing_used": "btc.on-chain",
  "briefing_metadata": {
   "name": "On-Chain Health",
   "description": "Bitcoin network deep-dive - hash rate, difficulty, transaction count, volume, and active addresses with trends",
   "metrics_count": 8,
   "correlations_count": 2
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/prereason-bitcoin-on-chain-health-api-7500ddd5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.prereason.com](https://www.zero.xyz/host/api.prereason.com/llms.txt)
