# Deepstate Market Rolling Stats

> Deepstate Market Rolling Stats is a paid API for AI agents from api.onesource.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns rolling 24h, 7d, and 30d volume and price change statistics for a specified Deepstate order book market

## Facts

- Endpoint: GET https://api.onesource.io/deepstate/v1/stats/:book
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/deepstate-market-rolling-stats-3eace80d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_acRLivG_vQuE9Zfb8FHLC

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 deepstate-market-rolling-stats-3eace80d
```

Example prompt: Pull the rolling 24h, 7-day, and 30-day stats for the ETH-USDC book on Deepstate — I want to see VWAP, price change percent, volume, and trade count for each window.

## When to prefer this

Use this endpoint when you need pre-aggregated rolling market statistics (24h/7d/30d) for a specific Deepstate on-chain order book without computing them manually from raw trade data. Prefer this over raw event log queries when you want VWAP, volume, and price change in a single call. Best suited for dashboards, alerts, or research tasks focused on Deepstate DEX markets specifically.

## Known failure modes

- Invalid or unknown book identifier returns an error or empty response
- Book has no recent trades resulting in zero or null window data
- Network/RPC latency causing stale block_number in response
- Payment failure (402) if x402 payment header is not provided or insufficient
- Rate limiting if called too frequently without valid payment

## How this service works

Deepstate, the on-chain order-book exchange on Robinhood Chain. Rolling 24h / 7d / 30d volume and price change for a market.

## Output

A JSON object containing the book ID, slug, label, last price, last price raw, block number, market session, finality status, base and quote token metadata (symbol, address, decimals), and per-window (24h, 7d, 30d) statistics including trade count, low/high/VWAP (raw strings), percent price change, and quote volume.

## 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"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "book"
     ],
     "properties": {
      "book": {
       "type": "string"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "book_id": {
       "type": "string"
      },
      "windows": {
       "type": "object",
       "properties": {
        "7d": {
         "type": "object",
         "properties": {
          "trades": {
           "type": "integer"
          },
          "low_raw": {
           "type": "string"
          },
          "high_raw": {
           "type": "string"
          },
          "vwap_raw": {
           "type": "string"
          },
          "change_pct": {
           "type": "number"
          },
          "volume_quote": {
           "type": "integer"
          },
          "volume_quote_raw": {
           "type": "string"
          }
         }
        },
        "24h": {
         "type": "object",
         "properties": {
          "trades": {
           "type": "integer"
          },
          "low_raw": {
           "type": "string"
          },
          "high_raw": {
           "type": "string"
          },
          "vwap_raw": {
           "type": "string"
          },
          "change_pct": {
           "type": "number"
          },
          "volume_quote": {
           "type": "integer"
          },
          "volume_quote_raw": {
           "type": "string"
          }
         }
        },
        "30d": {
         "type": "object",
         "properties": {
          "trades": {
           "type": "integer"
          },
          "low_raw": {
           "type": "string"
          },
          "high_raw": {
           "type": "string"
          },
          "vwap_raw": {
           "type": "string"
          },
          "change_pct": {
           "type": "number"
        
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/deepstate-market-rolling-stats-3eace80d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.onesource.io](https://www.zero.xyz/host/api.onesource.io/llms.txt)
