# DripMetrics AI Polymarket Flow Imbalance

> DripMetrics AI Polymarket Flow Imbalance is a paid API for AI agents from api.dripmetrics.ai, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-13).

Computes the buy/sell flow imbalance metric for a Polymarket prediction market over a configurable time window, indicating directional trading pressure.

## Facts

- Endpoint: POST https://api.dripmetrics.ai/polymarket/flow-imbalance
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dripmetrics-ai-polymarket-flow-imbalance-f370ed6d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A8_LFna86Z7pNXF_86f_-

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 dripmetrics-ai-polymarket-flow-imbalance-f370ed6d -d '<json body>'
```

Example prompt: What's the flow imbalance on the 'fed-decision-in-october' Polymarket market over the last 60 minutes — is money flowing more into yes or no?

## When to prefer this

Use this endpoint when you need real-time directional flow analysis for a specific Polymarket prediction market — particularly when you want to understand whether buy-side or sell-side pressure dominates within a recent time window. It is purpose-built for Polymarket microstructure diagnostics, unlike generic sentiment or price feeds. Prefer it over raw Polymarket API calls when you need pre-computed, normalized flow imbalance metrics ready for agent consumption or dashboard integration.

## Known failure modes

- Unknown or misspelled market slug returns an error or empty result
- Market with insufficient trade history in the requested window returns low sample size or null
- Very short time windows (e.g. 1 minute) may return sparse data with unreliable imbalance scores
- Network issues reaching Polymarket's Gamma API or Data API may cause upstream fetch failures
- Payment failure via x402 protocol prevents the request from being processed

## How this service works

DripMetricsAI (https://dripmetrics.ai/) provides on-demand crypto market microstructure metrics, Hyperliquid candle metrics, Polymarket diagnostics, and on-chain DefiLlama metrics for agents, dashboards, and trading workflows.

## Output

Returns a JSON object with the flow imbalance score (a number between -1 and 1 indicating directional pressure), yes and no volumes, total volume, trade count, the Polymarket condition ID, the time window used, source URLs for the underlying market and trade data, and a timestamp of when the metric was computed.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "conditionId": {
       "type": "string",
       "description": "Polymarket condition ID for trade-based metrics."
      },
      "slug": {
       "type": "string",
       "description": "Polymarket market or event slug for human-readable market selection. Multi-market event slugs may require conditionId to disambiguate."
      },
      "tokenId": {
       "type": "string",
       "description": "Polymarket token / asset ID for orderbook and price-history endpoints."
      },
      "assetId": {
       "type": "string",
       "description": "Alias for tokenId on price-history-based endpoints."
      },
      "outcome": {
       "type": "string",
       "enum": [
        "YES",
        "NO"
       ],
       "description": "Required for token-side Polymarket diagnostics when the selected YES or NO side must be interpreted."
      },
      "windowMinutes": {
       "type": "integer",
       "minimum": 1,
       "description": "Lookback window in minutes."
      },
      "limit": {
       "type": "integer",
       "minimum": 1,
       "maximum": 5000,
       "description": "Maximum number of trades to evaluate."
      },
      "startTs": {
       "type": "integer",
       "description": "Optional unix timestamp lower bound."
      },
      "endTs": {
       "type": "integer",
       "description": "Optional unix timestamp upper bound."
      },
      "lookbackMinutes": {
       "type": "integer",
       "minimum": 1,
       "description": "Historical lookback used for probability shock normalization."
      },
      "newsTs": {
       "type": "integer",
       "description": "Optional explicit event timestamp for leakage scoring. If omitted, the metric uses the midpoint of the effective analysis window."
      }
     },
     "required": [],
     "additionalProperties": false,
     "anyOf": [
      {
       "required": [
        "conditionId"
       ]
      },
      {
       "required": [
        "slug"
       ]
      }
     ]
    }
   },
   "required": [
    "type",
    "method"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "slug": "fed-decision-in-october",
  "value": 0.2184,
  "metric": "flow-imbalance",
  "source": {
   "market": "https://gamma-api.polymarket.com/markets/slug/fed-decision-in-october",
   "trades": "https://data-api.polymarket.com/trades"
  },
  "window": {
   "windowMinutes": 60
  },
  "components": {
   "noVolume": 7978.6,
   "yesVolume": 12450.2,
   "tradeCount": 186,
   "totalVolume": 20428.8
  },
  "computedAt": "2026-05-25T14:00:00.000Z",
  "sampleSize": {
   "trades": 186
  },
  "conditionId": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dripmetrics-ai-polymarket-flow-imbalance-f370ed6d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.dripmetrics.ai](https://www.zero.xyz/host/api.dripmetrics.ai/llms.txt)
