Kalshi Market Data Scraper avatar

Kalshi Market Data Scraper

Pricing

from $3.00 / 1,000 market collecteds

Go to Apify Store
Kalshi Market Data Scraper

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

Juyeop Park

Maintained by Community

Actor stats

0

Bookmarked

14

Total users

6

Monthly active users

18 days ago

Last modified

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:

  1. Run the bounded collect-mode example below to verify access and inspect the Dataset.
  2. Prepare an alert-mode input with your own private Slack or Discord webhook.
  3. Run alert mode manually and confirm the webhook and latest_alert_summary output.
  4. 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, and warnings;
  • open the latest_summary key-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-webhook privately 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, and marketsScanned;
  • alertsSent and alertsFailed;
  • breaches[] with marketTicker, marketTitle, field, operator, threshold, and actual;
  • warnings[] for market-fetch or webhook-delivery issues. Discovery and Dataset-write failures are logged but are not currently added to warnings[].

Create a time-based Schedule

Create a Schedule only after the manual alert run succeeds with your private webhook.

  1. In Apify Console, open Schedules and create a new time-based Schedule.
  2. Select this Actor and reuse the alert input you manually validated.
  3. Choose an interval or cron expression appropriate for your monitoring needs and budget.
  4. Keep the webhook private and rotate it immediately if it is exposed.
  5. 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

ParameterTypeDefaultDescription
modestring"collect"collect gathers settled-market data; alert scans active markets for price-condition breaches.
categorystring"Economics"Kalshi market category.
lookbackDaysinteger30Positive lookback window in days. The runtime accepts explicitly larger values.
seriesAllowliststring[]all eligible seriesOptional exact series tickers.
candlestickPeriodIntervalinteger1440Candle interval in minutes: 1, 60, or 1440; collection may auto-degrade it.
maxMarketsinteger25Positive ceiling on persisted collect-mode market rows.
excludeMultivariatebooleantrueSkip mutually exclusive multivariate events.
requestRateLimitRpsnumber4Kalshi request cap from 1 through 10 requests per second.
candlestickConcurrencyinteger1Concurrent candlestick/trade fetches from 1 through 5.
includeTradesbooleanfalseFetch trade-level data in collect mode.
skipFailedMarketsbooleantrueSkip and log failed collect-mode enrichments instead of aborting the run.
logLevelstring"info"debug, info, warn, or error.
totalRuntimeBudgetMsinteger480000Positive collect-mode runtime budget in milliseconds.
degradationThresholdsobject{minuteToHourly: 25, hourlyToDaily: 100}Estimated-market thresholds for candle interval degradation.
generateReportbooleanfalseGenerate HTML and Markdown settlement reports after collection.
exportCsvbooleanfalseExport collected rows as CSV in the key-value store.
webhookUrlstringnoneHTTP(S) webhook required in alert mode. Keep it private.
alertConditionsobject[]noneOne 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, and closeTime;
  • fixed-point dollar strings: settlementValueDollars, lastPriceDollars, bid/ask values, liquidity, and notional value;
  • canonical candlesticks[] and the actual candlestickPeriodInterval used;
  • optional trades[], tradeCount, and includedTrades;
  • 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.

EventPriceCurrent runtime semantics
apify-actor-start$0.00005 per GiB-equivalent start eventPlatform-managed when a run starts. At the 4096 MiB default, four events are approximately $0.0002.
market-collected$0.003Per persisted settled-market row without a non-empty trade collection.
market-with-trades$0.005Per persisted row when trades were requested and tradeCount > 0; otherwise market-collected applies.
report-generated$0.01After a report is generated and stored when generateReport is enabled.
csv-exported$0.005After CSV is generated and stored when exportCsv is enabled.
alert-scan$0.005Once when an alert run finds at least one breach and attempts to write breach rows.
webhook-sent$0.01Once after the aggregate webhook delivery succeeds.

Examples at the current 4096 MiB default:

  • 10 market-collected rows: approximately $0.0302, including Actor start.
  • 10 market-with-trades rows plus one report and one CSV: approximately $0.0652, including Actor start.
  • No-breach alert run: no custom alert-scan or webhook-sent charge; 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.