# x402-factory Prediction Market Liquidity Analytics

> x402-factory Prediction Market Liquidity Analytics is a paid API for AI agents from x402-factory.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-12).

Returns real-time liquidity analytics for a prediction market by slug, including bid-ask spreads, order book depth, slippage estimates, and 24-hour volume profiles across Kalshi and Polymarket.

## Facts

- Endpoint: GET https://x402-factory.com/v1/liquidity/%7Bslug%7D?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-factory-prediction-market-liquidity-analytics-07abb1ff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S1hwITbua0Mt5Q0062bwr

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 x402-factory-prediction-market-liquidity-analytics-07abb1ff
```

Example prompt: What's the current liquidity situation for the 'us-presidential-election-2026' market — give me the spread, order book depth within 1 cent and 5 cents, and estimated slippage on both Kalshi and Polymarket, along with the 24-hour volume profile.

## When to prefer this

Use this endpoint when you need real-time microstructure data (spread, depth, slippage, volume) for a specific prediction market contract across Kalshi and Polymarket. Prefer it over generic market price endpoints when the goal is execution quality assessment — understanding if and how cheaply a position can be entered or exited — rather than just fetching a probability or price. Best for trading bots, arbitrage detection, and liquidity-aware order routing.

## Known failure modes

- Invalid or non-existent slug returns 404 or empty data object
- Market not listed on either venue returns empty per_venue array
- Slug format mismatch (not kebab-case) causes 400 validation error
- Payment not provided returns HTTP 402 with X-PAYMENT requirements
- Temporary venue API outage may reduce per_venue coverage to one source
- notional_usd outside 1–100000 range causes schema validation rejection

## How this service works

Paid data APIs for AI agents: prediction-market analytics, weather intelligence, weather×market edge signals, and SEC/gov data. Paid endpoints use the x402 protocol (HTTP 402 + USDC on Base): call without payment to receive requirements, retry with an X-PAYMENT header. Machine-readable catalog: /llms.txt. Per-endpoint docs: /docs/{id}.

## Output

A JSON object with per-venue breakdown (Kalshi and Polymarket) of bid-ask spread in cents, estimated slippage in cents, and order book depth within 1¢ and 5¢ in USD; plus aggregate 24-hour volume in USD; and an hourly volume profile array (hour, volume_usd) covering the last 24 hours. Metadata includes data source, freshness, endpoint version, and a unique request ID.

## 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"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "slug"
     ],
     "properties": {
      "slug": {
       "type": "string",
       "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "notional_usd": {
       "type": "number",
       "maximum": 100000,
       "minimum": 1
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "meta"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "per_venue",
        "volume_24h_usd",
        "volume_profile_24h"
       ],
       "properties": {
        "per_venue": {
         "type": "array",
         "items": {
          "type": "object",
          "required": [
           "venue",
           "depth_within_1c_usd",
           "depth_within_5c_usd",
           "spread_c"
          ],
          "properties": {
           "venue": {
            "enum": [
             "kalshi",
             "polymarket"
            ],
            "type": "string"
           },
           "spread_c": {
            "type": "number"
           },
           "est_slippage_c": {
            "type": "number"
           },
           "depth_within_1c_usd": {
            "type": "number"
           },
           "depth_within_5c_usd": {
            "type": "number"
           }
          },
          "additionalProperties": false
         }
        },
        "volume_24h_usd": {
         "type": "number"
        },
        "volume_profile_24h": {
         "type": "array",
         "items": {
          "type": "object",
          "required": [
           "hour",
           "volume_usd"
          ],
          "properties": {
           "hour": {
            "type": "integer",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991
           },
           "volume_usd": {
   
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "per_venue": [
    {
     "venue": "kalshi",
     "spread_c": 1,
     "est_slippage_c": 0.11,
     "depth_within_1c_usd": 43511.16,
     "depth_within_5c_usd": 220022.94
    },
    {
     "venue": "polymarket",
     "spread_c": 1,
     "est_slippage_c": 0.14,
     "depth_within_1c_usd": 52295.06,
     "depth_within_5c_usd": 175633.51
    }
   ],
   "volume_24h_usd": 591880.68,
   "volume_profile_24h": [
    {
     "hour": 13,
     "volume_usd": 22654.53
    },
    {
     "hour": 14,
     "volume_usd": 28433.7
    },
    {
     "hour": 15,
     "volume_usd": 23554.93
    },
    {
     "hour": 16,
     "volume_usd": 24849.59
    },
    {
     "hour": 17,
     "volume_usd": 27004.33
    },
    {
     "hour": 18,
     "volume_usd": 24873.7
    },
    {
     "hour": 19,
     "volume_usd": 20998.15
    },
    {
     "hour": 20,
     "volume_usd": 22003.64
    },
    {
     "hour": 21,
     "volume_usd": 31425.32
    },
    {
     "hour": 22,
     "volume_usd": 24433.02
    },
    {
     "hour": 23,
     "volume_usd": 28671.91
    },
    {
     "hour": 0,
     "volume_usd": 21033.08
    },
    {
     "hour": 1,
     "volume_usd": 19440.17
    },
    {
     "hour": 2,
     "volume_usd": 27355.65
    },
    {
     "hour": 3,
     "volume_usd": 33541.3
    },
    {
     "hour": 4,
     "volume_usd": 19872.25
    },
    {
     "hour": 5,
     "volume_usd": 20189.92
    },
    {
     "hour": 6,
     "volume_usd": 28022.61
    },
    {
     "hour": 7,
     "volume_usd": 25217.71
    },
    {
     "hour": 8,
     "volume_usd": 20702.89
    },
    {
     "hour": 9,
     "volume_usd": 26834.01
    },
    {
     "hour": 10,
     "volume_usd": 22330.71
    },
    {
     "hour": 11,
     "volume_usd": 22008.88
    },
    {
     "hour": 12,
     "volume_usd": 19213.25
    }
   ]
  },
  "meta": {
   "docs": "https://x402-factory.com/docs/probability.liquidity",
   "sources": [
    "kalshi",
    "polymarket"
   ],
   "version": "1.0.0",
   "endpoint": "/v1/liquidity/{slug}",
   "data_mode": "live",
   "freshness": "realtime",
   "request_id": "req_00000000",
   "generated_at": "2026-08-21T03:58:58.104Z"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-factory-prediction-market-liquidity-analytics-07abb1ff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-factory.com](https://www.zero.xyz/host/x402-factory.com/llms.txt)
