# Scanna Recent Trades

> Scanna Recent Trades is a paid API for AI agents from api.scanna.xyz, paid per call via x402, $0.005015/call, status unknown (last checked 2026-09-14).

Fetches the most recent trades for a specific Polymarket prediction market, paginated via a keyset cursor, newest first.

## Facts

- Endpoint: GET https://api.scanna.xyz/trades
- Price: $0.005015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/scanna-recent-trades-b8976dea
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zy3NjK0bzytsEu2VV_HYJ

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 scanna-recent-trades-b8976dea
```

Example prompt: Pull the 100 most recent trades for Polymarket condition ID 0xabc123def456... and page through them so I can see who's been buying and selling and whether any whale trades have come in.

## When to prefer this

Use this endpoint when you need a paginated, time-ordered feed of individual trades for a specific Polymarket condition ID — especially when you need to detect whale activity, paginate through high-volume trade history, or filter trades since a specific unix timestamp. Prefer this over aggregate endpoints when you need raw per-trade granularity rather than summary statistics.

## Known failure modes

- 400 if market_id is absent
- 400 if cursor is malformed (never silently ignored)
- 503 with 'trades_cold_storage' error for archived markets
- Degraded empty 200 if the archive probe itself errors
- Empty billable 200 for markets with no trades

## How this service works

Recent trades for one market from the post-cutover trades_v2 table, newest first, keyset cursor. timestamp is whole unix seconds and the cursor is {ts,id}; the query sorts on that same floored key, so trades sharing a second page exactly once. id is a JSON number. An archived market returns 503 trades_cold_storage - unless the archive probe itself errors, which degrades to an empty 200. A market with no trades is an empty, billable 200.

## Output

Returns a JSON object with a list of trades (each containing id, condition_id, proxy_wallet, price, size, side, notional, timestamp, and is_whale), a count of returned trades, and an optional next_cursor string for keyset pagination. Returns an empty list with count 0 for markets with no trades. Returns 503 for archived markets stored in cold storage.

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "market_id"
     ],
     "properties": {
      "limit": {
       "type": "integer",
       "default": 50,
       "maximum": 500,
       "minimum": 1
      },
      "since": {
       "type": "integer",
       "description": "Unix seconds lower bound. Clamped; absurd values cannot 500 the route."
      },
      "cursor": {
       "type": "string",
       "description": "Opaque keyset cursor from next_cursor. Malformed cursors are rejected, never silently ignored."
      },
      "market_id": {
       "type": "string",
       "description": "Condition ID. Absent is 400."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "trades",
      "count"
     ],
     "properties": {
      "count": {
       "type": "integer"
      },
      "trades": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "id",
         "condition_id",
         "proxy_wallet",
         "price",
         "size",
         "side",
         "notional",
         "timestamp",
         "is_whale"
        ],
        "properties": {
         "id": {
          "type": "integer",
          "description": "BIGINT coerced to a JSON number — never a string"
         },
         "side": {
          "enum": [
           "BUY",
           "SELL"
          ],
          "type": "string"
         },
         "size": {
          "type": "number"
         },
         "price": {
          "type": "number"
         },
         "is_whale": {
          "type": "boolean"
         },
         "notional": {
          "type": "number"
         },
         "timestamp": {
          "type": "integer",
          "description": "Whole unix SECONDS — the same key the cursor compares"
         },
         "condition_id": {
          "type": "string"
         },
         "proxy_wallet": {
          "type":
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scanna-recent-trades-b8976dea/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.scanna.xyz](https://www.zero.xyz/host/api.scanna.xyz/llms.txt)
