# DripMetrics Polymarket VPIN Flow-Toxicity Scorer

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

Computes a VPIN (Volume-synchronized Probability of Informed Trading) flow-toxicity score for a Polymarket prediction market by bucketing YES/NO trade pressure into equal-notional buckets over a requested time window.

## Facts

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

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 api-dripmetrics-ai-374fd031 -d '<json body>'
```

Example prompt: What's the VPIN flow-toxicity score for the Polymarket market with slug 'will-the-fed-cut-rates-in-july' over the last 60 minutes? I want to know if there's unusual informed trading pressure on the YES side.

## When to prefer this

Use this endpoint when you need a quantitative, microstructure-based measure of informed trading activity or flow toxicity on a specific Polymarket prediction market — particularly when evaluating adverse selection risk before placing trades, detecting information leakage around news events, or monitoring unusual directional pressure. Prefer this over generic volume or price endpoints when the question is specifically about the quality and toxicity of order flow rather than raw price or probability.

## Known failure modes

- Missing both conditionId and slug returns a validation error — at least one is required
- Invalid or unknown conditionId/slug returns a not-found or empty-data error
- Insufficient trade data within the requested window returns a low sample size warning or null metric
- windowMinutes or limit values outside allowed bounds return a 400 validation error
- Payment not sent or insufficient USDC payment via x402 returns a 402 Payment Required response
- Rate limiting or upstream Polymarket data unavailability returns a 503 or timeout error

## 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

A structured JSON object containing the VPIN metric value (flow-toxicity score), the bucketed YES/NO pressure components used in the calculation, the sample size (number of trades evaluated), the effective analysis window, the market slug, the source, and a computedAt timestamp — giving a quantified measure of how toxic or informed the recent trade flow in the market appears to be.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "limit": 100,
   "conditionId": "0x1234567890abcdef1234567890abcdef",
   "windowMinutes": 60
  }
 }
}
```

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "slug": "fed-decision-in-october",
  "value": 0.92349,
  "metric": "vpin",
  "source": {
   "market": "https://gamma-api.polymarket.com/markets/slug/fed-decision-in-october",
   "trades": "https://data-api.polymarket.com/trades"
  },
  "window": {
   "windowMinutes": 60
  },
  "components": {
   "note": "Polymarket VPIN-style score using equal-notional buckets of inferred YES/NO pressure.",
   "vpin": 0.92349,
   "buckets": 10,
   "bucketSize": 14.9,
   "tradeCount": 4,
   "totalVolume": 149,
   "meanImbalance": 13.76,
   "configuredBuckets": 10
  },
  "computedAt": "2026-05-25T14:00:00.000Z",
  "sampleSize": {
   "trades": 4,
   "scannedTrades": 4
  },
  "conditionId": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-dripmetrics-ai-374fd031/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)
