# Scrapling DeFi Market Heatmap

> Scrapling DeFi Market Heatmap is a paid API for AI agents from scraplingdata.xyz, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-26).

Returns live DeFi heatmap tiles grouped by protocol category and chain, showing TVL, TVL-weighted 1d/7d % changes, protocol count, and top 5 protocols per tile

## Facts

- Endpoint: GET https://scraplingdata.xyz/v1/datasets/market-heatmap?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-26
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/scrapling-defi-market-heatmap-09f78164
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uvlqgg1DMWKoNUcDGA1_W

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 scrapling-defi-market-heatmap-09f78164
```

Example prompt: Give me a live DeFi market heatmap showing all sectors with their total TVL, 1-day and 7-day performance, and top protocols — filter it to Ethereum only and return up to 50 tiles as JSON.

## When to prefer this

Choose this endpoint when you need a high-level, structured view of the entire DeFi market segmented by sector or chain, with TVL sizing and momentum signals in a single call. Prefer it over individual protocol endpoints when your goal is comparative market-structure analysis, sector rotation detection, or building a visual heatmap. It is especially useful for agents monitoring which DeFi categories are growing or shrinking across multiple chains simultaneously.

## Known failure modes

- Invalid q filter keyword returns empty records array
- limit outside 1-1000 range causes validation error
- offset beyond total rows returns empty records
- Stale data up to 5 minutes old if on-chain cache not yet refreshed
- Payment failure (402) if x402 USDC payment not included or insufficient

## How this service works

Live DeFi heatmap tiles: one tile per protocol category (sector) and per chain, with total TVL in USD as tile size, TVL-weighted 1d and 7d % change as tile color, protocol count and the top 5 protocols in the tile. Built from our own on-chain protocol TVL reads (cached up to 5 min). Filter with q=Ethereum, q=Solana or q=Lending Formats: format=json (default) or format=csv (text/csv); optional q, limit, offset.

## Output

A JSON (or CSV) object containing an array of heatmap tile records, each with: tile label (sector or chain), group type, TVL in USD, share percentage of total DeFi TVL, TVL-weighted 1d and 7d % change, total protocol count, top 5 protocols with their TVL and 1d change, data source, and an updated_at timestamp. Also includes total_rows, returned_rows, matched_rows, and next_offset for pagination.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "q": {
       "type": "string",
       "description": "Optional keyword; keeps rows where any field contains it"
      },
      "limit": {
       "type": "integer",
       "maximum": 1000,
       "minimum": 1,
       "description": "Rows to return, default 200"
      },
      "format": {
       "enum": [
        "json",
        "csv"
       ],
       "type": "string"
      },
      "offset": {
       "type": "integer",
       "minimum": 0,
       "description": "Rows to skip, for paging"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "example": {
      "title": "Live DeFi market heatmap by sector and chain (TVL size, 1d/7d % change)",
      "dataset": "market-heatmap",
      "records": [
       {
        "top": [
         {
          "name": "Aave V3",
          "tvl_usd": 25100000000,
          "change_1d_pct": 0.9
         }
        ],
        "tile": "Lending",
        "group": "sector",
        "source": "onchain",
        "tvl_usd": 61234567890,
        "protocols": 812,
        "share_pct": 9.7,
        "change_1d_pct": 0.84,
        "change_7d_pct": -2.31
       }
      ],
      "total_rows": 1,
      "updated_at": "2026-10-20T19:20:18Z",
      "returned_rows": 1
     },
     "required": [
      "dataset",
      "records"
     ],
     "properties": {
      "title": {
       "type": "string"
      },
      "offset": {
       "type": "integer"
      },
      "dataset": {
       "type": "string"
      },
      "records": {
       "type": "array",
       "items": {
        "type": "object"
       }
      },
      "total_rows": {
       "type": "integer"
      },
      "updated_at": {
       "type": "string"
      },
      "next_offset": {
       "type": [
        "integer",
        "null"
   
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scrapling-defi-market-heatmap-09f78164/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scraplingdata.xyz](https://www.zero.xyz/host/scraplingdata.xyz/llms.txt)
