# Prediction Markets and Derivatives — Fetch historical orderbook snapshots for a Kalshi market

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

Documentation: https://openany.si/blockrun/blockrun-prediction-markets-and-derivatives-fetch-historical-orderbook-snapshots-for-a-kalshi-ma/f9b5ca93-c8fb-4246-8f4a-1ef3722c9dac/
API ID: f9b5ca93-c8fb-4246-8f4a-1ef3722c9dac
Provider: blockrun
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/blockrun/v1/pm/kalshi/orderbooks
Page update time: 2026-12-03T02:49:53.725Z
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.237Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "7500",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Blockrun Fetch historical orderbook snapshots for a Kalshi market API

Retrieve historical orderbook snapshots for a Kalshi market with the BlockRun API. Provide end\_time in query, start\_time in query, ticker in query. 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 |
| `snapshots[].ask_depth` | Returned ask depth field |
| `snapshots[].best_ask` | Returned best ask field |
| `snapshots[].best_bid` | Returned best bid field |
| `snapshots[].bid_depth` | Returned bid depth field |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Prediction Markets and Derivatives — Fetch historical orderbook snapshots for a Kalshi market 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": {
        "end_time": {
          "type": "integer",
          "description": "End time in Unix timestamp (milliseconds)"
        },
        "limit": {
          "type": "integer",
          "description": "Maximum number of snapshots to return",
          "minimum": 1,
          "maximum": 2000
        },
        "pagination_key": {
          "type": [
            "string",
            "null"
          ],
          "description": "Pagination key to get the next chunk of data"
        },
        "start_time": {
          "type": "integer",
          "description": "Start time in Unix timestamp (milliseconds)"
        },
        "ticker": {
          "type": "string",
          "description": "The Kalshi market ticker"
        }
      },
      "required": [
        "end_time",
        "start_time",
        "ticker"
      ]
    },
    "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"
        }
      }
    },
    "snapshots": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ask_depth": {
            "type": "integer"
          },
          "best_ask": {
            "type": "integer"
          },
          "best_bid": {
            "type": "integer"
          },
          "bid_depth": {
            "type": "integer"
          },
          "sequence": {
            "type": "integer"
          },
          "ticker": {
            "type": "string"
          },
          "timestamp": {
            "type": "integer"
          },
          "yes_asks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "price": {
                  "type": "integer"
                },
                "size": {
                  "type": "integer"
                }
              }
            }
          },
          "yes_bids": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "price": {
                  "type": "integer"
                },
                "size": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Documentation example (source abbreviated)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/blockrun/v1/pm/kalshi/orderbooks?end_time=1793450200000&limit=1&start_time=1793450140000&ticker=CONTROLH-2026-R' \
  -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": "eyJ0aWNrZXIiOiJDT05UUk9MSC0yMDI2LVIiLCJ0aW1lc3RhbXBfbXMiOjE3OTM0NTAxNTE0NTUsInNlcXVlbmNlIjozMTc1MTYsInBvIjoxLCJzY29wZSI6eyJ0aWNrZXIiOiJDT05UUk9MSC0yMDI2LVIiLCJzdGFydF90aW1lIjoxNzkzNDUwMTQwMDAwLCJlbmRfdGltZSI6MTc5MzQ1MDIwMDAwMH19"
  },
  "snapshots": [
    {
      "ask_depth": 14741232,
      "best_ask": 7,
      "best_bid": 6,
      "bid_depth": 6636365,
      "sequence": 317516,
      "ticker": "CONTROLH-2026-R",
      "timestamp": 1793450151455,
      "yes_asks": [
        {
          "price": 7,
          "size": 604687
        },
        {
          "price": 8,
          "size": 1093095
        },
        {
          "price": 9,
          "size": 401549
        },
        {
          "price": 10,
          "size": 608589
        },
        {
          "price": 11,
          "size": 212293
        }
      ],
      "yes_bids": [
        {
          "price": 6,
          "size": 19047
        },
        {
          "price": 5,
          "size": 103165
        },
        {
          "price": 4,
          "size": 140333
        },
        {
          "price": 3,
          "size": 331361
        },
        {
          "price": 2,
          "size": 99306
        }
      ]
    }
  ]
}
```

## 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 end_time in query (integer); start_time in query (integer); ticker in query (string). Keep identifiers and URLs in the formats documented for this implementation.

### Which pagination or result-size inputs are exposed?
limit is integer with minimum 1 and maximum 2000; 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.

### 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-fetch-historical-orderbook-snapshots-for-a-kalshi-ma/f9b5ca93-c8fb-4246-8f4a-1ef3722c9dac/

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