### Starting Pitcher Statistics Example Source: https://developer.opticodds.com/docs/baseball-statistics-api-guide Comprehensive statistics for a starting pitcher, including innings pitched, strikeouts, earned runs, and win/loss records. ```json { "innings_pitched": 7.0, "pitches_thrown": 103, "strikes_thrown": 71, "hits_allowed": 5, "runs_allowed": 3, "earned_runs": 3, "walks_allowed": 2, "strikeouts": 11, "home_runs_allowed": 1, "win": true, "loss": false, "quality_start": true, "era": 3.86, "whip": 1.00, "k_per_9": 14.14, "k_bb_ratio": 5.50, "first_pitch_strike_pct": 0.652, "swinging_strike_pct": 0.142, "ground_ball_pct": 0.46 } ``` -------------------------------- ### Retrieve Premier League Fixtures with Starting Lineups Source: https://developer.opticodds.com/reference/get_fixtures Example showing how to include starting lineups when fetching Premier League fixtures. This data structure details players, their teams, positions, and substitute status. ```json { "player_team": "B196AD1A3F37", "player_position": "Defender", "player_batting_throwing": null, "is_substitute": true } ], "away": [ { "player_id": "09B88A678664", "player_name": "Josko Gvardiol", "player_team": "E69E55FFCF65", "player_position": "Defender", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "EA4D80C8FC25", "player_name": "James McAtee", "player_team": "E69E55FFCF65", "player_position": "Midfielder", "player_batting_throwing": null, "is_substitute": true }, { "player_id": "2B50A04D5070", "player_name": "Erling Haaland", "player_team": "E69E55FFCF65", "player_position": "Striker", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "86B3DA879430", "player_name": "Nico O'Reilly", "player_team": "E69E55FFCF65", "player_position": "Midfielder", "player_batting_throwing": null, "is_substitute": true }, { "player_id": "8DC3E428678D", "player_name": "Ederson Santana de Moraes", "player_team": "E69E55FFCF65", "player_position": "Goalkeeper", "player_batting_throwing": null, "is_substitute": true }, { "player_id": "C2FD13302F40", "player_name": "Rico Lewis", "player_team": "E69E55FFCF65", "player_position": "Defender", "player_batting_throwing": null, "is_substitute": true }, { "player_id": "B228F3B78AB8", "player_name": "Divin Mubama", "player_team": "E69E55FFCF65", "player_position": "Forward", "player_batting_throwing": null, "is_substitute": true }, { "player_id": "707CF25C026E", "player_name": "Jahmai Simpson-Pusey", "player_team": "E69E55FFCF65", "player_position": "Defender", "player_batting_throwing": null, "is_substitute": true }, { "player_id": "0D04E9354F3A", "player_name": "Jérémy Doku", "player_team": "E69E55FFCF65", "player_position": "Forward", "player_batting_throwing": null, "is_substitute": true }, { "player_id": "D7EFAD0AF086", "player_name": "Jack Grealish", "player_team": "E69E55FFCF65", "player_position": "Midfielder", "player_batting_throwing": null, "is_substitute": true }, { "player_id": "D61528068B02", "player_name": "Bernardo Mota Veiga de Carvalho e Silva", "player_team": "E69E55FFCF65", "player_position": "Midfielder", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "05B68FAE4FA7", "player_name": "Stefan Ortega", "player_team": "E69E55FFCF65", "player_position": "Goalkeeper", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "DED35E68CB9A", "player_name": "Kevin De Bruyne", "player_team": "E69E55FFCF65", "player_position": "Midfielder", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "57B58DC16ED3", "player_name": "Manuel Akanji", "player_team": "E69E55FFCF65", "player_position": "Defender", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "80DDFDD0F42C", "player_name": "Nathan Aké", "player_team": "E69E55FFCF65", "player_position": "Defender", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "CC8B0B423257", "player_name": "Matheus Luiz Nunes", "player_team": "E69E55FFCF65", "player_position": "Defender", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "6ADE78E9AE42", "player_name": "Mateo Kovacic", "player_team": "E69E55FFCF65", "player_position": "Midfielder", "player_batting_throwing": null, "is_substitute": false } ``` -------------------------------- ### Start RabbitMQ Queue Response Source: https://developer.opticodds.com/docs/data-ingestion Example JSON response when starting a RabbitMQ queue. This response contains the queue name and other details necessary for connecting. ```json { "data": [ { "id": 3, "queue_name": "AAAAAAA_2_cop_4HOEXAMPLEQUEUE", "enabled": true, "is_live": false, "odds_format": "AMERICAN", "num_consumers": null, "num_messages": null, "messages_per_second": null } ] } ``` -------------------------------- ### Example API Request and Response Source: https://developer.opticodds.com/reference/get_grader-odds This example demonstrates how to call the API to get the graded result of a bet and shows the structure of a successful JSON response. ```json { "data": { "fixture_id": "B848DE682885", "away_team_display": "Tracy Cortez", "home_team_display": "Rose Namajunas", "status": "Completed", "away_score": 0, "home_score": 1, "player_score": null, "market": "Total Rounds", "name": "Under 2.5", "result": "Lost" } } ``` -------------------------------- ### Python RabbitMQ Consumer Example Source: https://developer.opticodds.com/changelog/integration-guide-rabbitmq-launch Sample Python code to connect to RabbitMQ and consume messages. Ensure you have the `pika` library installed (`pip install pika`). ```python import pika import json # RabbitMQ connection details rabbitmq_host = 'localhost' rabbitmq_port = 5672 rabbitmq_queue = 'odds_queue' def connect_and_consume(): try: connection = pika.BlockingConnection(pika.ConnectionParameters(host=rabbitmq_host, port=rabbitmq_port)) channel = connection.channel() channel.queue_declare(queue=rabbitmq_queue, durable=True) print(' [*] Waiting for messages. To exit press CTRL+C') def callback(ch, method, properties, body): try: message_data = json.loads(body) print(f" [x] Received: {message_data}") # Process the message data here ch.basic_ack(delivery_tag=method.delivery_tag) except json.JSONDecodeError: print(f" [!] Invalid JSON received: {body}") ch.basic_nack(delivery_tag=method.delivery_tag, requeue=False) # Discard invalid JSON except Exception as e: print(f" [!] Error processing message: {e}") ch.basic_nack(delivery_tag=method.delivery_tag, requeue=True) # Requeue on other errors channel.basic_qos(prefetch_count=1) # Process one message at a time channel.basic_consume(queue=rabbitmq_queue, on_message_callback=callback) channel.start_consuming() except pika.exceptions.AMQPConnectionError as e: print(f" [!] Failed to connect to RabbitMQ: {e}") except KeyboardInterrupt: print(" [*] Exiting consumer.") if 'connection' in locals() and connection.is_open: connection.close() except Exception as e: print(f" [!] An unexpected error occurred: {e}") if 'connection' in locals() and connection.is_open: connection.close() if __name__ == '__main__': connect_and_consume() ``` -------------------------------- ### Premier League Fixture Data with Starting Lineups Source: https://developer.opticodds.com/reference/get_fixtures Example of fixture data for the England Premier League, including starting lineups when `include_starting_lineups` is set to True. This data structure details player information, team, position, and substitute status. ```json { "player_id": "8DE8D5F805D2", "player_name": "Diogo José Teixeira da Silva", "player_team": "F799E43513D4", "player_position": "Forward", "player_batting_throwing": null, "is_substitute": true }, { "player_id": "7A593AE11ADF", "player_name": "Ibrahima Konaté", "player_team": "F799E43513D4", "player_position": "Defender", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "F014B24C4A77", "player_name": "Virgil van Dijk", "player_team": "F799E43513D4", "player_position": "Defender", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "702FFC8CD4AC", "player_name": "Ryan Gravenberch", "player_team": "F799E43513D4", "player_position": "Midfielder", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "058B4D2BD48F", "player_name": "Kostas Tsimikas", "player_team": "F799E43513D4", "player_position": "Defender", "player_batting_throwing": null, "is_substitute": true }, { "player_id": "5F851E5AA267", "player_name": "Alisson Ramsés Becker", "player_team": "F799E43513D4", "player_position": "Goalkeeper", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "D435ACADAD13", "player_name": "Cody Gakpo", "player_team": "F799E43513D4", "player_position": "Midfielder", "player_batting_throwing": null, "is_substitute": false } ] ``` -------------------------------- ### Full Configuration with Local MCP Server Source: https://developer.opticodds.com/docs/opticodds-mcp-integration-guide Example of a complete Claude Desktop configuration file including preferences and the local OpticOdds MCP server setup via `npx`. Replace 'your-api-key' with your actual OpticOdds API key. ```json { "preferences": { "coworkWebSearchEnabled": true, "coworkScheduledTasksEnabled": true, "ccdScheduledTasksEnabled": true, "sidebarMode": "chat" }, "mcpServers": { "opticodds": { "command": "npx", "args": ["-y", "opticodds-mcp"], "env": { "OPTICODDS_API_KEY": "your-api-key" } } } } ``` -------------------------------- ### Python RabbitMQ Consumer Example Source: https://developer.opticodds.com/docs/getting-started Connect to RabbitMQ using individual connection parameters and consume messages with a callback function. Ensure the 'pika' library is installed. Replace placeholders with your actual username and password. ```python import pika # pip install pika # Use the Full URL # connection = pika.BlockingConnection(pika.URLParameters(f"amqp://{}:{}@copilot-rmq.opticodds.com:5672/api")) # Use the individual params connection = pika.BlockingConnection( pika.ConnectionParameters( host='v3-rmq.opticodds.com', port=5672, virtual_host='api', credentials=pika.PlainCredentials('', '') ) ) # Callback function that contains the messages. def callback(ch, method, properties, body): print("Received message: %r" % body) print("Connected to RabbitMQ") channel = connection.channel() channel.basic_qos(prefetch_count=100) # Consume messages channel.basic_consume(queue=queue, on_message_callback=callback, auto_ack=True) channel.start_consuming() ``` -------------------------------- ### Get NFL Teams Source: https://developer.opticodds.com/reference/get_teams This example demonstrates how to fetch a list of teams for the NFL league. Ensure you have the correct league identifier. ```json { "data": [ { "id": "AF456B375E7E", "name": "Arizona Cardinals", "numerical_id": null, "is_active": true, "city": "Arizona", "mascot": "Cardinals", "nickname": "Cardinals", "abbreviation": "ARI", "division": "West", "conference": "NFC", "base_id": 81, "logo": "https://cdn.opticodds.com/team-logos/football/81.png", "source_ids": { }, "sport": { "id": "football", "name": "Football", "numerical_id": 9 }, "league": { "id": "nfl", "name": "NFL", "numerical_id": 367 } }, { "id": "348C1EE88C42", "name": "Atlanta Falcons", "numerical_id": null, "is_active": true, "city": "Atlanta", "mascot": "Falcons", "nickname": "Falcons", "abbreviation": "ATL", "division": "South", "conference": "NFC", "base_id": 82, "logo": "https://cdn.opticodds.com/team-logos/football/82.png", "source_ids": { }, "sport": { "id": "football", "name": "Football", "numerical_id": 9 }, "league": { "id": "nfl", "name": "NFL", "numerical_id": 367 } }, { "id": "766A226BC204", "name": "Baltimore Ravens", "numerical_id": null, "is_active": true, "city": "Baltimore", "mascot": "Ravens", "nickname": "Ravens", "abbreviation": "BAL", "division": "North", "conference": "AFC", "base_id": 83, "logo": "https://cdn.opticodds.com/team-logos/football/83.png", "source_ids": { }, "sport": { "id": "football", "name": "Football", "numerical_id": 9 }, "league": { "id": "nfl", "name": "NFL", "numerical_id": 367 } }, ... ] } ``` -------------------------------- ### Python Multi-Stream Architecture with Threading Source: https://developer.opticodds.com/docs/sse-streaming Launch multiple SSE streams concurrently using Python's threading module. This example demonstrates starting background threads for different sports and leagues, ensuring the main thread remains alive. ```python import threading def start_stream(sport, sportsbooks, leagues): """Start a stream in a background thread.""" thread = threading.Thread( target=stream_odds, args=(sport, sportsbooks), kwargs={"leagues": leagues, "on_odds": handle_odds_event, "on_locked": handle_locked_event}, daemon=True, ) thread.start() return thread # Launch multiple streams threads = [ start_stream("basketball", ["DraftKings", "BetMGM", "Betano"], ["NBA", "NCAAB"]), start_stream("football", ["DraftKings", "BetMGM", "Betano"], ["NFL"]), start_stream("politics", ["Kalshi", "Polymarket"], None), ] # Keep main thread alive for t in threads: t.join() ``` -------------------------------- ### Fixture Metadata Example Source: https://developer.opticodds.com/docs/statistics-api-guide This JSON snippet shows the fixture metadata available for a match. It includes details such as the match ID, start date, status, and venue information. ```json { "fixture": { "id": "202511295169F9DF", "game_id": "31803-20560-2025-11-29", "start_date": "2025-11-29T15:00:00Z", "status": "completed", "season_type": "Regular Season", "season_year": "2025", "season_week": "13", "venue_name": "Brentford Community Stadium", "venue_location": "London, England", "venue_neutral": false } } ``` -------------------------------- ### Get England Premier League Fixtures with Starting Lineups Source: https://developer.opticodds.com/reference/get_fixtures This JSON output shows fixture data for the England Premier League, including details like team names, scores, and venue. The `include_starting_lineups=True` parameter is implied by the presence of lineup data. ```json { "data": [ { "id": "england_-_premier_league:0DB083EFBDA2", "numerical_id": 22406, "game_id": "36989-17608-2025-01-14", "start_date": "2025-01-14T19:30:00Z", "home_competitors": [ { "id": "957C00F85D81", "name": "West Ham United FC", "numerical_id": null, "abbreviation": "WHU", "logo": "https://cdn.opticodds.com/team-logos/soccer/4514.png" } ], "away_competitors": [ { "id": "D6AD821C3B5E", "name": "Fulham FC", "numerical_id": null, "abbreviation": "FUL", "logo": "https://cdn.opticodds.com/team-logos/soccer/4119.png" } ], "home_team_display": "West Ham United FC", "away_team_display": "Fulham FC", "status": "completed", "is_live": false, "sport": { "id": "soccer", "name": "Soccer", "numerical_id": 21 }, "league": { "id": "england_-_premier_league", "name": "England - Premier League", "numerical_id": 21 }, "home_starter": null, "home_record": null, "home_seed": null, "home_rotation_number": null, "away_starter": null, "away_record": null, "away_seed": null, "away_rotation_number": null, "tournament": null, "tournament_stage": null, "has_odds": true, "venue_name": "London Stadium", "venue_location": "London, England", "venue_neutral": false, "broadcast": null, "result": { "scores": { "home": { "total": 3, "periods": { "period_1": 2, "period_2": 1 }, "aggregate": null }, "away": { "total": 2, "periods": { "period_1": 0, "period_2": 2 }, "aggregate": null } }, "in_play_data": { "period": "0", "clock": null, "last_play": null } }, "lineups": { "home": [], "away": [] }, "season_type": "Regular Season", "season_year": "2024", "season_week": "21", "weather": null, "weather_temp": null, "source_ids": { } }, { "id": "england_-_premier_league:D341BDF76826", "numerical_id": 22407, "game_id": "31803-35511-2025-01-14", "start_date": "2025-01-14T19:30:00Z", "home_competitors": [ { "id": "B196AD1A3F37", "name": "Brentford FC", "numerical_id": null, "abbreviation": "BRE", "logo": "https://cdn.opticodds.com/team-logos/soccer/3968.png" } ], "away_competitors": [ { "id": "E69E55FFCF65", "name": "Manchester City FC", "numerical_id": null, "abbreviation": "MCI", "logo": "https://cdn.opticodds.com/team-logos/soccer/3791.png" } ], "home_team_display": "Brentford FC", "away_team_display": "Manchester City FC", "status": "completed", "is_live": false, "sport": { "id": "soccer", "name": "Soccer", "numerical_id": 21 }, "league": { "id": "england_-_premier_league", "name": "England - Premier League", "numerical_id": 21 }, "home_starter": null, "home_record": null, "home_seed": null, "home_rotation_number": null, "away_starter": null, "away_record": null, "away_seed": null, "away_rotation_number": null, "tournament": null, "tournament_stage": null, "has_odds": true, "venue_name": "Brentford Community Stadium", "venue_location": "London, England", "venue_neutral": false, "broadcast": null, "result": { "scores": { "home": { "total": 2, "periods": { "period_1": 0, "period_2": 2 }, "aggregate": null }, "away": { "total": 2, "periods": { "period_1": 0, "period_2": 2 }, "aggregate": null } }, "in_play_data": { "period": "0", "clock": null, "last_play": null } }, "lineups": { "home": [ { "player_id": "BEF625B56495", "player_name": "Yoane Wissa", "player_team": "B196AD1A3F37", "player_position": "Striker", "player_batting_throwing": null, "is_substitute": false }, { "player_id": "806A90D93750", "player_name": "Paris Maghoma", "player_team": "B196AD1A3F37", "player_position": "Midfielder", "player_batting_throwing": null, "is_substitute": false } ], "away": [] }, "season_type": "Regular Season", "season_year": "2024", "season_week": "21", "weather": null, "weather_temp": null, "source_ids": { } } ] } ``` -------------------------------- ### Start Scores Queue Source: https://developer.opticodds.com/docs/getting-started-1 Use this command to start the scores queue for receiving live fixture results. Ensure your consumer remains active to prevent queue deletion due to the 1,500 message limit. ```bash curl -X POST 'https://api.opticodds.com/api/v3/copilot/results/queue/start' \ --header 'X-Api-Key: YOUR_API_KEY' ``` -------------------------------- ### GET Request for Live Odds Stream Source: https://developer.opticodds.com/docs/odds-api-getting-started-guide This is an example of a GET request to the SSE streaming endpoint for live odds. It includes required and optional parameters for filtering the data. ```bash GET https://api.opticodds.com/api/v3/stream/odds/basketball?sportsbook=DraftKings&sportsbook=BetMGM&league=NCAAB&market=Moneyline ``` -------------------------------- ### Local MCP Server Configuration (npx) Source: https://developer.opticodds.com/docs/opticodds-mcp-integration-guide Configure Claude Desktop to launch the OpticOdds MCP server locally using `npx`. This method requires Node.js and sets the API key via environment variables. Replace 'your-api-key' with your actual OpticOdds API key. ```json { "mcpServers": { "opticodds": { "command": "npx", "args": ["-y", "opticodds-mcp"], "env": { "OPTICODDS_API_KEY": "your-api-key" } } } } ``` -------------------------------- ### Same Game Parlay Pricer Request Source: https://developer.opticodds.com/docs/same-game-parlay-sgp-pricer-bet-builder This example demonstrates how to structure a request to the Same Game Parlay Pricer API to get odds for a parlay. ```APIDOC ## POST /parlay/price ### Description Prices a same-game parlay based on the provided legs and sportsbooks. ### Method POST ### Endpoint /parlay/price ### Parameters #### Request Body - **sportsbooks** (string[]) - Required - Array of sportsbook names, or `["OpticOdds AI"]` for consensus. - **entries** (object[]) - Required - Array of parlay legs (1–50 entries). - **entries[].market** (string) - Required - Market type (e.g., `"Player Hits"`, `"Moneyline"`, `"Player Strikeouts"`). - **entries[].name** (string) - Required - Selection name (e.g., `"Alec Burleson Over 0.5"`). - **entries[].fixture_id** (string) - Required - The fixture identifier for the game. - **entries[].price_american** (number) - Optional - American odds for this entry (Only with `OpticOdds AI`). - **entries[].price_decimal** (number) - Optional - Decimal odds for this entry (Only with `OpticOdds AI`). ### Request Example ```json { "sportsbooks": ["OpticOdds AI", "BetMGM"], "entries": [ { "market": "Player Strikeouts", "name": "George Kirby Over 7.5", "fixture_id": "1234567" }, { "market": "Moneyline", "name": "Seattle Mariners", "fixture_id": "1234567" } ] } ``` ### Response #### Success Response (200) - **parlay_price** (object) - Object containing the odds for the parlay. - **american** (number) - American odds for the parlay. - **decimal** (number) - Decimal odds for the parlay. - **fractional** (string) - Fractional odds for the parlay. - **entry_prices** (object[]) - Array of objects, each containing the odds for an individual entry. - **american** (number) - American odds for the entry. - **decimal** (number) - Decimal odds for the entry. - **fractional** (string) - Fractional odds for the entry. #### Response Example ```json { "parlay_price": { "american": 350, "decimal": 4.50, "fractional": "7/2" }, "entry_prices": [ { "american": -110, "decimal": 1.91, "fractional": "-11/10" }, { "american": -150, "decimal": 1.67, "fractional": "-3/2" } ] } ``` ``` -------------------------------- ### Fixture Metadata Example Source: https://developer.opticodds.com/docs/nba-statistics-api-guide Demonstrates the structure of fixture metadata returned by the API, including match ID, game ID, dates, team names, status, and venue details. ```json { "fixture": { "id": "202511290A239F45", "game_id": "19957-11464-2025-11-28", "start_date": "2025-11-29T00:30:00Z", "home_team_display": "Atlanta Hawks", "away_team_display": "Cleveland Cavaliers", "status": "completed", "season_type": "Regular Season", "season_year": "2025", "venue_name": "State Farm Arena", "venue_location": "Atlanta, GA, USA", "venue_neutral": false } } ``` -------------------------------- ### Get Parlay Odds using Sportsbooks Source: https://developer.opticodds.com/reference/post_parlay-odds This example demonstrates how to request parlay odds by specifying a list of sportsbooks and the desired bet entries. ```APIDOC ## POST /api/v3/parlay/odds ### Description Retrieves parlay odds for specified sportsbooks and bet entries. ### Method POST ### Endpoint /api/v3/parlay/odds ### Query Parameters - **key** (string) - Required - Your API key. ### Request Body - **sportsbooks** (array of strings) - Required - A list of sportsbook names (e.g., "Bwin", "DraftKings"). - **entries** (array of objects) - Required - A list of bet entries, each containing: - **market** (string) - Required - The type of market (e.g., "Player Hits"). - **name** (string) - Required - The specific bet name (e.g., "Alec Burleson Over 0.5"). - **fixture_id** (string) - Required - The unique identifier for the fixture. ### Request Example ```json { "sportsbooks": [ "Bwin", "DraftKings", "BetMGM" ], "entries": [ { "market": "Player Hits", "name": "Alec Burleson Over 0.5", "fixture_id": "E1AFAEAF67DD" }, { "market": "Player Hits", "name": "Brendan Donovan Over 0.5", "fixture_id": "E1AFAEAF67DD" }, { "market": "Player Strikeouts", "name": "Andre Pallante Over 3.5", "fixture_id": "E1AFAEAF67DD" } ] } ``` ### Response #### Success Response (200) - **odds** (object) - Contains odds information from the specified sportsbooks. - **[sportsbook_name]** (object) - Odds for a specific sportsbook. - **[entry_identifier]** (object) - Odds for a specific bet entry. - **price_american** (number) - American odds format. - **price_decimal** (number) - Decimal odds format. - **implied_probability** (number) - Implied probability of the bet winning. #### Response Example ```json { "odds": { "Bwin": { "entry_1_id": { "price_american": -110, "price_decimal": 1.91, "implied_probability": 0.5238 } } } } ``` ``` -------------------------------- ### Get NFL Players Source: https://developer.opticodds.com/reference/get_players This example demonstrates how to retrieve a list of NFL players using the API. The `league` query parameter is set to 'NFL'. ```APIDOC ## GET /api/v3/players?league=NFL ### Description Retrieves a list of players for the NFL. ### Method GET ### Endpoint /api/v3/players #### Query Parameters - **league** (string) - Required - The league to filter players by (e.g., 'NFL'). ### Response #### Success Response (200) - **data** (array) - An array of player objects. - **id** (string) - Unique identifier for the player. - **name** (string) - Full name of the player. - **position** (string) - Player's position. - **number** (integer) - Player's jersey number. - **is_active** (boolean) - Indicates if the player is currently active. - **first_name** (string) - Player's first name. - **last_name** (string) - Player's last name. - **age** (integer) - Player's age. - **height** (integer) - Player's height in inches. - **weight** (integer) - Player's weight in pounds. - **logo** (string) - URL to the player's logo. - **base_id** (integer) - Base ID for the player. - **sport** (object) - Information about the sport. - **id** (string) - Sport ID. - **name** (string) - Sport name. - **numerical_id** (integer) - Numerical ID for the sport. - **league** (object) - Information about the league. - **id** (string) - League ID. - **name** (string) - League name. - **numerical_id** (integer) - Numerical ID for the league. - **team** (object) - Information about the player's team. - **id** (string) - Team ID. - **name** (string) - Team name. - **numerical_id** (integer) - Numerical ID for the team. ### Response Example { "data": [ { "id": "58528E9A72E6", "name": "Aaron Banks", "position": "G", "number": 65, "numerical_id": null, "is_active": true, "first_name": "Aaron", "last_name": "Banks", "age": 27, "height": 76, "weight": 323, "experience": null, "logo": "https://cdn.opticodds.com/player-logos/football/1559.png", "base_id": 1559, "source_ids": {}, "sport": { "id": "football", "name": "Football", "numerical_id": 9 }, "league": { "id": "nfl", "name": "NFL", "numerical_id": 367 }, "team": { "id": "132B64CEDAC4", "name": "San Francisco 49ers", "numerical_id": null } } ] } ``` -------------------------------- ### Authenticate via Header Source: https://developer.opticodds.com/docs/odds-api-getting-started-guide Use your API key in the 'X-Api-Key' header for authentication. This is the recommended method. ```bash curl --location 'https://api.opticodds.com/api/v3/sports' \ --header 'X-Api-Key: YOUR_API_KEY' ``` -------------------------------- ### Get Active Fixtures with Odds Source: https://developer.opticodds.com/docs/odds-api-getting-started-guide Use this endpoint to retrieve all active fixtures that have associated odds. It's the recommended starting point for most integrations. ```bash GET https://api.opticodds.com/api/v3/fixtures/active?sport=football&league=nfl ``` -------------------------------- ### Get All Supported Markets Source: https://developer.opticodds.com/reference/get_markets Use this endpoint to retrieve a list of all markets that are or have been supported by OpticOdds. The example shows filtering by sport and requesting only market data. ```json { "data": [ { "id": "team_total", "name": "Team Total", "numerical_id": 1261, "sports": [ { "id": "aussie_rules", "name": "Aussie Rules", "leagues": [ { "id": "afl", "name": "AFL", "sportsbooks": [ { "id": "1xbet", "name": "1XBet" }, { "id": "ladbrokes", "name": "Ladbrokes" }, { "id": "sportsbet", "name": "Sportsbet" }, { "id": "draftkings", "name": "DraftKings" }, { "id": "bet365", "name": "bet365" }, { "id": "dabble_australia_", "name": "Dabble (Australia)" }, { "id": "elite_bet", "name": "Elite Bet" } ] } ] } ] }, { "id": "2nd_half_moneyline", "name": "2nd Half Moneyline", "numerical_id": 323, "sports": [ { "id": "aussie_rules", "name": "Aussie Rules", "leagues": [ { "id": "afl", "name": "AFL", "sportsbooks": [ { "id": "leovegas", "name": "LeoVegas" }, { "id": "twinspires", "name": "TwinSpires" }, { "id": "unibet_united_kingdom_", "name": "Unibet (United Kingdom)" }, { "id": "four_winds", "name": "Four Winds" }, { "id": "betrivers", "name": "BetRivers" }, { "id": "ladbrokes_australia_", "name": "Ladbrokes (Australia)" }, { "id": "casumo", "name": "Casumo" }, { "id": "northstar_bets", "name": "NorthStar Bets" }, { "id": "unibet_australia_", "name": "Unibet (Australia)" }, { "id": "bet365", "name": "bet365" }, { "id": "unibet", "name": "Unibet" }, { "id": "betrivers_new_york_", "name": "BetRivers (New York)" }, { "id": "sugarhouse", "name": "SugarHouse" }, { "id": "desert_diamond", "name": "Desert Diamond" }, { "id": "bally_bet", "name": "Bally Bet" }, { "id": "tabtouch", "name": "TABtouch" }, { "id": "neds", "name": "Neds" }, { "id": "1xbet", "name": "1XBet" }, { "id": "betparx", "name": "betPARX" } ] } ] } ] }, { "id": "first_goal_scorer", "name": "First Goal Scorer", "numerical_id": 920, "sports": [ { "id": "aussie_rules", "name": "Aussie Rules", "leagues": [ { "id": "afl", "name": "AFL", "sportsbooks": [ { "id": "leovegas", "name": "LeoVegas" }, { "id": "playup_australia_", "name": "PlayUp (Australia)" }, { "id": "unibet_australia_" ``` -------------------------------- ### Local MCP Server Configuration (Direct URL) Source: https://developer.opticodds.com/docs/opticodds-mcp-integration-guide Configure Claude Desktop to use the OpticOdds MCP server directly via its URL. Replace 'YOUR_API_KEY' with your actual OpticOdds API key. This is the primary method to try first. ```json { "mcpServers":{ "opticodds":{ "url":"https://api.opticodds.com/mcp", "headers":{ "Authorization":"Bearer YOUR_API_KEY" } } } } ``` -------------------------------- ### Enable Fixture Results Queue Source: https://developer.opticodds.com/docs/fixture-results Initiate your message queue to start receiving fixture data. This POST request returns your queue details. ```json { "data": [ { "id": 3, "queue_name": "AAAAAAA_2_cop_4HOEXAMPLEQUEUE", "enabled": true, "sports": [], "leagues": [ "nba" ], "num_consumers": null, "num_messages": null, "messages_per_second": null } ] } ```