Kalshi Market Data Scraper
Pricing
from $3.00 / 1,000 market collecteds
Kalshi Market Data Scraper
Scrape settled Kalshi prediction markets with candlesticks & trades. Alert mode monitors active markets via Slack/Discord webhooks. Any category, resumable runs, auto-generated reports & CSV exports.
Pricing
from $3.00 / 1,000 market collecteds
Rating
0.0
(0)
Developer
Juyeop Park
Maintained by CommunityActor stats
0
Bookmarked
14
Total users
6
Monthly active users
18 days ago
Last modified
Categories
Share
Collect settled Kalshi market data and set up scheduled price-condition alerts from public Kalshi REST endpoints.
Set up Kalshi price alerts in about 5 minutes
Job to be done: as a trader, research analyst, or monitoring operator, I want a repeatable, scheduled view of selected public Kalshi markets so I can review price-condition breaches without manually checking each market.
Use this safe onboarding path:
- Run the bounded collect-mode example below to verify access and inspect the Dataset.
- Prepare an alert-mode input with your own private Slack or Discord webhook.
- Run alert mode manually and confirm the webhook and
latest_alert_summaryoutput. - Only then create a time-based Apify Schedule using the validated alert input.
This Actor is read-only: it does not authenticate to a Kalshi account, place trades, or execute orders. It is a monitoring and data-collection tool, not investment advice. It does not guarantee outcomes, profits, uninterrupted delivery, or real-time streaming.
Safe bounded first run
Start in collect mode. This input limits discovery to the Economics KXCPI series, daily candles, and at most three persisted market rows. Trades, reports, and CSV export are disabled.
{"mode": "collect","category": "Economics","lookbackDays": 365,"seriesAllowlist": ["KXCPI"],"candlestickPeriodInterval": 1440,"maxMarkets": 3,"excludeMultivariate": true,"requestRateLimitRps": 4,"candlestickConcurrency": 1,"includeTrades": false,"skipFailedMarkets": true,"logLevel": "info","generateReport": false,"exportCsv": false}
After the run:
- open the Dataset and inspect the settled-market rows that were available for the selected scope;
- review fields such as
marketTicker,result,settlementTs,lastPriceDollars,candlestickCount, andwarnings; - open the
latest_summarykey-value-store record for counts, partial-failure information, and runtime-budget status.
A three-market cap is a ceiling, not a promise that three eligible settled markets will always be available.
Configure alert mode
Alert mode scans active markets for explicit price conditions. It requires both a webhook URL and at least one condition.
Do not run this placeholder as-is. Replace
https://example.invalid/replace-with-your-private-webhookprivately in the Apify Console or API before running. Never commit, paste into public documentation, or share a real Slack or Discord webhook URL. Treat webhook URLs and signing values as secrets.
{"mode": "alert","category": "Economics","lookbackDays": 365,"seriesAllowlist": ["KXCPI"],"candlestickPeriodInterval": 1440,"excludeMultivariate": true,"requestRateLimitRps": 4,"candlestickConcurrency": 1,"includeTrades": false,"skipFailedMarkets": true,"logLevel": "info","generateReport": false,"exportCsv": false,"webhookUrl": "https://example.invalid/replace-with-your-private-webhook","alertConditions": [{"tickerPattern": "KXCPI*","field": "lastPrice","operator": "above","thresholdDollars": "0.75"}]}
Supported condition fields are lastPrice, yesAsk, and yesBid. Operators are above and below. A ticker pattern may be exact, *, or a prefix ending in * such as KXCPI*.
The current runtime aggregates all breaches from one run into one webhook delivery attempt. It writes one Dataset row per breached condition when storage is available.
Alert Dataset row
A breach row uses fields grounded in the current runtime:
{"marketTicker": "KXCPI-EXAMPLE","marketTitle": "Example CPI market","field": "lastPrice","operator": "above","thresholdDollars": "0.75","actualValue": "0.78","tickerPattern": "KXCPI*","scannedAt": "2026-07-14T00:00:00.000Z"}
The values above illustrate the output shape; they are not a live market quote or a prediction.
Alert summary
The latest_alert_summary key-value-store record contains:
mode,category,seriesScanned,eventsScanned, andmarketsScanned;alertsSentandalertsFailed;breaches[]withmarketTicker,marketTitle,field,operator,threshold, andactual;warnings[]for market-fetch or webhook-delivery issues. Discovery and Dataset-write failures are logged but are not currently added towarnings[].
Create a time-based Schedule
Create a Schedule only after the manual alert run succeeds with your private webhook.
- In Apify Console, open Schedules and create a new time-based Schedule.
- Select this Actor and reuse the alert input you manually validated.
- Choose an interval or cron expression appropriate for your monitoring needs and budget.
- Keep the webhook private and rotate it immediately if it is exposed.
- Review run status,
latest_alert_summary, Dataset breach rows, logs, and charged events after scheduled runs.
Suggested intervals are operational examples, not guarantees. More frequent polling increases Actor-start charges and may increase custom event charges when breaches and successful webhook deliveries occur. This is scheduled polling, not success-triggered chaining and not real-time streaming.
Features
- Any category — Economics, Politics, or any valid Kalshi category string
- Configurable lookback — no upper limit on
lookbackDays - Series allowlist — scan all eligible series in a category or narrow the scope explicitly
- Candlestick data — 1-minute, hourly, or daily intervals with auto-degradation for larger runs
- Trade-level data — optional per-market history via
includeTrades - Price-condition alerts — active-market checks for last price, yes ask, or yes bid
- Slack, Discord, or generic webhooks — one aggregate delivery attempt when breaches exist
- Partial failure handling — failed market enrichments can be skipped and logged
- Budget-aware collection — partial summaries when the runtime budget is exceeded
- Resumable collection — persisted state avoids duplicating completed market rows
- Structured JSON logging — configurable debug, info, warn, or error level
- Public REST only — no Kalshi authentication required
Input reference
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | string | "collect" | collect gathers settled-market data; alert scans active markets for price-condition breaches. |
category | string | "Economics" | Kalshi market category. |
lookbackDays | integer | 30 | Positive lookback window in days. The runtime accepts explicitly larger values. |
seriesAllowlist | string[] | all eligible series | Optional exact series tickers. |
candlestickPeriodInterval | integer | 1440 | Candle interval in minutes: 1, 60, or 1440; collection may auto-degrade it. |
maxMarkets | integer | 25 | Positive ceiling on persisted collect-mode market rows. |
excludeMultivariate | boolean | true | Skip mutually exclusive multivariate events. |
requestRateLimitRps | number | 4 | Kalshi request cap from 1 through 10 requests per second. |
candlestickConcurrency | integer | 1 | Concurrent candlestick/trade fetches from 1 through 5. |
includeTrades | boolean | false | Fetch trade-level data in collect mode. |
skipFailedMarkets | boolean | true | Skip and log failed collect-mode enrichments instead of aborting the run. |
logLevel | string | "info" | debug, info, warn, or error. |
totalRuntimeBudgetMs | integer | 480000 | Positive collect-mode runtime budget in milliseconds. |
degradationThresholds | object | {minuteToHourly: 25, hourlyToDaily: 100} | Estimated-market thresholds for candle interval degradation. |
generateReport | boolean | false | Generate HTML and Markdown settlement reports after collection. |
exportCsv | boolean | false | Export collected rows as CSV in the key-value store. |
webhookUrl | string | none | HTTP(S) webhook required in alert mode. Keep it private. |
alertConditions | object[] | none | One or more alert conditions required in alert mode. |
Collect-mode output
Each Dataset row represents one settled market and can include:
- identifiers:
runId,seriesTicker,eventTicker,marketTicker, and titles; - partition and time fields:
sourcePartition,settlementTs,openTime, andcloseTime; - fixed-point dollar strings:
settlementValueDollars,lastPriceDollars, bid/ask values, liquidity, and notional value; - canonical
candlesticks[]and the actualcandlestickPeriodIntervalused; - optional
trades[],tradeCount, andincludedTrades; warnings[]for per-market diagnostics.
The latest_summary record includes processed tickers, row counts, the live/historical cutoff, degradation decisions, budgetExceeded, failure counts, skipped tickers, warnings, and runtime metrics.
Pay-per-event pricing
Charges depend on the configured memory and the events actually charged by Apify. The current default is 4096 MiB, which produces four platform-managed Actor-start events.
| Event | Price | Current runtime semantics |
|---|---|---|
apify-actor-start | $0.00005 per GiB-equivalent start event | Platform-managed when a run starts. At the 4096 MiB default, four events are approximately $0.0002. |
market-collected | $0.003 | Per persisted settled-market row without a non-empty trade collection. |
market-with-trades | $0.005 | Per persisted row when trades were requested and tradeCount > 0; otherwise market-collected applies. |
report-generated | $0.01 | After a report is generated and stored when generateReport is enabled. |
csv-exported | $0.005 | After CSV is generated and stored when exportCsv is enabled. |
alert-scan | $0.005 | Once when an alert run finds at least one breach and attempts to write breach rows. |
webhook-sent | $0.01 | Once after the aggregate webhook delivery succeeds. |
Examples at the current 4096 MiB default:
- 10
market-collectedrows: approximately $0.0302, including Actor start. - 10
market-with-tradesrows plus one report and one CSV: approximately $0.0652, including Actor start. - No-breach alert run: no custom
alert-scanorwebhook-sentcharge; the platform-managed Actor-start charge may still apply, approximately $0.0002 at the default memory. - One breach scan plus a successful webhook delivery: approximately $0.0152, including Actor start.
Failed operations or empty results may still incur the platform-managed Actor-start charge. Persisted rows and successful optional outputs can incur their corresponding custom event charges before a later operation fails. Estimates vary with memory and actual charged events; inspect each run's charged-event counters for the canonical total.
Operational notes
- Final collect-mode inclusion uses
market.settlement_ts, not event close time. - Live and historical candlestick payloads use different fields; the Actor normalizes them while preserving fixed-point dollar strings.
- Deprecated cent-denominated market fields are not used.
- Near the live/historical cutoff, duplicate market records are resolved using data-completeness scoring.
- Candlestick intervals can degrade from 1 minute to hourly to daily based on estimated market count and configured thresholds.
- Kalshi API availability, market availability, webhook providers, and Apify scheduling can change independently; monitor logs and summaries and design downstream handling for partial or failed runs.