# Prediction Market Recent Trades Feed

> Prediction Market Recent Trades Feed is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-15).

Returns a pseudonymous recent-trades feed for a prediction market (by conditionId, slug, or numeric ID) with a derived summary of trade count, volume, price stats, and buy/sell breakdown.

## Facts

- Endpoint: GET https://payai.agentstools.dev/prediction/trades
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/prediction-market-recent-trades-feed-b1c0e2e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HuwBshuCVMERbcgRkB12L

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 prediction-market-recent-trades-feed-b1c0e2e1
```

Example prompt: Show me the last 50 trades on the Polymarket market with slug 'will-trump-win-2024', filtering to only BUY trades above $5, and give me the average price and total volume breakdown.

## When to prefer this

Use this endpoint when you need a recent trade-level view of a specific Polymarket prediction market, including pseudonymous individual trades and derived statistics like buy/sell breakdown, average price, and last price. Prefer this over order book endpoints when you want historical trade flow rather than current market depth, and over aggregate market endpoints when you need granular trade-by-trade data or directional volume analysis.

## Known failure modes

- Market not found for given conditionId, slug, or numeric ID — returns 404 or empty result
- Invalid side filter value (not BUY or SELL) — schema validation error
- limit out of range (below 1 or above 100) — validation error
- min_size is negative — validation error
- Venue other than polymarket specified — not supported
- Payment not provided or insufficient — x402 payment required response
- Network or upstream Polymarket API unavailability — 5xx error

## How this service works

Recent trades for one prediction market (by conditionId, slug or numeric id): a PII-stripped pseudonymous feed plus a derived summary — trade count, buy/sell volume and counts, size-weighted average price, last price and range.

## Output

A pseudonymous list of recent trades (up to 100) for the specified prediction market, plus a derived summary including total trade count, buy and sell volumes and counts, size-weighted average price, last traded price, and price range over the returned window.

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "market"
     ],
     "properties": {
      "side": {
       "enum": [
        "BUY",
        "SELL"
       ],
       "type": "string",
       "description": "Filter to one side"
      },
      "limit": {
       "type": "integer",
       "maximum": 100,
       "minimum": 1,
       "description": "Max trades (default 25, cap 100)"
      },
      "venue": {
       "enum": [
        "polymarket"
       ],
       "type": "string",
       "description": "Venue (default polymarket)"
      },
      "market": {
       "type": "string",
       "description": "Market: 0x conditionId, slug or numeric id (resolved to a conditionId first)"
      },
      "min_size": {
       "type": "number",
       "minimum": 0,
       "description": "Only trades at/above this cash value"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/prediction-market-recent-trades-feed-b1c0e2e1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
