Kalshi APIkalshi.com ↗
Retrieve market-implied WTI crude oil and gold price probability ladders from Kalshi's prediction markets. Two endpoints covering strike prices, probabilities, and settlement data.
What is the Kalshi API?
This API provides two endpoints that expose Kalshi's prediction market data for WTI crude oil and gold prices. get_wti_50_percent_price returns the market-implied WTI price at which traders assign 50% probability of settlement above that level, along with a full sorted strike-probability ladder. get_gold_probability_ladder returns the complete bid/ask/midpoint probability ladder for Kalshi's weekly KXGOLDW gold market, including settlement values when finalized.
curl -X GET 'https://api.parse.bot/scraper/ebca51e7-af00-4b54-8f4c-c85d3ac8a3cc/get_wti_50_percent_price?target_date=2026-08-28' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace kalshi-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Kalshi commodity forecasts — WTI oil and gold probability ladders."""
from parse_apis.kalshi_com_api import Kalshi, InputFormatInvalid
client = Kalshi()
# Fetch today's WTI oil 50% forecast price
try:
forecast = client.forecasts.get(target_date="2026-08-28")
except InputFormatInvalid:
print("Invalid date format — use YYYY-MM-DD for a valid trading day.")
raise
print(f"WTI target date: {forecast.target_date}")
print(f"Forecast price (50%): ${forecast.forecast_price_50:.2f}")
print(f"Method: {forecast.calculation_method}")
print(f"Source status: {forecast.source_status}")
# Inspect the bracketing strikes used for interpolation
if forecast.lower_bracket is not None:
print(f"Lower bracket: ${forecast.lower_bracket.strike} @ {forecast.lower_bracket.probability:.0%}")
if forecast.upper_bracket is not None:
print(f"Upper bracket: ${forecast.upper_bracket.strike} @ {forecast.upper_bracket.probability:.0%}")
# Fetch gold probability ladder for the same date
gold = client.gold_ladders.get(target_date=forecast.target_date)
print(f"\nGold event: {gold.title}")
print(f"Gold source status: {gold.source_status}")
if gold.interpolated_prices is not None:
print(f"Gold p50 price: ${gold.interpolated_prices.p50:.2f}")
if gold.settlement_source is not None:
print(f"Settlement source: {gold.settlement_source.name}")
# Show first few strikes from the gold ladder
for strike in gold.strikes[:3]:
print(f" ${strike.strike:.2f} — mid prob {strike.midpoint_probability:.1%}, vol {strike.volume}")
if gold.monotonicity_violations is not None:
print(f"Monotonicity violations: {len(gold.monotonicity_violations)}")
print("\nexercised: forecasts.get / gold_ladders.get")
Finds the KXWTI daily event for the given target_date, fetches all 'Above $X' strike markets with their current implied Yes probabilities (from live market prices in cents), sorts by strike, and computes the price where P(WTI above price) = 50%. If no strike is exactly at 50%, linearly interpolates between the two nearest bracketing strikes (one above 50% and one below). Returns no_market status when no event exists for the date, or no_bracket when probabilities don't cross 50%. Makes two API calls: one to locate the dated event, one to fetch market cards. Prices update in near-real-time during market hours.
| Param | Type | Description |
|---|---|---|
| target_daterequired | string | The WTI settlement/observation date to look up, in ISO format YYYY-MM-DD (e.g. 2026-08-28). Must correspond to a trading day with a KXWTI daily event. |
{
"type": "object",
"fields": {
"as_of": "string — UTC timestamp when data was fetched",
"strikes": "array of {strike, probability} objects sorted by strike ascending",
"event_title": "string or null — event display title",
"source_urls": "array of public Kalshi page URLs for this event",
"target_date": "string — the requested observation date",
"event_ticker": "string or null — Kalshi event ticker (e.g. KXWTI-26AUG2814)",
"total_volume": "integer or null — total event trading volume in dollars",
"lower_bracket": "object or null — strike and probability just above 50%",
"source_status": "string — 'ok', 'no_market', or 'no_bracket'",
"upper_bracket": "object or null — strike and probability just below 50%",
"market_timestamp": "string or null — market close time (ISO 8601)",
"forecast_price_50": "number or null — interpolated WTI price where P(above) = 50%",
"calculation_method": "string or null — 'exact' or 'interpolated'"
},
"sample": {
"data": {
"as_of": "2026-08-28T15:01:45Z",
"strikes": [
{
"strike": 74.49,
"probability": 0.99
},
{
"strike": 82.49,
"probability": 0.75
},
{
"strike": 82.99,
"probability": 0.47
},
{
"strike": 88.99,
"probability": 0.01
}
],
"event_title": "Oil Price (WTI) today?",
"source_urls": [
"https://kalshi.com/markets/kxwti/wti-oil-on-day/kxwti-26aug2814"
],
"target_date": "2026-08-28",
"event_ticker": "KXWTI-26AUG2814",
"total_volume": 186142,
"lower_bracket": {
"strike": 82.49,
"probability": 0.75
},
"source_status": "ok",
"upper_bracket": {
"strike": 82.99,
"probability": 0.47
},
"market_timestamp": "2026-08-28T18:30:00Z",
"forecast_price_50": 82.9364,
"calculation_method": "interpolated"
},
"status": "success"
}
}About the Kalshi API
WTI Oil 50% Price Endpoint
get_wti_50_percent_price accepts a target_date in ISO format (YYYY-MM-DD) and returns the interpolated WTI price where the market-implied probability of settling above that price equals 50%. The response includes a strikes array of {strike, probability} objects sorted ascending, lower_bracket and upper_bracket objects identifying the two strikes that straddle 50%, and total_volume in dollars. The source_status field signals one of three states: ok, no_market (no KXWTI event found for that date), or no_bracket (strikes exist but none bracket 50%). The event_ticker field (e.g. KXWTI-26AUG2814) and source_urls array let you cross-reference directly on Kalshi.
Gold Probability Ladder Endpoint
get_gold_probability_ladder accepts a target_date and an optional as_of ISO-8601 timestamp for historical snapshot reconstruction. It returns the full ladder for Kalshi's KXGOLDW weekly market, where each entry in strikes includes strike, yes_bid (cents), yes_ask (cents), and midpoint_probability (0–1). When a market has settled, expiration_value carries the final Pyth XAU/USD price and settlement_source provides {name, url} identifying the settlement data source. The source_status field returns ok, no_market, no_historical_quote, or no_bracket.
Data Coverage and Dates
Both endpoints are tied to specific Kalshi event schedules. WTI events follow daily KXWTI series; gold events follow weekly KXGOLDW series with a 5:00 PM America/New_York observation time. Passing a date with no corresponding Kalshi event returns source_status: no_market rather than an error, so callers should check that field before consuming strike data. Volume figures are denominated in dollars for WTI and in contracts for gold.
The Kalshi API is a managed, monitored endpoint for kalshi.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when kalshi.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official kalshi.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build an energy trading dashboard that shows the current market consensus WTI price via the
lower_bracketandupper_bracketinterpolation - Track how the 50% WTI probability price shifts day-over-day by calling
get_wti_50_percent_pricewith consecutivetarget_datevalues - Display a full gold price probability distribution for a given week using the
strikesladder fromget_gold_probability_ladder - Back-test prediction market accuracy by comparing historical
expiration_valueagainst pre-settlementmidpoint_probabilityladders using theas_ofparameter - Alert when the gold market's midpoint probability for a specific strike crosses a threshold by polling the
strikesarray - Embed Kalshi settlement source attribution in a research tool using
settlement_source.nameandsettlement_source.url
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Kalshi have an official developer API?+
What does `source_status` tell me, and when should I treat a response as unusable?+
source_status returns one of a fixed set of strings: ok means a full bracket was found and the 50% interpolation (or full ladder) is valid. no_market means no Kalshi event exists for the requested target_date. no_bracket means strikes are present but none straddle the 50% threshold. no_historical_quote (gold only) means the as_of timestamp predates available data. Any value other than ok means the primary derived data — the 50% price or the full ladder — is not populated and should not be used in calculations.Does the API cover commodities other than WTI crude oil and gold?+
How fresh is the data returned by these endpoints?+
as_of UTC timestamp indicating when the snapshot was taken. For live markets this reflects near-real-time Kalshi market prices. For settled markets the expiration_value is final and will not change, but the as_of field still reflects the fetch time rather than the settlement time.Can I retrieve historical probability ladders for past dates?+
get_gold_probability_ladder accepts an optional as_of ISO-8601 timestamp parameter for historical reconstruction; if the timestamp predates available data, source_status returns no_historical_quote. get_wti_50_percent_price does not expose an equivalent as_of parameter. You can fork this API on Parse and revise it to add historical snapshot support to the WTI endpoint.