callmevojtko / Recommended-Bets-By-Email-MLB

An advanced machine learning model utilizes a Random Forest Regressor to generate betting recommendations for Major League Baseball (MLB) games.
MIT License
17 stars 5 forks source link

Odds API Problem #5

Open pottsnpans3 opened 11 months ago

pottsnpans3 commented 11 months ago

Hi!

I am running into a problem where I am running into a problem with the Odds API. When I tested my API it was working, but when I run it I am getting.

Fetching data from API... An error occurred: name 'API CODE IS HERE' is not defined

Anything I could change to get this to work?

irf23 commented 9 months ago

Have you tried since the readme was updated?

itsRabb commented 2 months ago

Have you tried since the readme was updated?

Ya its Garbage.

campb223 commented 2 months ago

I was able to get it working by just plugging my API key directly in the API_LINK on the .env file.

API_LINK=https://api.the-odds-api.com/v4/sports/baseball_mlb/odds/?regions=us&markets=h2h&bookmakers=fanduel,draftkings&oddsFormat=american&apiKey=a9766.....

Also, barstool isn't a valid bookie on The Odds API anymore. Barstool became ESPNBet which is under the us2 region. It won't fail if you include barstool in the link but I've removed them in my example.