Skip to content

Commit

Permalink
add availble markets json
Browse files Browse the repository at this point in the history
  • Loading branch information
avalos010 committed Oct 7, 2024
1 parent e6b36c6 commit e735fbd
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export async function getPlayerProps(
) {
try {
const odds = await fetch(
`${baseURL}/v4/sports/${sport}/events/${eventid}/odds/?apiKey=${apiKey}&regions=us&oddsFormat=american`
`${baseURL}/v4/sports/${sport}/events/${eventid}/odds/?apiKey=${apiKey}&regions=us&markets=player_pass_tds&oddsFormat=american`
);

const data = odds.json();
Expand Down
91 changes: 91 additions & 0 deletions lib/playerPropMarkets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"nfl": {
"player_assists": "Assists",
"player_field_goals": "Field Goals",
"player_kicking_points": "Kicking Points",
"player_pass_attempts": "Pass Attempts",
"player_pass_completions": "Pass Completions",
"player_pass_interceptions": "Pass Interceptions",
"player_pass_longest_completion": "Longest Pass Completion",
"player_pass_rush_reception_tds": "Pass + Rush + Reception Touchdowns",
"player_pass_rush_reception_yds": "Pass + Rush + Reception Yards",
"player_pass_tds": "Pass Touchdowns",
"player_pass_yds": "Pass Yards",
"player_pats": "Points After Touchdown",
"player_receptions": "Receptions",
"player_reception_longest": "Longest Reception",
"player_reception_yds": "Reception Yards",
"player_rush_attempts": "Rush Attempts",
"player_rush_longest": "Longest Rush",
"player_rush_reception_tds": "Rush + Reception Touchdowns",
"player_rush_reception_yds": "Rush + Reception Yards",
"player_rush_yds": "Rush Yards",
"player_sacks": "Sacks",
"player_solo_tackles": "Solo Tackles",
"player_tackles_assists": "Tackles + Assists",
"player_tds_over": "Touchdowns",
"player_1st_td": "1st Touchdown Scorer",
"player_anytime_td": "Anytime Touchdown Scorer",
"player_last_td": "Last Touchdown Scorer"
},
"nba": {
"player_points": "Points",
"player_rebounds": "Rebounds",
"player_assists": "Assists",
"player_threes": "Threes",
"player_blocks": "Blocks",
"player_steals": "Steals",
"player_blocks_steals": "Blocks + Steals",
"player_turnovers": "Turnovers",
"player_points_rebounds_assists": "Points + Rebounds + Assists",
"player_points_rebounds": "Points + Rebounds",
"player_points_assists": "Points + Assists",
"player_rebounds_assists": "Rebounds + Assists",
"player_first_basket": "First Basket Scorer",
"player_double_double": "Double Double",
"player_triple_double": "Triple Double"
},
"mlb": {
"batter_home_runs": "Batter Home Runs",
"batter_first_home_run": "Batter First Home Run",
"batter_hits": "Batter Hits",
"batter_total_bases": "Batter Total Bases",
"batter_rbis": "Batter RBIs",
"batter_runs_scored": "Batter Runs Scored",
"batter_hits_runs_rbis": "Batter Hits + Runs + RBIs",
"batter_singles": "Batter Singles",
"batter_doubles": "Batter Doubles",
"batter_triples": "Batter Triples",
"batter_walks": "Batter Walks",
"batter_strikeouts": "Batter Strikeouts",
"batter_stolen_bases": "Batter Stolen Bases",
"pitcher_strikeouts": "Pitcher Strikeouts",
"pitcher_record_a_win": "Pitcher to Record a Win",
"pitcher_hits_allowed": "Pitcher Hits Allowed",
"pitcher_walks": "Pitcher Walks",
"pitcher_earned_runs": "Pitcher Earned Runs",
"pitcher_outs": "Pitcher Outs"
},
"nhl": {
"player_points": "Points",
"player_power_play_points": "Power Play Points",
"player_assists": "Assists",
"player_blocked_shots": "Blocked Shots",
"player_shots_on_goal": "Shots on Goal",
"player_goals": "Goals",
"player_total_saves": "Total Saves",
"player_goal_scorer_first": "First Goal Scorer",
"player_goal_scorer_last": "Last Goal Scorer",
"player_goal_scorer_anytime": "Anytime Goal Scorer"
},
"soccer": {
"player_goal_scorer_anytime": "Anytime Goal Scorer",
"player_first_goal_scorer": "First Goal Scorer",
"player_last_goal_scorer": "Last Goal Scorer",
"player_to_receive_card": "Player to Receive a Card",
"player_to_receive_red_card": "Player to Receive a Red Card",
"player_shots_on_target": "Player Shots on Target",
"player_shots": "Player Shots",
"player_assists": "Player Assists"
}
}
1 change: 0 additions & 1 deletion src/app/odds/playerProps/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const playerProps = async ({ searchParams }: PlayerPropsParams) => {

const props = await getPlayerProps(sport, eventId);

console.log(props);
return (
<div>
<h1>Player Props real</h1>
Expand Down

0 comments on commit e735fbd

Please sign in to comment.