Menu

Track Kalshi Prediction Market Odds in Python (Fed Rate Probabilities, Volume and Price History)
📰

Track Kalshi Prediction Market Odds in Python (Fed Rate Probabilities, Volume and Price History)

DEV Community: datascience·frankxie·3 days ago
#222gaYhn
#devtodatascience#science#devto#dev#markets
Reading 0:00
15s threshold

Prediction markets put a price on questions like "Will the Fed hike in December?" or "How many rate cuts this year?". On Kalshi, a regulated US prediction market, each contract pays $1 if the outcome happens, so a price of $0.70 reads as roughly a 70% chance. If you follow macro news, build forecasting models or just want to see how the market's view changed after a speech or a data release, you want those prices in a table, with a history.

Kalshi has a public market data API, and it's free. The work is in the glue. The API has no text search, so to find "every Fed market" you page through events and their nested markets and filter them yourself. Prices come back as dollar strings in fields like yes_bid_dollars . Price candles need the series ticker as well as the market ticker, and one candle request returns at most 5,000 candles, so longer histories need several windows.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.