# Prediction Markets and Derivatives — Get historical OHLCV candlestick data for a single outcome token

Query Blockrun Get historical OHLCV candlestick data for a single outcome token data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by BlockRun, pass parameters such as end_time, interval, start_time, and retrieve structured data including returned price field, returned trades count field, returned volume field, returned condition id value, and returned interval field for market reference and account inspection, and integration reference.

Documentation: https://openany.si/blockrun/blockrun-prediction-markets-and-derivatives-get-historical-ohlcv-candlestick-data-for-a-single-o/3899a17a-1767-4240-bfeb-acba61f26fe0/
API ID: 3899a17a-1767-4240-bfeb-acba61f26fe0
Provider: blockrun
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/blockrun/v1/pm/polymarket/candlesticks/token/{token_id}
Page update time: 2026-12-03T02:49:53.753Z
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.331Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "7500",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Blockrun Get historical OHLCV candlestick data for a single outcome token API

Retrieve historical OHLCV candlestick data for a single outcome token with the BlockRun API. Provide token\_id in path. 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 |
| --- | --- |
| `candlesticks[].end_period_ts` | Returned end period ts field |
| `candlesticks[].price` | Returned price field |
| `candlesticks[].trades_count` | Returned trades count field |
| `candlesticks[].volume` | Returned volume field |
| `condition_id` | Returned condition id value (nullable in the reference) |
| `first_trade_ts` | Returned first trade ts field |
| `interval` | Returned interval field |
| `interval_seconds` | Returned interval seconds field |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Prediction Markets and Derivatives — Get historical OHLCV candlestick data for a single outcome token 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": {
        "token_id": {
          "type": "string",
          "description": "Identifier of a prediction-market outcome token, not an ERC-20 contract address."
        }
      },
      "required": [
        "token_id"
      ]
    },
    "query": {
      "type": "object",
      "properties": {
        "end_time": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Unix timestamp (seconds) for end of time range",
          "minimum": 0
        },
        "interval": {
          "type": "integer",
          "description": "Interval: 0=auto, 1=1m, 5=5m, 15=15m, 60=1h, 1440=1d"
        },
        "start_time": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Unix timestamp (seconds) for start of time range",
          "minimum": 0
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "candlesticks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "end_period_ts": {
            "type": "integer"
          },
          "price": {
            "type": "object",
            "properties": {
              "close": {
                "type": "number"
              },
              "close_dollars": {
                "type": "string"
              },
              "high": {
                "type": "number"
              },
              "high_dollars": {
                "type": "string"
              },
              "low": {
                "type": "number"
              },
              "low_dollars": {
                "type": "string"
              },
              "mean": {
                "type": "number"
              },
              "mean_dollars": {
                "type": "string"
              },
              "open": {
                "type": "number"
              },
              "open_dollars": {
                "type": "string"
              }
            }
          },
          "trades_count": {
            "type": "integer"
          },
          "volume": {
            "type": "number"
          }
        }
      }
    },
    "condition_id": {
      "type": "null"
    },
    "first_trade_ts": {
      "type": "integer"
    },
    "interval": {
      "type": "integer"
    },
    "interval_seconds": {
      "type": "integer"
    },
    "last_trade_ts": {
      "type": "integer"
    },
    "token_id": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Documentation example (source abbreviated)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/blockrun/v1/pm/polymarket/candlesticks/token/42356562910850310722772587374429042669248036407566323679593011382225452967645?end_time=1793450223&interval=1&start_time=1793450103' \
  -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
{
  "candlesticks": [
    {
      "end_period_ts": 1793450220,
      "price": {
        "close": 0.48,
        "close_dollars": "0.4800",
        "high": 0.48,
        "high_dollars": "0.4800",
        "low": 0.48,
        "low_dollars": "0.4800",
        "mean": 0.48,
        "mean_dollars": "0.4800",
        "open": 0.48,
        "open_dollars": "0.4800"
      },
      "trades_count": 1,
      "volume": 1.92
    }
  ],
  "condition_id": null,
  "first_trade_ts": 1793270160,
  "interval": 1,
  "interval_seconds": 60,
  "last_trade_ts": 1793450460,
  "token_id": "42356562910850310722772587374429042669248036407566323679593011382225452967645"
}
```

## 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
### Which inputs identify this request?
Provide token_id in path (string). Keep identifiers and URLs in the formats documented for this implementation.

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

### What type does end_time use?
end_time uses the JSON type integer in query. Preserve that type; strings, numbers, booleans and arrays are not interchangeable.

### 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-get-historical-ohlcv-candlestick-data-for-a-single-o/3899a17a-1767-4240-bfeb-acba61f26fe0/

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