Find Kalshi markets for an NBA game
Kalshi events point at the underlying game through a polymorphic (league_code, competition_id) pair — competition_id is the game's id. Resolve a game with the DSL, then use the code escape hatch to find its Kalshi event and list that event's markets.
1. Resolve the current season
curl -sS --compressed \ -H 'Authorization: Bearer YOUR_API_KEY' \ 'https://api.stat-api.com/api/v1/nba/seasons?limit=200'2. Grab one game
One game gives a valid id to look up on the Kalshi side.
curl -sS --compressed \ -H 'Authorization: Bearer YOUR_API_KEY' \ 'https://api.stat-api.com/api/v1/nba/games?season_id=2025&limit=1'3. Join to Kalshi by (league_code, competition_id), then list markets
competition_id is the game id; league_code disambiguates the polymorphic pointer across sports.
const game = games[0] const events = (await api.kalshi.events.list({ competition_id: game.id, league_code: 'nba' })).events if (events.length === 0) { console.log(`no Kalshi event linked to game ${game.id}`) } else { const event = events[0] console.log(`event: ${event.title}`) const markets = (await api.kalshi.markets.list({ event_id: event.id })).markets console.log('ticker\ttitle\tstatus') for (const m of markets) { console.log(`${m.ticker}\t${m.title}\t${m.status}`) } }