# PreReason Market Context API

> PreReason Market Context API is a paid API for AI agents from api.prereason.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-12).

Fetches AI-ready market context for a single Bitcoin on-chain, macro, or calculated financial metric, returning trend analysis, interpretation signals, and confidence scores.

## Facts

- Endpoint: GET https://api.prereason.com/api/metrics/%7Bmetric%7D
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/prereason-market-context-api-e831e9ab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fe5FRjUah9ViZLgUV3rV0

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-market-context-api-e831e9ab
```

Example prompt: What is the current Bitcoin MVRV proxy signal — is it bullish or bearish, and how confident is the reading?

## When to prefer this

Choose this endpoint when an AI agent needs pre-interpreted, reasoning-ready financial context — not raw price feeds — for Bitcoin on-chain metrics, macro indicators, or calculated signals like hash ribbon or MVRV proxy. It is especially valuable when you want a confidence score and directional signal bundled with the data rather than having to compute interpretation yourself. Prefer it over generic crypto price APIs when you need trend percentiles, momentum labels, or macro context like M2 supply, net liquidity, or yield curve in a single call.

## Known failure modes

- Invalid or misspelled metric name returns an error — must use one of 30 exact enum values
- Missing metric parameter causes a 400-level error
- Payment not included or insufficient USDC triggers a 402 Payment Required response
- Network timeout if the upstream data provider is unavailable
- Stale data if source feeds have not refreshed recently

## How this service works

PreReason delivers market context for financial agents. Bitcoin on-chain metrics, macro indicators, and reasoning context in one API call.

## Output

Returns a JSON or markdown object containing the requested metric's current trend (direction, momentum, 7-day and 30-day change, percentile), a human-readable context narrative, and an interpretation block with a signal label (e.g. bullish/bearish), a numeric confidence score (0-100), and a confidence label (e.g. high/medium/low).

## 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"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "metric"
     ],
     "properties": {
      "format": {
       "enum": [
        "json",
        "markdown"
       ],
       "type": "string",
       "description": "Response format: markdown (default) or json."
      },
      "metric": {
       "enum": [
        "bitcoin-price",
        "bitcoin-market-cap",
        "bitcoin-volume-24h",
        "bitcoin-change-24h",
        "bitcoin-dominance",
        "bitcoin-hash-rate",
        "bitcoin-difficulty",
        "bitcoin-tx-count",
        "bitcoin-tx-volume",
        "bitcoin-active-addresses",
        "fed-balance",
        "m2-supply",
        "treasury-10y",
        "rrp",
        "eur-usd",
        "cny-usd",
        "yield-curve",
        "tga",
        "treasury-3mo",
        "treasury-2y",
        "treasury-5y",
        "treasury-30y",
        "breakeven-5y",
        "breakeven-10y",
        "t5yifr",
        "mortgage-30y",
        "t10y3m-spread",
        "auction-bid-to-cover-10y",
        "auction-bid-to-cover-30y",
        "indirect-bidder-pct",
        "dealer-takedown-pct",
        "next-treasury-auction-days",
        "fed-funds-rate",
        "ecb-deposit-rate",
        "boj-policy-rate",
        "fed-ecb-spread",
        "fed-boj-spread",
        "carry-trade-returns-proxy",
        "carry-trade-velocity-1d",
        "mortgage-treasury-spread",
        "iwm-spy-credit-spread",
        "spy-vxx-correlation-30d",
        "regime-stability-flag",
        "jpy-usd",
        "oil-brent",
        "oil-wti",
        "ovx",
        "real-rate-10y",
        "gld-gdx-ratio",
        "copper-gold-ratio",
        "slv-sil-ratio",
        "gdxj-gdx-ratio",
        "gold-silver-ratio",
        "brent-wti-spread",
        "etf-gld-1h-velocity",
        "etf-cper-1h-velocity",
        "etf-uso-1h-velocity",
        "etf-uup-velocity-1h",
        "crude-oil-stocks",
        "natgas-storage",
        "oil-inventory-zscore",
        "natgas-storage-zscore",
        "ecb-boj-spread",
        "etf-gld-volume",
        "etf-uso-
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "trend": {
   "momentum": "accelerating",
   "change_7d": 4.2,
   "direction": "up",
   "change_30d": 12.1,
   "percentile": 78
  },
  "metric": "bitcoin-price",
  "context": "Bitcoin at $84,200, upper range of 90-day distribution...",
  "interpretation": {
   "signal": "bullish",
   "confidence": 82,
   "confidence_label": "high"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/prereason-market-context-api-e831e9ab/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)
