# PreReason Market Context API – Bitcoin On-Chain Context (btc.context)

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

Returns Bitcoin on-chain context including active addresses, transaction volume, and momentum signals for a given date.

## Facts

- Endpoint: GET https://api.prereason.com/api/btc/context?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/prereason-market-context-api-bitcoin-on-chain-context-btc-context-c72f15da
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ts3-L8DSJ3XkD7_Sq2VWP

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-bitcoin-on-chain-context-btc-context-c72f15da
```

Example prompt: Pull me the Bitcoin on-chain context briefing from PreReason for today — I want active addresses, transaction volume, and momentum signals in JSON format.

## When to prefer this

Choose this endpoint when you specifically need Bitcoin on-chain metrics — active addresses, transaction volume, and momentum signals — rather than price action, miner health, or macro liquidity. Use btc.context over btc.quick-check when you want deeper network activity signals rather than a simple price snapshot, and over btc.on-chain when you want momentum alongside on-chain data.

## Known failure modes

- Missing required 'briefing' query parameter returns 400 error
- Invalid date format (not YYYY-MM-DD) returns validation error
- Date out of range for subscription tier returns 403 or tier-restriction error
- Payment not received or x402 payment header missing returns 402 Payment Required
- Unknown briefing ID enum value returns 400 invalid parameter error
- Server-side data unavailability for requested date returns 503 or empty metrics

## How this service works

Bitcoin context with on-chain and liquidity data. Active addresses, hash ribbon, difficulty, momentum signals. Intermediate BTC intelligence for AI agents.

## Output

Returns a structured object containing a natural-language context summary of Bitcoin on-chain activity, plus a metrics object with signals (e.g. bullish/bearish), 7-day trend values, and confidence scores for active addresses and transaction volume. Includes the briefing ID and generation timestamp.

## Example request

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

## 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"
   },
   "net-liquidity": {
    "name": "net-liquidity"
   },
   "bitcoin-hash-rate": {
    "name": "bitcoin-hash-rate"
   },
   "bitcoin-difficulty": {
    "name": "bitcoin-difficulty"
   }
  },
  "briefing_used": "btc.context",
  "briefing_metadata": {
   "name": "BTC Context",
   "description": "Bitcoin price, mining health, and liquidity overview with 7-day and 30-day trend signals",
   "metrics_count": 5,
   "correlations_count": 1
  }
 }
}
```

## More

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