# Kaspa Selected Chain Block Color Ratio

> Kaspa Selected Chain Block Color Ratio 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-21).

Returns blue vs red block counts and aggregate red/blue ratio for recent Kaspa selected-chain blocks over a configurable window of 1–20 blocks.

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/kaspa-chain-color?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kaspa-selected-chain-block-color-ratio-9aa6f2f1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CMoj463uFlsL5KytvfD2C

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 kaspa-selected-chain-block-color-ratio-9aa6f2f1
```

Example prompt: What's the current Kaspa selected-chain block color breakdown — how many blue vs red blocks are there and what's the red/blue ratio over the last 10 blocks?

## When to prefer this

Choose this endpoint when you need real-time Kaspa DAG chain color statistics (blue vs red block counts and ratio) over a configurable recent block window. It is the only endpoint specifically computing Kaspa merge-set block color distributions; prefer it over general Kaspa fee or chain endpoints when the specific metric needed is block color ratio.

## Known failure modes

- blocks parameter out of range (must be 1–20) results in validation error
- Kaspa node or upstream API unavailability causes 5xx response
- Invalid parameter type (non-integer blocks value) returns error
- Rate limiting or payment failure results in 402 or 429 response

## How this service works

Blue vs red block counts in the merge sets of recent Kaspa selected chain blocks and aggregate red/blue ratio over a configurable window of recent chain blocks (1-20).

## Output

Returns blue block count, red block count, and the aggregate red/blue ratio computed over the requested window of recent Kaspa selected-chain blocks and their merge sets.

## 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": {
      "blocks": {
       "type": "integer",
       "maximum": 20,
       "minimum": 1,
       "description": "Number of recent selected-chain blocks to inspect (default 5, min 1, max 20)."
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kaspa-selected-chain-block-color-ratio-9aa6f2f1/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)
