# Bitcoin Chain Tips via Bitcoin Core getchaintips

> Bitcoin Chain Tips via Bitcoin Core getchaintips is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-02).

Returns active and stale/orphaned Bitcoin chain tips (sidechains, forks) using Bitcoin Core's getchaintips, including height, hash, status, branch length, and block timestamp.

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/btc-chain-tips?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bitcoin-chain-tips-via-bitcoin-core-getchaintips-eb112a86
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_s72y8N4Wk490D3Y-eJQEZ

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 bitcoin-chain-tips-via-bitcoin-core-getchaintips-eb112a86
```

Example prompt: Can you pull the latest Bitcoin chain tips and show me all stale or orphaned blocks — I want to see their height, hash, status, and how long each fork branch is? Limit the results to 20.

## When to prefer this

Use this endpoint when you need real-time Bitcoin chain fork and orphan data sourced from Bitcoin Core's getchaintips RPC — ideal for monitoring chain health, detecting reorganizations, or analyzing stale/orphaned block activity. Prefer this over block explorer scrapers when you need structured status and branch-length data for all fork types.

## Known failure modes

- Upstream Bitcoin Core node unavailable — returns 5xx error
- Invalid status filter value — returns 400 validation error
- Limit out of range (outside 1-50) — returns 400 validation error
- Payment required if x402 header not provided — returns 402
- Stale data if upstream node is lagging behind the network

## How this service works

Recent stale/orphaned Bitcoin blocks and sidechain forks via Bitcoin Core getchaintips. Returns active tip, sidechain tips with height, hash, status, branch length, and block timestamp.

## Output

A list of Bitcoin chain tip objects, each containing: block height, block hash, fork status (active/valid-fork/valid-headers/headers-only/invalid), branch length (number of blocks in the fork), and block timestamp. Includes the active chain tip and all stale/orphaned/fork tips up to the requested limit.

## 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",
     "required": [],
     "properties": {
      "limit": {
       "type": "string",
       "description": "Maximum fork tips to return (1-50, default 10)"
      },
      "status": {
       "enum": [
        "all",
        "valid-fork",
        "valid-headers",
        "headers-only",
        "invalid"
       ],
       "type": "string",
       "description": "Filter by fork tip status (default 'all')"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bitcoin-chain-tips-via-bitcoin-core-getchaintips-eb112a86/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chainmarket-api.workers.dev](https://www.zero.xyz/host/api.chainmarket-api.workers.dev/llms.txt)
