Sports Betting

The Odds API Setup Guide

Time: 5 minutes | Difficulty: Easy | Market: Sports Betting Mode: Full automation (conditional) | API: REST API (data aggregation) | Docs: the-odds-api.com

This guide wires a sports betting bot to The Odds API using the botwir3 runtime. Configure API credentials, connect to aggregated odds data from multiple sportsbooks, and run automated signal strategies locally.


Before you start

Verify that automated operation is permitted under The Odds API's current terms of service before deploying. botwir3 provides tools for building structured automation. The user is responsible for compliance with the platform's terms and all applicable regulations.

Data source only. The Odds API aggregates odds from multiple sportsbooks. It does not place bets. Bet placement requires a separate sportsbook account — most US sportsbooks require manual execution. The bot uses The Odds API for signal generation, not for order execution.

The Odds API Terms | Last verified: May 2026

What you need

  • A The Odds API account (free tier: 500 requests/month; paid tiers for higher volume)
  • An API key from the dashboard
  • The botwir3 runtime downloaded and unzipped
  • A strategy config file from the builder
  • (Optional) A sportsbook account for manual execution of signals

Step 1: Create API credentials

  1. Sign up at the-odds-api.com
  2. Locate the API Key on the dashboard
  3. Copy the key value

Permissions required: The API key grants read access to odds data. No write/betting permissions exist. Permissions to disable: N/A. The Odds API is read-only.

🔒 Security. The Odds API key grants read-only access to odds data. No betting, account management, or financial operations are possible through this API. The key is stored in a local config file and is not transmitted to botwir3 or any third party.

Step 2: Configure the adapter

Create adapter.json in the bot directory:

{
  "adapter": "odds_api",
  "credentials": {
    "api_key": "paste-api-key-here"
  },
  "sport": "americanfootball_nfl",
  "regions": "us",
  "markets": "h2h,spreads,totals",
  "environment": "live",
  "rate_limit_ms": 60000
}

sport: Sport key from The Odds API. Examples: americanfootball_nfl, basketball_nba, soccer_epl, icehockey_nhl, baseball_mlb. Full list available via the /v4/sports endpoint.

regions: "us", "uk", "eu", "au". Determines which sportsbooks are included.

markets: "h2h" (moneyline), "spreads", "totals" (over/under).

API keys are stored in a local config file on the machine running the bot. They are not transmitted to botwir3 or any third party. botwir3 never sees, stores, or has access to platform credentials.

Step 3: Test the connection

botwir3 test --adapter odds_api

Expected output:

[botwir3] Adapter: odds_api
[botwir3] Connection: OK
[botwir3] Permissions: read-only (odds data)
[botwir3] Rate limit: tier-dependent (free: 500 req/month)

Step 4: Start the bot

botwir3 start --config my-strategy.json

The runtime loads the strategy, computes the spec hash, connects to The Odds API via the local API key, and begins evaluating signals. The gate function compares proposed actions against the configured spec. Signals are logged locally — the bot does not place bets through The Odds API. The user is responsible for executing signals on a sportsbook and verifying outcomes.

Rate limits and considerations

TierLimitPrice
Free500 requests/month$0
Starter10,000 requests/monthPaid
Pro100,000 requests/monthPaid
EnterpriseCustomContact The Odds API

Signal-to-execution gap. The Odds API provides odds data. The bot generates signals (e.g., "value detected on Team X moneyline at +150 on Sportsbook Y"). The user reviews signals and executes manually on the applicable sportsbook. Odds may change between signal generation and manual execution.

Common Odds API bot configurations include cross-sportsbook odds comparison (identifying the sharpest line across books), value betting signal generation (comparing model probabilities against implied odds), and line movement tracking (alerting when odds shift beyond a configured threshold). All actions and decisions are recorded in the local ledger.

Troubleshooting

ErrorCauseFix
CONNECTION_REFUSEDAPI key invalidVerify API key from The Odds API dashboard
RATE_LIMITEDMonthly request limit exceededUpgrade to a paid tier, or increase rate_limit_ms to reduce request frequency
SPORT_NOT_FOUNDInvalid sport keyVerify the sport key via the /v4/sports endpoint
MANDATE_INTEGRITY_VIOLATIONConfig file modified while bot is runningStop the bot, verify config, restart

Related guides


One bot. $129. No subscription. No $749/mo platform. → Build for The Odds API


Build your The Odds API bot

Ready to build?