Use case: community bot builders
Build a Discord betting bot with live odds
Post odds boards, score updates, and line-move alerts into Discord channels from one API.
Who this is for
Developers running a betting Discord who want the bot to answer odds questions, post the day's board, and fire alerts when a line moves, without screenshotting sportsbook apps.
- Post the day's board from /odds on a schedule
- Answer slash commands with fresh prices
- Attach /scores output to game threads
- Push line-move alerts from the odds-drop stream
The three endpoints this build uses
GET /v1/sports/{sport_key}/oddsThe board your bot formats into channel posts, in the familiar events-and-bookmakers shape.GET /v1/sports/{sport_key}/scoresLive and completed scores for game threads and settlement posts.GET /v1/odds-drop/{sport_key}SSE stream that pushes an event the moment a tracked line moves past your threshold, so alerts fire without polling. Business tier and up.Working code
// Post today's NFL board to a channel webhook. Node 18+, no SDK needed.
const odds = await fetch(
"https://parlay-api.com/v1/sports/americanfootball_nfl/odds?regions=us&markets=h2h",
{ headers: { "X-API-Key": process.env.PARLAY_KEY } },
).then((r) => r.json());
const line = (g) => {
const m = g.bookmakers[0].markets[0];
return g.away_team + " @ " + g.home_team + " " +
m.outcomes.map((o) => o.name + " " + o.price).join(" ");
};
await fetch(process.env.DISCORD_WEBHOOK_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ content: odds.slice(0, 5).map(line).join("\n") }),
});
Which tier fits
A polling bot fits Starter or Pro depending on how many sports it watches. Push updates over WebSocket or SSE, including the odds-drop stream, are Business tier and up, which is where most Discord bots land. Current limits are on the pricing page.
Example repo
Start from parlay-api-js, an open-source starting point for this exact build.
Build links
/answers/odds-api-with-websockets/answers/sports-odds-api/docs