
Kalshi
- 809 installs
- 201 repo stars
- Updated August 5, 2026
- machina-sports/sports-skills
Kalshi is a sports prediction-market agent skill that queries Kalshi event contracts, markets, trades, and candlestick data via the public API for developers who need CFTC-regulated market prices on sports outcomes.
About
Kalshi is a sports-skills agent integration for the US-regulated Kalshi prediction exchange, exposing events, series, markets, trades, and candlestick OHLC data through a public read API requiring no authentication. It covers football leagues including EPL, UCL, and La Liga, plus basketball, baseball, tennis, NFL, and hockey event contracts. Developers reach for Kalshi when building analytics on market-implied sports probabilities—not actual match scores or statistics, which belong to sport-specific data skills like football-data or nfl-data. Use it for Kalshi-specific markets, CFTC-regulated contracts, or candlestick price history on sports outcomes.
- Public API access to football, basketball, baseball, tennis, NFL and hockey contracts
- CLI commands for search_markets, get_todays_events and get_markets
- Returns series tickers, OHLC history and open status without authentication
Kalshi by the numbers
- 809 all-time installs (skills.sh)
- +13 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #180 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/machina-sports/sports-skills --skill kalshiAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 809 |
|---|---|
| repo stars | ★ 201 |
| Last updated | August 5, 2026 |
| Repository | machina-sports/sports-skills ↗ |
How do you query Kalshi sports prediction market data?
Query Kalshi prediction markets, event contracts, and candlestick data for sports outcomes via public API.
Who is it for?
Developers building sports analytics on Kalshi prediction-market prices, event contracts, and candlestick history via the public API.
Skip if: Developers needing actual match scores, player statistics, or non-Kalshi sports data sources.
When should I use this skill?
The user asks about Kalshi markets, event contracts, CFTC prediction markets, or candlestick price history on sports outcomes.
What you get
Kalshi event listings, market contracts, trade data, and candlestick OHLC price history for sports outcomes.
- market listings
- trade data
- candlestick OHLC history
Files
Kalshi — Prediction Markets
Before writing queries, consult references/api-reference.md for sport codes, series tickers, and command parameters.
Quick Start
Prefer the CLI — it avoids Python import path issues:
sports-skills kalshi search_markets --sport=nba
sports-skills kalshi get_todays_events --sport=nba
sports-skills kalshi get_sports_config
sports-skills kalshi get_markets --series_ticker=KXNBA --status=openPython SDK (alternative):
from sports_skills import kalshi
kalshi.search_markets(sport='nba')
kalshi.search_markets(sport='nba', query='Lakers')
kalshi.get_todays_events(sport='nba')
kalshi.get_sports_config()
kalshi.get_markets(series_ticker="KXNBA", status="open")CRITICAL: Before Any Query
CRITICAL: Before calling any market endpoint, verify:
- The
sportparameter is always passed tosearch_marketsandget_todays_eventsfor single-game markets. - Prices are on a 0-100 integer scale (20 = 20% implied probability) — do not treat as American odds.
status="open"is used when querying markets to exclude settled/closed markets.
Without the sport parameter:
WRONG: search_markets(query="Leeds") → 0 results
RIGHT: search_markets(sport='epl', query='Leeds') → returns all Leeds marketsImportant Notes
- On Kalshi, "Football" = NFL. For football/soccer (EPL, La Liga, etc.), use sport codes:
epl,ucl,laliga,bundesliga,seriea,ligue1,mls,worldcup. - Prices are probabilities. A
last_priceof 20 means 20% implied probability. Scale is 0-100 (not 0-1 like Polymarket). - Always use `status="open"` when querying markets, otherwise results include settled/closed markets.
- Shared interface with Polymarket:
search_markets(sport=...),get_todays_events(sport=...), andget_sports_config()work the same way on both platforms.
Workflows
Sport Market Search (Recommended)
1. search_markets --sport=nba — finds all open NBA markets. 2. Optionally add --query="Lakers" to filter by keyword. 3. Results include yes_bid, no_bid, volume for each market.
Today's Events
1. get_todays_events --sport=nba — open events with nested markets. 2. Present events with prices (price = implied probability, 0-100 scale).
Futures Market Check
1. get_markets --series_ticker=<ticker> --status=open 2. Sort by last_price descending. 3. Present top contenders with probability and volume.
Market Price History
1. Get market ticker from search_markets --sport=nba. 2. get_market_candlesticks --series_ticker=<s> --ticker=<t> --start_ts=<start> --end_ts=<end> --period_interval=60 3. Present OHLC with volume.
Commands
See references/api-reference.md for the full command list with parameters.
| Command | Description |
|---|---|
get_sports_config | Available sport codes and series tickers |
get_todays_events | Today's events for a sport with nested markets |
search_markets | Find markets by sport and/or keyword |
get_markets | Market listing (raw API) |
get_event | Event details |
get_market | Market details |
get_trades | Recent trades |
get_market_candlesticks | OHLC price history |
Examples
Example 1: NBA market search User says: "What NBA markets are on Kalshi?" Actions: 1. Call search_markets(sport='nba') Result: All open NBA markets with yes/no prices and volume
Example 2: EPL game markets User says: "Show me Leeds vs Man City odds on Kalshi" Actions: 1. Call search_markets(sport='epl', query='Leeds') Result: Leeds EPL markets across all EPL series with prices and volume
Example 3: Today's EPL events User says: "What EPL games are available on Kalshi?" Actions: 1. Call get_todays_events(sport='epl') Result: Today's EPL events with nested markets
Example 4: Champions League futures User says: "Who will win the Champions League?" Actions: 1. Call search_markets(sport='ucl') or get_markets(series_ticker="KXUCL", status="open") 2. Sort by last_price descending (price = implied probability) Result: Top UCL contenders with yes_sub_title, last_price (%), and volume
Example 5: Market price history User says: "Show me the price history for this NBA game" Actions: 1. Get market ticker from search_markets(sport='nba') 2. Call get_market_candlesticks(series_ticker="KXNBA", ticker="...", start_ts=..., end_ts=..., period_interval=60) Result: OHLC price data with volume
Commands that DO NOT exist — never call these
- ~~
get_odds~~ — does not exist. Usesearch_marketsorget_marketsto find market prices. - ~~
get_team_schedule~~ — does not exist. Kalshi has markets, not schedules. Use the sport-specific skill for schedules. - ~~
get_scores~~ / ~~get_results~~ — does not exist. Kalshi is a prediction market. Use the sport-specific skill.
If a command is not listed in references/api-reference.md, it does not exist.
Troubleshooting
Error: search_markets returns 0 results Cause: The sport parameter is missing — without it, search only returns high-volume futures and misses single-game markets Solution: Always pass sport='<code>' to search_markets. Check references/api-reference.md for valid sport codes
Error: Markets returned include settled/expired contracts Cause: status parameter is not set Solution: Always pass status="open" to filter to open markets only
Error: Series ticker returns no results Cause: The series ticker may be incorrect or have no open markets Solution: Call get_series_list() to discover available tickers, or check references/series-tickers.md
Error: Football/soccer markets not found when searching "Football" Cause: On Kalshi, "Football" refers to NFL — soccer uses league-specific codes Solution: Use sport='epl', sport='ucl', sport='laliga', etc. for soccer leagues
Kalshi — API Reference
Sport-Aware Commands
| Command | Required | Optional | Description |
|---|---|---|---|
get_sports_config | Available sport codes and series tickers | ||
get_todays_events | sport | limit | Today's events for a sport with nested markets |
search_markets | sport, query, status, limit | Find markets by sport and/or keyword |
Raw API Commands
| Command | Required | Optional | Description |
|---|---|---|---|
get_exchange_status | Exchange trading status | ||
get_exchange_schedule | Operating hours | ||
get_series_list | category, tags | All series (leagues) | |
get_series | series_ticker | Series details | |
get_events | limit, cursor, status, series_ticker, with_nested_markets | Event listing | |
get_event | event_ticker | with_nested_markets | Event details |
get_markets | limit, cursor, event_ticker, series_ticker, status, tickers | Market listing | |
get_market | ticker | Market details | |
get_market_orderbook | ticker | depth | Order book — yes/no bid depth (dollar-string levels) |
get_trades | limit, cursor, ticker, min_ts, max_ts | Recent trades | |
get_market_candlesticks | series_ticker, ticker, start_ts, end_ts, period_interval | OHLC data | |
get_sports_filters | Filter categories |
Sport Codes
US Sports
| Sport | Code | Series Ticker |
|---|---|---|
| NBA | nba | KXNBA |
| NFL | nfl | KXNFL |
| MLB | mlb | KXMLB |
| NHL | nhl | KXNHL |
| WNBA | wnba | KXWNBA |
| College Football | cfb | KXCFB |
| College Basketball | cbb | KXCBB |
Football (Soccer)
| League | Code | Series Tickers |
|---|---|---|
| English Premier League | epl | KXEPLGAME, KXEPLTOTAL, KXEPLBTTS, KXEPLSPREAD, KXEPLGOAL |
| Champions League | ucl | KXUCL, KXUEFAGAME |
| La Liga | laliga | KXLALIGA |
| Bundesliga | bundesliga | KXBUNDESLIGA |
| Serie A | seriea | KXSERIEA |
| Ligue 1 | ligue1 | KXLIGUE1 |
| MLS | mls | KXMLSGAME |
| FIFA World Cup 2026 | worldcup | KXMENWORLDCUP, KXWCGAME, KXWCGROUPQUAL, KXWCGROUPORDER, KXWCSTAGE, KXWCHOSTSTAGE, KXWCBESTHOST, KXWCNOEURSA, KXWCREGIONKO, KXWCEVERYTEAMGOAL |
See references/series-tickers.md for the full series ticker list and references/api.md for raw API documentation.
Price Scale
Kalshi prices are on a 0-100 integer scale:
last_priceof20= 20% implied probabilityyes_bid/no_bid= current bid prices for Yes and No sides- Always use
status="open"to exclude settled/closed markets
Kalshi API
- Base URL:
https://api.elections.kalshi.com/trade-api/v2 - All endpoints are public, read-only. No authentication required.
Valid Commands & Common Mistakes
CRITICAL: Always use the sport parameter
For single-game markets, ALWAYS pass sport='<code>' to search_markets and get_todays_events.
WRONG: search_markets(query="Leeds") → 0 results
RIGHT: search_markets(sport='epl', query='Leeds') → returns all Leeds marketsSport-Aware Commands (recommended)
These use sport codes (nba, nfl, mlb, epl, ucl, etc.) — same interface as Polymarket:
get_sports_config— list all available sport codes and series tickersget_todays_events— today's events for a sport (requiressportparam)search_markets— find markets by sport and keyword (usesportparam for single-game markets)
Raw API Commands
These query the Kalshi API directly using series/event/market tickers:
get_exchange_statusget_exchange_scheduleget_series_listget_seriesget_eventsget_eventget_marketsget_marketget_market_orderbookget_tradesget_market_candlesticksget_sports_filters
Key Usage Patterns
Finding sport markets (MOST COMMON)
# Use the sport parameter — maps to the right series ticker(s) automatically
sports-skills kalshi search_markets --sport=nba
sports-skills kalshi search_markets --sport=nba --query="Lakers"
sports-skills kalshi search_markets --sport=epl --query="Leeds"
sports-skills kalshi get_todays_events --sport=nba
sports-skills kalshi get_todays_events --sport=eplDiscovering sport codes
sports-skills kalshi get_sports_config
# Returns: nba, nfl, mlb, nhl, wnba, cfb, cbb, epl, ucl, laliga, bundesliga, seriea, ligue1, mls, worldcupCommands that DO NOT exist (commonly hallucinated)
- ~~
get_odds~~ / ~~get_probability~~ — market prices ARE the implied probability. Usesearch_marketsorget_todays_events, which returnlast_pricein cents (e.g., 20 = 20% implied probability). - ~~
get_market_odds~~ — usesearch_markets/get_todays_eventsand interpretlast_priceas probability. Note: rawget_market/get_marketspayloads carry dollar-string fields instead (last_price_dollars: "0.2000"), not integer cents. - ~~
get_series_by_sport~~ — useget_sports_config()to see sport codes and series tickers.
Other common mistakes
- Not using the `sport` parameter — without it, you need to know series tickers.
search_markets(sport='nba')automatically resolves toKXNBA.search_markets(sport='epl')resolves to all EPL series. - Searching by team name without `sport` —
search_markets(query="Leeds")returns 0 results. Always includesport='epl'. - Confusing NFL with football on Kalshi — Kalshi's "Football" category = NFL. For football (EPL, UCL, etc.), use
epl,ucl,laliga, etc. - Guessing series or event tickers instead of using
get_sports_config()orget_series_list(). - Forgetting
status="open"when querying raw markets — without it, results include settled/closed markets.
If you're unsure whether a command exists, check this list. Do not try commands that aren't listed above.
Sport Codes & Series Tickers
Sport Codes (use with search_markets, get_todays_events)
US Sports
| Sport | Code | Series Ticker(s) |
|---|---|---|
| NBA | nba | KXNBA |
| NFL | nfl | KXNFL |
| MLB | mlb | KXMLB |
| NHL | nhl | KXNHL |
| WNBA | wnba | KXWNBA |
| College Football | cfb | KXCFB |
| College Basketball | cbb | KXCBB |
Football
| League | Code | Series Ticker(s) |
|---|---|---|
| English Premier League | epl | KXEPLGAME, KXEPLTOTAL, KXEPLBTTS, KXEPLSPREAD, KXEPLGOAL |
| Champions League | ucl | KXUCL, KXUEFAGAME |
| La Liga | laliga | KXLALIGA |
| Bundesliga | bundesliga | KXBUNDESLIGA |
| Serie A | seriea | KXSERIEA |
| Ligue 1 | ligue1 | KXLIGUE1 |
| MLS | mls | KXMLSGAME |
| FIFA World Cup 2026 | worldcup | KXMENWORLDCUP, KXWCGAME, KXWCGROUPQUAL, KXWCGROUPORDER, KXWCSTAGE, KXWCHOSTSTAGE, KXWCBESTHOST, KXWCNOEURSA, KXWCREGIONKO, KXWCEVERYTEAMGOAL |
Use get_sports_config() to see all available codes.
Football leagues have multiple series per league. The sport parameter queries all of them automatically. For example, search_markets(sport='epl') queries KXEPLGAME, KXEPLTOTAL, KXEPLBTTS, KXEPLSPREAD, and KXEPLGOAL in one call.
Other Football Series Tickers (raw API only)
Note: On Kalshi's API, "Football" = American Football (NFL). Football leagues are categorized under "Soccer" in Kalshi's taxonomy.
| League | Series Ticker | Notes |
|---|---|---|
| FA Cup | KXFACUP | Futures |
| Europa League | KXUEL | Futures |
| Conference League | KXUECL | Futures |
Not all football leagues have futures/winner markets. Use get_sports_filters() to discover all available competitions.
#!/bin/bash
# Validates kalshi parameters
COMMAND="${1:-}"
# Ticker format hints
if [[ "$*" == *"--series_ticker="* ]]; then
TICKER=$(echo "$*" | grep -o '\-\-series_ticker=[^ ]*' | cut -d= -f2)
if [[ ! "$TICKER" =~ ^KX ]]; then
echo "WARNING: Kalshi series tickers typically start with 'KX' (e.g., KXNBA, KXNFL). Got: $TICKER"
fi
fi
# Timestamp check for candlesticks
if [[ "$COMMAND" == "get_market_candlesticks" ]]; then
if [[ "$*" != *"--start_ts="* || "$*" != *"--end_ts="* ]]; then
echo "ERROR: get_market_candlesticks requires --start_ts and --end_ts (Unix timestamps)."
exit 1
fi
fi
echo "OK"
Related skills
How it compares
Pick Kalshi for market-implied probabilities and contract prices; use football-data, nfl-data, or other sport skills for actual match results and player statistics.
FAQ
Does Kalshi skill require API authentication?
Kalshi public read endpoints for events, series, markets, trades, and candlestick data require no authentication, though the skill is scoped to Kalshi-specific prediction markets rather than live match statistics.
What sports does the Kalshi skill cover?
Kalshi covers football leagues including EPL, UCL, and La Liga, plus basketball, baseball, tennis, NFL, NHL, and golf event contracts on the US CFTC-regulated Kalshi exchange.