# Polymarket — Get batch prices history

Get Polymarket Batch Price History data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Polymarket, pass parameters such as fidelity, interval, markets, and retrieve structured data including <asset id>, observation timestamp, and observed price for comparison charts, and history collection, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/polymarket/polymarket-get-batch-prices-history/c9cde013-a950-4d11-9186-d1d32c5937da/
API ID: c9cde013-a950-4d11-9186-d1d32c5937da
Provider: Polymarket
Contract revision: 4
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/polymarket/batch-prices-history
Page update time: 2026-12-03T02:49:27.740Z
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: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:27.190Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Polymarket Batch Price History API

Send POST with a JSON object containing markets, an array of asset ID strings. The response history object maps each returned asset ID to timestamp and price points. Optional start\_ts and end\_ts use Unix seconds; fidelity uses minutes.

## What You Can Build

- **Comparison charts**: Plot separate outcome histories with a shared time window.
- **History collection**: Store observations with their asset ID and requested resolution.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `history.<asset_id>[]` | Price observations for the asset identified by the map key |
| `history.<asset_id>[].t` | Observation timestamp |
| `history.<asset_id>[].p` | Observed price |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Polymarket — Get batch prices history 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": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "description": "Get batch prices history — complete native JSON request body.",
      "examples": [
        {
          "fidelity": 60,
          "interval": "1d",
          "markets": [
            "20006732765674855733524007935991362439352594042415161039767275461950712817548"
          ]
        }
      ],
      "properties": {
        "end_ts": {
          "description": "Filter by items before this unix timestamp (seconds).",
          "format": "double",
          "type": "number"
        },
        "fidelity": {
          "description": "Accuracy of the data expressed in minutes. Default is 1 minute.",
          "type": "integer"
        },
        "interval": {
          "description": "Time interval for data aggregation.",
          "enum": [
            "max",
            "all",
            "1m",
            "1w",
            "1d",
            "6h",
            "1h"
          ],
          "type": "string"
        },
        "markets": {
          "description": "List of market asset ids to query. Maximum 20.",
          "items": {
            "type": "string"
          },
          "maxItems": 20,
          "type": "array"
        },
        "start_ts": {
          "description": "Filter by items after this unix timestamp (seconds).",
          "format": "double",
          "type": "number"
        }
      },
      "required": [
        "markets"
      ],
      "type": "object"
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "history": {
      "type": "object",
      "properties": {
        "20006732765674855733524007935991362439352594042415161039767275461950712817548": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "p": {
                "type": "number"
              },
              "t": {
                "type": "integer"
              }
            }
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Documentation example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/polymarket/batch-prices-history' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "fidelity": 60,
  "interval": "1d",
  "markets": [
    "20006732765674855733524007935991362439352594042415161039767275461950712817548"
  ]
}'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "history": {
    "20006732765674855733524007935991362439352594042415161039767275461950712817548": [
      {
        "p": 0.485,
        "t": 1793199657
      },
      {
        "p": 0.445,
        "t": 1793203227
      },
      {
        "p": 0.455,
        "t": 1793206833
      },
      {
        "p": 0.52,
        "t": 1793214003
      },
      {
        "p": 0.505,
        "t": 1793221246
      },
      {
        "p": 0.515,
        "t": 1793224841
      },
      {
        "p": 0.505,
        "t": 1793228429
      },
      {
        "p": 0.465,
        "t": 1793232000
      },
      {
        "p": 0.445,
        "t": 1793242844
      },
      {
        "p": 0.455,
        "t": 1793246432
      },
      {
        "p": 0.455,
        "t": 1793250040
      },
      {
        "p": 0.445,
        "t": 1793253652
      },
      {
        "p": 0.445,
        "t": 1793257226
      },
      {
        "p": 0.45,
        "t": 1793260819
      },
      {
        "p": 0.46,
        "t": 1793264443
      },
      {
        "p": 0.465,
        "t": 1793268026
      },
      {
        "p": 0.455,
        "t": 1793271637
      },
      {
        "p": 0.445,
        "t": 1793275254
      },
      {
        "p": 0.455,
        "t": 1793278824
      },
      {
        "p": 0.455,
        "t": 1793282427
      },
      {
        "p": 0.455,
        "t": 1793282602
      }
    ]
  }
}
```

## 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
### What belongs in markets?
Supply asset ID strings, not event IDs or condition IDs. The request body allows at most 20 entries in markets.

### How do I control the time window?
Use the documented interval values max, all, 1m, 1w, 1d, 6h or 1h, or the start_ts and end_ts time bounds in Unix seconds.

### Is fidelity measured in seconds?
No. This implementation defines fidelity in minutes. The separate v2 token history implementation uses bucket_seconds.

### How do I join the returned series?
Read the keys under history as asset IDs. Each key has its own array of t and p observations; do not align different series by array position alone.

### 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 implementation. Follow its billing unit and any request-dependent rules before sending the request.

## Available implementations
- Polymarket: https://openany.si/polymarket/polymarket-get-batch-prices-history/c9cde013-a950-4d11-9186-d1d32c5937da/

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