# Prediction Markets and Derivatives — Query historical Polymarket trade data with flexible filtering

Get Query historical Polymarket trade data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by BlockRun, pass parameters such as limit, order, and retrieve structured data including continuation flag, reported count, result limit, returned pagination key field, and title for market reference and account inspection, and integration reference.

Documentation: https://openany.si/blockrun/blockrun-prediction-markets-and-derivatives-query-historical-polymarket-trade-data-with-flexible/c3357446-948b-427c-9a78-f658c554853f/
API ID: c3357446-948b-427c-9a78-f658c554853f
Provider: blockrun
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/blockrun/v1/pm/polymarket/trades
Page update time: 2026-12-03T02:49:53.670Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.0075 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:53.057Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "7500",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Blockrun Query historical Polymarket trade data with flexible filtering API

Query historical Polymarket trade data with flexible filtering with the BlockRun API. Review the optional inputs supported by the selected implementation. Read the response using the field paths below, preserving identifiers and the declared value types when mapping results.

## What You Can Build

- **Market reference and account inspection**: Keep market, asset and account identities distinct when interpreting records.
- **Integration reference**: Use the selected request format and keep source identifiers with the returned result.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `pagination.has_more` | Continuation flag |
| `pagination.count` | Reported count |
| `pagination.limit` | Result limit |
| `pagination.pagination_key` | Returned pagination key field |
| `trades[].title` | Title |
| `trades[].amount_usd` | Returned amount usd field |
| `trades[].condition_id` | Returned condition id field |
| `trades[].market_slug` | Returned market slug field |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Prediction Markets and Derivatives — Query historical Polymarket trade data with flexible filtering request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "builder": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter by V2 builder attribution tag (bytes32 hex, 0x + 64 hex chars)"
        },
        "condition_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter by condition ID"
        },
        "end_time": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Unix timestamp (seconds) for end"
        },
        "limit": {
          "type": "integer",
          "description": "Number of trades to return",
          "minimum": 1,
          "maximum": 500
        },
        "market_slug": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter by market slug"
        },
        "min_total": {
          "type": [
            "number",
            "null"
          ],
          "description": "Minimum trade amount in USD",
          "minimum": 0
        },
        "order": {
          "type": "string",
          "description": "Sort order: asc or desc",
          "enum": [
            "asc",
            "desc"
          ]
        },
        "order_hash": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter by order hash (bytes32 hex, 0x + 64 hex chars)"
        },
        "pagination_key": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cursor for pagination"
        },
        "start_time": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Unix timestamp (seconds) for start"
        },
        "token_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter by token ID"
        },
        "tx_hash": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter by transaction hash (bytes32 hex, 0x + 64 hex chars)"
        },
        "wallet": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter by wallet address(es) — single address or comma-separated list (max 50)"
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "pagination": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer"
        },
        "has_more": {
          "type": "boolean"
        },
        "limit": {
          "type": "integer"
        },
        "pagination_key": {
          "type": "string"
        }
      }
    },
    "trades": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "amount_usd": {
            "type": "number"
          },
          "condition_id": {
            "type": "string"
          },
          "market_slug": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "shares": {
            "type": "integer"
          },
          "shares_normalized": {
            "type": "integer"
          },
          "side": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "token_id": {
            "type": "string"
          },
          "tx_hash": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Documentation example (source abbreviated)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/blockrun/v1/pm/polymarket/trades?limit=1&order=desc' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "pagination": {
    "count": 1,
    "has_more": true,
    "limit": 1,
    "pagination_key": "eyJ0cyI6MTc5MzQ1MDE2MywiYm4iOjk2NDk2NDcxLCJsaSI6NTAxLCJwbyI6MSwic2NvcGUiOnsiY29uZGl0aW9uX2lkIjpudWxsLCJtYXJrZXRfc2x1ZyI6bnVsbCwidG9rZW5faWQiOm51bGwsInVzZXIiOm51bGwsImJ1aWxkZXIiOm51bGwsInN0YXJ0X3RpbWUiOm51bGwsImVuZF90aW1lIjpudWxsLCJtaW5fdG90YWwiOm51bGwsIm9yZGVyIjoiZGVzYyJ9fQ=="
  },
  "trades": [
    {
      "amount_usd": 1.92,
      "condition_id": "0x54a1bfbab3a9ebd2761ec2bc5f06b6c7b03aa06eae0de40f25c2bcfec1723673",
      "market_slug": "cfb-minnst-ind-2026-10-31-spread-home-20pt5",
      "price": 0.48,
      "shares": 4000000,
      "shares_normalized": 4,
      "side": "BUY",
      "title": "Spread: Indiana (-20.5)",
      "token_id": "42356562910850310722772587374429042669248036407566323679593011382225452967645",
      "tx_hash": "0x981e7d8e91981618b7ca078ccdb0f595233f1b2195be54028408f2d36f0da83b"
    }
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Does this implementation require business input parameters?
No business input is marked as required by the selected schema. Review any optional filters and the documented request format before calling.

### Which pagination or result-size inputs are exposed?
limit is integer with minimum 1 and maximum 500; start_time is integer. Use only the exposed inputs and the continuation metadata returned by this endpoint; a size limit is not automatically a page or cursor.

### Which values can I use for order?
The selected schema accepts asc, desc. Keep the documented string type and exact spelling for this input.

### Where do URL parameters belong?
Use the documented path and query inputs. This GET implementation does not use a JSON request body; keep path values and URL query values in their declared locations.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected API implementation. Follow its billing unit, quantity and any request-dependent rules before sending the request.

## Available implementations
- blockrun: https://openany.si/blockrun/blockrun-prediction-markets-and-derivatives-query-historical-polymarket-trade-data-with-flexible/c3357446-948b-427c-9a78-f658c554853f/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
