# Kalshi Historical Trades Scraper (`automation-lab/kalshi-historical-trades-scraper`) Actor

Export public Kalshi trade executions with exact prices, quantities, timestamps, taker sides, block flags, and resumable cursors. Filter by ticker or time, then download JSON, CSV, or Excel.

- **URL**: https://apify.com/automation-lab/kalshi-historical-trades-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Kalshi Historical Trades Scraper

Export **public Kalshi historical trades** as one clean dataset row per execution.

Use market and time-window filters to build backtesting samples, study traded prices and volume, or refresh an analytics warehouse—without a Kalshi login or API key.

This Actor uses Kalshi's structured historical API rather than a browser, preserves exact fixed-point values, and writes a resumable cursor checkpoint after every page.

### What does Kalshi Historical Trades Scraper do?

Kalshi Historical Trades Scraper downloads transaction-level records from Kalshi's public historical trade tape.

Each row represents one completed trade, not a market snapshot or an order-book level.

You can:

- 🎯 export trades for one exact market ticker;
- 🕐 select an execution-time window;
- 📦 cap an export from one row to one million rows;
- 🔁 resume pagination from a saved cursor;
- 💵 analyze numeric yes/no prices and contract quantities;
- 🔬 retain source-exact decimal strings for precise calculations;
- 📤 download results as JSON, CSV, Excel, XML, or RSS through Apify.

The default input requests only ten records, so you can verify the output quickly before starting a larger backfill.

### Who is Kalshi Historical Trades Scraper for?

**Quantitative researchers**

- Build trade-level samples for prediction-market backtests.
- Measure executed-price distributions and transaction sizes.
- Compare activity across market tickers and time windows.

**Prediction-market traders**

- Review historical prints for a specific settled contract.
- Identify block trades and aggressive taker behavior.
- Export transaction history into notebooks or spreadsheets.

**Forecasters and academics**

- Study how market participation evolves before resolution.
- Join execution records with market metadata for event research.
- Preserve reproducible source timestamps and IDs.

**Data engineers and analytics teams**

- Schedule recurring archive exports on Apify.
- Resume long backfills using the `CHECKPOINT` cursor.
- Stream clean rows into warehouses, BI tools, or object storage.

### Why use this Kalshi trades scraper?

- **No authentication:** the public Kalshi v2 historical-trades endpoint needs no account, cookie, or API token.
- **One execution per row:** avoid unpacking mixed market, order-book, and trade entities.
- **API-first efficiency:** direct HTTP keeps runtime and memory usage low.
- **Decimal safety:** numeric fields are convenient for charts, while exact strings protect precision-sensitive pipelines.
- **Resumable exports:** every fetched page updates a key-value-store checkpoint.
- **Server-side filtering:** ticker and timestamps are sent to Kalshi rather than filtered after a wasteful full download.
- **Stable deduplication:** trade IDs prevent duplicate rows within a run.
- **Apify integrations:** schedule runs, trigger webhooks, and connect datasets to thousands of apps.

