Live Betting Odds From Major Sports Books?

I’ve done a fair amount of research, but still more to go as I am guessing it’s not possible right now or there are limitations outside of Tidbyt’s control.

Is there a way to display live sports betting odds from one of the major sports books (FanDuel, DraftKings, etc.)?

I’ve looked into a true sports ticker, but crazy expensive and requires a subscription for access to the data feed. However, I was curious if any of the sports books have APIs we could connect to (or whatever method to obtain the data) since the platform is open source.

1 Like

Hi. Would this API work? It’s free I use it for excel

I’m very interested in this app for Tidbyt so let me know what else I can do to help.

i’m not a developer but pretty sure we can make this happen using the Odds API i sent above - which is free.

Here is ChatGPT’s take.

Here’s an example of a simple Starlark script that retrieves and displays sports betting odds from the-odds-api.com:

Copy code

load("http", "json")

# API endpoint for sports betting odds
odds_api = "https://api.the-odds-api.com/v3/odds?api_key=YOUR_API_KEY&sport=upcoming"

# Make API call and get response
resp = http.get(odds_api)

# Parse JSON data from response
data = json.loads(resp.content)

# Extract odds from data
odds = data["data"]

# Print odds for each sport and team
for sport in odds:
    print("Sport: ", sport["sport_key"])
    for team in sport["teams"]:
        print("Team: ", team["team_key"])
        print("Odds: ", team["odds"]["h2h"])
        print("---")

This script uses the http and json modules to make an API call to the-odds-api.com, parse the JSON data returned by the API, and extract the relevant information (the odds for different sports and teams).

It’s important to note that you need to replace YOUR_API_KEY with your actual API key in the API endpoint. You also need to consider the usage of the API and the security of the API key.

This script can be used as the foundation for your app, and you can add more features and functionality as needed.

Please note that this is just an example, you need to test it before use and you may need to adapt it to your specific use case.