# Patch Guard Crypto Price Consensus

> Patch Guard Crypto Price Consensus is a paid API for AI agents from patch-guard-api.me-e51.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Fetches spot prices for BTC, ETH, SOL, and/or USDC from multiple independent sources (Coinbase, CoinGecko, Kraken) and returns a median consensus price with spread metrics.

## Facts

- Endpoint: POST https://patch-guard-api.me-e51.workers.dev/v1/crypto-price-consensus
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/patch-guard-crypto-price-consensus-3dfebe46
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-qncwfjeZBNy9AoADHEgB

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 patch-guard-crypto-price-consensus-3dfebe46 -d '<json body>'
```

Example prompt: Can you get me the current consensus price for BTC and ETH from multiple sources — I want to see if the prices are consistent across Coinbase, CoinGecko, and Kraken, and how wide the spread is?

## When to prefer this

Use this endpoint when you need a trustworthy, multi-source cryptocurrency price rather than a single-exchange quote — ideal for any scenario where price accuracy, cross-exchange consistency, or manipulation resistance matters. Prefer it over single-source price APIs when building trading logic, portfolio valuation, or any agent workflow where a single compromised or stale feed would cause downstream errors. Supports only BTC, ETH, SOL, and USDC.

## Known failure modes

- Fewer than two sources available for an asset — consensus cannot be computed, asset listed in unavailableAssets
- Invalid or unsupported asset symbol submitted — validation error
- Network timeout fetching one or more price sources — partial results or degraded consensus
- Request with empty or malformed assets array — schema validation error

## How this service works

Four x402-paid agent utilities: safe JSON Patch evaluation, multi-source crypto price consensus, normalized Polymarket movers, and deterministic JSON repair/canonicalization.

## Output

Returns a JSON object with a timestamp, per-asset breakdown including per-source quotes (Coinbase, CoinGecko, Kraken), a computed median consensus price in USD, spread in basis points, min and max prices, source count, the aggregation methodology, and a list of any assets that were unavailable.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "assets": {
   "type": "array",
   "items": {
    "enum": [
     "BTC",
     "ETH",
     "SOL",
     "USDC"
    ],
    "type": "string"
   },
   "maxItems": 4,
   "minItems": 1,
   "uniqueItems": true
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asOf": "2026-08-08T12:00:00.000Z",
  "assets": [
   {
    "asset": "BTC",
    "quotes": [
     {
      "source": "Coinbase",
      "priceUsd": 65083.15
     },
     {
      "source": "CoinGecko",
      "priceUsd": 65074
     },
     {
      "source": "Kraken",
      "priceUsd": 65078.9
     }
    ],
    "spreadBps": 1.41,
    "maximumUsd": 65083.15,
    "minimumUsd": 65074,
    "sourceCount": 3,
    "consensusUsd": 65080.12
   }
  ],
  "methodology": "Median of at least two independently fetched public spot-price sources.",
  "quoteCurrency": "USD",
  "unavailableAssets": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/patch-guard-crypto-price-consensus-3dfebe46/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from patch-guard-api.me-e51.workers.dev](https://www.zero.xyz/host/patch-guard-api.me-e51.workers.dev/llms.txt)