Choose [Kalshi Markets Scraper](https://apify.com/automation-lab/kalshi-markets-scraper) instead when you need contract titles, status, bid/ask, liquidity, rules, or settlement metadata rather than executions.

### What Kalshi trade data can you extract?

| Category | Fields | Meaning |
|---|---|---|
| Identity | `tradeId`, `ticker` | Unique execution and market identifiers |
| Time | `createdTime` | UTC execution timestamp supplied by Kalshi |
| Quantity | `count`, `countExact` | Numeric and source-exact contract quantity |
| Prices | `yesPrice`, `yesPriceExact` | Executed yes-side dollar price |
| Prices | `noPrice`, `noPriceExact` | Executed no-side dollar price |
| Aggressor | `takerSide` | Side associated with the taker |
| Outcome | `takerOutcomeSide` | Yes/no outcome selected by the taker |
| Book | `takerBookSide` | Bid/ask side consumed by the taker |
| Classification | `isBlockTrade` | Whether Kalshi marks the execution as a block trade |
| Provenance | `sourceType`, `sourceEndpoint` | Historical source and public API endpoint |
| Pagination | `pageNumber` | API page that produced the row |
| Audit | `scrapedAt` | Timestamp when the Actor saved the row |

Prices are dollar probabilities, typically between `0` and `1`.

`countExact`, `yesPriceExact`, and `noPriceExact` preserve the strings returned by Kalshi, such as `"53.90"` or `"0.4400"`.

### How much does it cost to scrape Kalshi historical trades?

This Actor uses **pay-per-event** pricing.

The pre-launch price is a **$0.00025 start fee** plus a tiered amount for each saved trade.

| Apify tier | Price per trade |
|---|---:|
| Free | $0.000035295 |
| Starter / Bronze | $0.000030691 |
| Scale / Silver | $0.000023939 |
| Business / Gold | $0.000018415 |
| Platinum | $0.000012276 |
| Diamond | $0.000010000 |

Examples at the Free-tier rate:

| Export | Calculation | Estimated charge |
|---|---|---:|
| 10 trades | $0.00025 + 10 × $0.000035295 | $0.00060295 |
| 100 trades | $0.00025 + 100 × $0.000035295 | $0.00377950 |
| 1,000 trades | $0.00025 + 1,000 × $0.000035295 | $0.03554500 |

These formula-derived prices preserve at least 30% net margin for measured 10-trade runs and exceed 40% for a representative 100-trade run.

Your Apify plan, dataset retention, and integrations may have separate platform terms.

### How to scrape Kalshi historical trades

1. Open [Kalshi Historical Trades Scraper](https://apify.com/automation-lab/kalshi-historical-trades-scraper).
2. Keep the prefilled ticker for a quick first test, or paste another exact Kalshi market ticker.
3. Set optional earliest and latest execution timestamps.
4. Choose the maximum number of trades to save.
5. Click **Start**.
6. Preview the dataset while the run is active.
7. Export the result as JSON, CSV, Excel, XML, or RSS.
8. For a longer continuation, copy `nextCursor` from the `CHECKPOINT` key-value-store record into `startCursor`.

A broad export needs only:

```json
{
  "maxItems": 100,
  "pageSize": 100
}
````

A market-specific export:

```json
{
  "ticker": "KXNBAGAME-26MAY23NYKCLE-NYK",
  "maxItems": 500,
  "pageSize": 500
}
```

A bounded research window:

```json
{
  "ticker": "KXNBAGAME-26MAY23NYKCLE-NYK",
  "minCreatedTime": "2026-05-20T00:00:00Z",
  "maxCreatedTime": "2026-05-24T00:00:00Z",
  "maxItems": 10000,
  "pageSize": 1000
}
```

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---:|---|
| `ticker` | string | empty | Exact Kalshi market ticker; normalized to uppercase |
| `minCreatedTime` | ISO 8601 string | empty | Include executions at or after this UTC instant |
| `maxCreatedTime` | ISO 8601 string | empty | Include executions at or before this UTC instant |
| `maxItems` | integer | `100` | Maximum unique trades to save, from 1 to 1,000,000 |
| `pageSize` | integer | `1000` | Trades requested per API page, from 1 to 1,000 |
| `startCursor` | string | empty | Resume token from a previous `CHECKPOINT.nextCursor` |

If both timestamps are present, `minCreatedTime` must not be later than `maxCreatedTime`.

Invalid dates and limits fail before any data request.

### Output example

```json
{
  "tradeId": "ca4c7de7-3606-7118-152c-9a66c804cdc3",
  "ticker": "KXNBAGAME-26MAY23NYKCLE-NYK",
  "createdTime": "2026-05-23T23:59:59.964931Z",
  "count": 53.9,
  "countExact": "53.90",
  "yesPrice": 0.44,
  "yesPriceExact": "0.4400",
  "noPrice": 0.56,
  "noPriceExact": "0.5600",
  "takerSide": "yes",
  "takerOutcomeSide": "yes",
  "takerBookSide": "bid",
  "isBlockTrade": false,
  "sourceType": "historical",
  "sourceEndpoint": "https://api.elections.kalshi.com/trade-api/v2/historical/trades",
  "pageNumber": 1,
  "scrapedAt": "2026-07-23T02:30:00.000Z"
}
```

Every dataset item follows the same schema.

The Actor does not mix market metadata, alerts, or error records into the trade dataset.

### Cursor checkpoints and resumable backfills

After each API page, the Actor writes `CHECKPOINT` to the run's default key-value store.

The record contains:

- `complete` — whether the requested run limit or source pagination ended;
- `nextCursor` — the cursor to provide as `startCursor`;
- `savedItems` — rows saved during this run;
- `pagesFetched` — pages fetched during this run;
- the ticker and time-window inputs;
- `updatedAt` — the latest checkpoint time.

For task-based recurring runs, the default store can persist between executions.

Copy the cursor only when you intentionally want the next archive page.

Keep the same ticker and time filters when resuming, because Kalshi cursors belong to the original query context.

### Decimal precision and data types

Kalshi sends contract counts and prices as fixed-point decimal strings.

JavaScript numbers are useful for charts, filters, and ordinary calculations but are binary floating-point values.

For accounting, reproducible research, or arbitrary-precision decimal libraries, use:

- `countExact` instead of only `count`;
- `yesPriceExact` instead of only `yesPrice`;
- `noPriceExact` instead of only `noPrice`.

This dual representation avoids forcing every user into one numeric strategy.

### Tips for reliable Kalshi data exports

- Start with 10–100 rows and inspect the schema before a large backfill.
- Use a ticker whenever your research concerns one contract.
- Use both time boundaries for reproducible experiments.
- Store `tradeId` as the durable deduplication key downstream.
- Preserve timestamps in UTC; convert only in the presentation layer.
- Save the checkpoint outside Apify if a backfill is business-critical.
- Schedule smaller incremental windows instead of repeatedly downloading an entire archive.
- Join trades to market metadata using `ticker`.
- Expect the historical cutoff to move as Kalshi archives older exchange data.

### Kalshi archive coverage and limitations

This Actor reads Kalshi's **historical** trades endpoint.

Kalshi separates archived trades from the current/live trades endpoint using a platform-managed cutoff.

Therefore:

- the newest live executions may not yet appear in this Actor;
- archive coverage and cutoff timing are controlled by Kalshi;
- a ticker with no archived trades can return an empty dataset;
- upstream fields or enum values may evolve;
- the Actor exports public executions, not private portfolio fills;
- transaction records do not include full market titles or settlement rules.

Use [Kalshi Markets Scraper](https://apify.com/automation-lab/kalshi-markets-scraper) to enrich ticker-level market context.

### Integrations for trade research workflows

**Kalshi trades → Google Sheets**

Schedule a market-specific export and sync rows for manual trade review, pivot tables, or lightweight volume analysis.

**Kalshi trades → BigQuery or Snowflake**

Use a webhook after each bounded time-window run, deduplicate by `tradeId`, and append new executions to a warehouse table.

**Kalshi trades → Python notebook**

Start the Actor through the API, load the dataset with `pandas`, and compute price, size, side, or block-trade distributions.

**Kalshi trades → Slack or Discord**

Filter exported rows downstream and alert a research channel when large or block executions occur in a tracked archive window.

**Kalshi trades → Make or Zapier**

Trigger a scenario when a scheduled Actor run finishes, then route CSV files or summary metrics to storage and reporting tools.

### Using the Apify API with Node.js

Install the official client:

```bash
npm install apify-client
```

Run the Actor and retrieve its dataset:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/kalshi-historical-trades-scraper').call({
  ticker: 'KXNBAGAME-26MAY23NYKCLE-NYK',
  maxItems: 100,
  pageSize: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Using the Apify API with Python

Install the client:

```bash
pip install apify-client
```

Then run:

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/kalshi-historical-trades-scraper').call(run_input={
    'ticker': 'KXNBAGAME-26MAY23NYKCLE-NYK',
    'maxItems': 100,
    'pageSize': 100,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### Using the Apify API with cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~kalshi-historical-trades-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "ticker": "KXNBAGAME-26MAY23NYKCLE-NYK",
    "maxItems": 100,
    "pageSize": 100
  }'
```

After the run succeeds, request dataset items using its `defaultDatasetId`.

Never put an Apify token in public source code or browser-side JavaScript.

### Use Kalshi Historical Trades Scraper with AI agents via MCP

This Actor can be called by AI assistants through Apify's hosted [Model Context Protocol integration](https://docs.apify.com/platform/integrations/mcp).

For Claude Code:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/kalshi-historical-trades-scraper"
```

For Claude Desktop, Cursor, or VS Code, add:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/kalshi-historical-trades-scraper"
    }
  }
}
```

Your client will request Apify authentication when needed.

Example prompts:

- “Use `automation-lab/kalshi-historical-trades-scraper` to export 100 archived trades for ticker KXNBAGAME-26MAY23NYKCLE-NYK.”
- “Build a Kalshi execution dataset between 2026-05-20 and 2026-05-24, then summarize trade sizes by taker side.”
- “Resume my Kalshi historical trade backfill from this checkpoint cursor and save 10,000 more records.”

### Is it legal to scrape Kalshi historical trade data?

This Actor accesses a public data endpoint and does not bypass authentication or access private user accounts.

Public availability does not remove every legal or contractual obligation.

You are responsible for:

- following Kalshi's applicable terms and API policies;
- using data for a lawful purpose;
- avoiding attempts to identify private individuals from public records;
- respecting intellectual-property, privacy, financial, and data-retention rules in your jurisdiction;
- securing exported datasets and API credentials.

If you are unsure whether your commercial or regulated use is permitted, obtain qualified legal advice.

### Troubleshooting

**Why did the dataset contain no trades?**

The exact ticker may have no archived executions, the time window may be outside archive coverage, or the records may still be on Kalshi's live endpoint. Remove one filter at a time and run a small test.

**Why was my timestamp rejected?**

Use a complete ISO 8601 timestamp such as `2026-05-23T12:30:00Z`. The earliest timestamp cannot be later than the latest timestamp.

**Why did a large export stop before the full archive?**

Check the run status and `CHECKPOINT` record. If `nextCursor` is present, provide it as `startCursor` with the same ticker and time filters.

**Why do numeric values have matching Exact fields?**

The numeric fields are convenient for common analytics. Exact fields preserve Kalshi's fixed-point source strings for decimal-safe processing.

### Frequently asked questions

**Does this Actor need a Kalshi API key?**

No. The Kalshi v2 historical-trades endpoint used by this Actor is publicly accessible without a Kalshi login or API key.

**How fast is the scraper?**

It requests up to 1,000 trades per API page and uses no browser. Small exports usually complete quickly; total runtime depends on output size, Kalshi response time, and Apify storage writes.

**Does it include live trades?**

No. This Actor intentionally exports Kalshi's archived historical tape from the v2 endpoint. This creates a clear, reproducible product contract and avoids silently mixing archive and live cutoff behavior.

**Can it export every historical trade?**

You can increase `maxItems` and resume with cursors, but actual availability is controlled by Kalshi's archive and API behavior. Use bounded runs for operational reliability.

**How are duplicate trades handled?**

Within a run, rows are deduplicated by `tradeId`. For multiple runs, use the same ID as the unique key in your destination.

**How does this differ from Kalshi Markets Scraper?**

Kalshi Markets Scraper returns one row per contract with metadata and market state. This Actor returns one row per executed transaction with quantity, prices, sides, and execution time.

### Other prediction-market scrapers and tools

- [Kalshi Markets Scraper](https://apify.com/automation-lab/kalshi-markets-scraper) — contract metadata, status, prices, liquidity, and rules.
- [Kalshi Trader Social Profile Scraper](https://apify.com/automation-lab/kalshi-trader-social-profile-scraper) — public trader profile information.
- [Kalshi Market Trader Leaderboard Scraper](https://apify.com/automation-lab/kalshi-market-trader-leaderboard-scraper) — public market leaderboard data.
- [Polymarket Markets Scraper](https://apify.com/automation-lab/polymarket-markets-scraper) — Polymarket contract and market data.
- [Polymarket Leaderboard Scraper](https://apify.com/automation-lab/polymarket-leaderboard-scraper) — ranked public Polymarket trader data.
- [Polymarket Wallet Portfolio Trade History Scraper](https://apify.com/automation-lab/polymarket-wallet-portfolio-trade-history-scraper) — wallet positions and transaction history.

Combine execution rows with market metadata only when your workflow requires enrichment; keeping the raw trade tape separate makes ETL and schema evolution simpler.

# Actor input Schema

## `ticker` (type: `string`):

Enter one exact Kalshi market ticker, such as KXNBAGAME-26MAY23NYKCLE-NYK. Leave empty to export trades across markets.

## `minCreatedTime` (type: `string`):

Include trades at or after this ISO 8601 timestamp. Leave empty for no lower time bound.

## `maxCreatedTime` (type: `string`):

Include trades at or before this ISO 8601 timestamp. Leave empty for no upper time bound.

## `maxItems` (type: `integer`):

Stop after saving this many unique trade executions. Raise gradually for large backfills.

## `pageSize` (type: `integer`):

Request this many trades per Kalshi API page. Larger pages reduce request overhead.

## `startCursor` (type: `string`):

Paste nextCursor from a previous run's CHECKPOINT record to resume from that Kalshi page. Leave empty for the first page.

## Actor input object example

```json
{
  "ticker": "KXNBAGAME-26MAY23NYKCLE-NYK",
  "minCreatedTime": "2026-05-23T00:00:00Z",
  "maxCreatedTime": "2026-05-24T00:00:00Z",
  "maxItems": 10,
  "pageSize": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Open the normalized Kalshi execution rows in the overview table.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "ticker": "KXNBAGAME-26MAY23NYKCLE-NYK",
    "minCreatedTime": "2026-05-23T00:00:00Z",
    "maxCreatedTime": "2026-05-24T00:00:00Z",
    "maxItems": 10,
    "pageSize": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/kalshi-historical-trades-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "ticker": "KXNBAGAME-26MAY23NYKCLE-NYK",
    "minCreatedTime": "2026-05-23T00:00:00Z",
    "maxCreatedTime": "2026-05-24T00:00:00Z",
    "maxItems": 10,
    "pageSize": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/kalshi-historical-trades-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "ticker": "KXNBAGAME-26MAY23NYKCLE-NYK",
  "minCreatedTime": "2026-05-23T00:00:00Z",
  "maxCreatedTime": "2026-05-24T00:00:00Z",
  "maxItems": 10,
  "pageSize": 10
}' |
apify call automation-lab/kalshi-historical-trades-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/kalshi-historical-trades-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Kalshi Historical Trades Scraper",
        "description": "Export public Kalshi trade executions with exact prices, quantities, timestamps, taker sides, block flags, and resumable cursors. Filter by ticker or time, then download JSON, CSV, or Excel.",
        "version": "0.1",
        "x-build-id": "PLvPB95q09o3Q5HJ3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~kalshi-historical-trades-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-kalshi-historical-trades-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/automation-lab~kalshi-historical-trades-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-kalshi-historical-trades-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/automation-lab~kalshi-historical-trades-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-kalshi-historical-trades-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "ticker": {
                        "title": "🎯 Market ticker",
                        "type": "string",
                        "description": "Enter one exact Kalshi market ticker, such as KXNBAGAME-26MAY23NYKCLE-NYK. Leave empty to export trades across markets."
                    },
                    "minCreatedTime": {
                        "title": "Earliest execution time",
                        "type": "string",
                        "description": "Include trades at or after this ISO 8601 timestamp. Leave empty for no lower time bound."
                    },
                    "maxCreatedTime": {
                        "title": "Latest execution time",
                        "type": "string",
                        "description": "Include trades at or before this ISO 8601 timestamp. Leave empty for no upper time bound."
                    },
                    "maxItems": {
                        "title": "📦 Maximum trades",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Stop after saving this many unique trade executions. Raise gradually for large backfills.",
                        "default": 100
                    },
                    "pageSize": {
                        "title": "Trades per API page",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Request this many trades per Kalshi API page. Larger pages reduce request overhead.",
                        "default": 1000
                    },
                    "startCursor": {
                        "title": "Resume cursor",
                        "type": "string",
                        "description": "Paste nextCursor from a previous run's CHECKPOINT record to resume from that Kalshi page. Leave empty for the first page."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
