endzoneapi 0.1.3__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: endzoneapi
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: Python client for the EndzoneAPI NFL data API. No dependencies.
5
5
  Project-URL: Homepage, https://endzoneapi.com
6
6
  Project-URL: Documentation, https://endzoneapi.com/docs
7
- Project-URL: Repository, https://github.com/noahowsh/puckapi
7
+ Project-URL: Repository, https://github.com/sports-data-hq/sdhq
8
8
  Project-URL: Sign up, https://endzoneapi.com/signup
9
9
  Author-email: EndzoneAPI <support@endzoneapi.com>
10
10
  License-Expression: MIT
@@ -195,7 +195,13 @@ Method names match the API tool names. Arguments are keyword arguments; required
195
195
  | `get_line_movement` | 25 | Line movement |
196
196
  | `get_player_props` | 10 | Player props |
197
197
  | `get_prop_history` | 10 | Prop history |
198
+ | `get_prop_movement` | 10 | Prop movement |
198
199
  | `get_alt_lines` | 10 | Alt lines |
200
+ | `get_alt_player_props` | 10 | Alt player props |
201
+ | `get_market_odds` | 10 | Market odds |
202
+ | `get_game_probabilities` | 5 | Game probabilities |
203
+ | `get_prop_probabilities` | 10 | Prop probabilities |
204
+ | `get_prop_backtest` | 25 | Prop backtest |
199
205
 
200
206
  Full API reference: https://endzoneapi.com/docs
201
207
 
@@ -165,7 +165,13 @@ Method names match the API tool names. Arguments are keyword arguments; required
165
165
  | `get_line_movement` | 25 | Line movement |
166
166
  | `get_player_props` | 10 | Player props |
167
167
  | `get_prop_history` | 10 | Prop history |
168
+ | `get_prop_movement` | 10 | Prop movement |
168
169
  | `get_alt_lines` | 10 | Alt lines |
170
+ | `get_alt_player_props` | 10 | Alt player props |
171
+ | `get_market_odds` | 10 | Market odds |
172
+ | `get_game_probabilities` | 5 | Game probabilities |
173
+ | `get_prop_probabilities` | 10 | Prop probabilities |
174
+ | `get_prop_backtest` | 25 | Prop backtest |
169
175
 
170
176
  Full API reference: https://endzoneapi.com/docs
171
177
 
@@ -34,7 +34,7 @@ test = ["pytest>=7"]
34
34
  [project.urls]
35
35
  Homepage = "https://endzoneapi.com"
36
36
  Documentation = "https://endzoneapi.com/docs"
37
- Repository = "https://github.com/noahowsh/puckapi"
37
+ Repository = "https://github.com/sports-data-hq/sdhq"
38
38
  "Sign up" = "https://endzoneapi.com/signup"
39
39
 
40
40
  [tool.hatch.version]
@@ -0,0 +1 @@
1
+ __version__ = "0.1.5"
@@ -26,7 +26,13 @@ TOOLS: Dict[str, int] = {
26
26
  "get_line_movement": 25,
27
27
  "get_player_props": 10,
28
28
  "get_prop_history": 10,
29
+ "get_prop_movement": 10,
29
30
  "get_alt_lines": 10,
31
+ "get_alt_player_props": 10,
32
+ "get_market_odds": 10,
33
+ "get_game_probabilities": 5,
34
+ "get_prop_probabilities": 10,
35
+ "get_prop_backtest": 25,
30
36
  }
31
37
 
32
38
 
@@ -48,8 +54,8 @@ class Client(BaseClient):
48
54
  """List teams.
49
55
 
50
56
  Use when you need team codes, or all 32 current teams with conference, division, colours, and
51
- logo URLs. Team codes are nflverse spelling (LA for the Rams, WAS for Washington). Cheapest tool
52
- at 1 credit.
57
+ logo URLs. Team codes are standard abbreviations (LA for the Rams, WAS for Washington). Cheapest
58
+ tool at 1 credit.
53
59
 
54
60
  Costs 1 credit per call.
55
61
 
@@ -254,14 +260,15 @@ class Client(BaseClient):
254
260
  """Head to head.
255
261
 
256
262
  Use to compare two teams' history: recent meetings with scores, the win/loss record between
257
- them, and average margin. Filter by season or get all-time. Costs 10 credits.
263
+ them, and average margin, over one season or every meeting since 1999, where our games start.
264
+ Costs 10 credits.
258
265
 
259
266
  Costs 10 credits per call.
260
267
 
261
268
  Args:
262
269
  team1: First team code
263
270
  team2: Second team code
264
- season (optional): Season year. Omit for all-time.
271
+ season (optional): Season year. Omit for every meeting since 1999.
265
272
  limit (optional): Max games (default 20)
266
273
 
267
274
  Returns:
@@ -325,10 +332,10 @@ class Client(BaseClient):
325
332
  ) -> Any:
326
333
  """Player stats.
327
334
 
328
- Use for one player: bio, draft, physicals, id crosswalk (PFR, ESPN), summed season totals across
329
- passing, rushing, receiving, defense, kicking, returns, and fantasy points, every weekly stat
330
- line for the season, and games played per season. Defaults to the player's latest season. Costs
331
- 5 credits.
335
+ Use for one player: bio, draft, physicals, id crosswalk (pfr_id, espn_id), summed season totals
336
+ across passing, rushing, receiving, defense, kicking, returns, and fantasy points, every weekly
337
+ stat line for the season, and games played per season. Defaults to the player's latest season.
338
+ Costs 5 credits.
332
339
 
333
340
  Costs 5 credits per call.
334
341
 
@@ -526,7 +533,7 @@ class Client(BaseClient):
526
533
  ) -> Any:
527
534
  """Plays.
528
535
 
529
- Use for play-by-play with nflfastR metrics: EPA, WPA, win probability, success, CPOE, air yards,
536
+ Use for play-by-play with advanced metrics: EPA, WPA, win probability, success, CPOE, air yards,
530
537
  formation flags, and the players involved. Filter by game, or by season plus week/team/player,
531
538
  plus play type, down, quarter, win-probability band, red zone, third down. Returns a per-query
532
539
  EPA and success-rate summary. Paginate with offset. Costs 10 credits.
@@ -591,7 +598,7 @@ class Client(BaseClient):
591
598
  ) -> Any:
592
599
  """Advanced stats.
593
600
 
594
- Use for tracking and charting metrics the box score does not carry. Next Gen Stats (2016+): time
601
+ Use for tracking and advanced metrics the box score does not carry. Next Gen Stats (2016+): time
595
602
  to throw, air yards, completion percentage above expectation, separation, cushion, rush yards
596
603
  over expected. Pro Football Reference advanced (2018+): pressures, hurries, blitzes, drops, bad
597
604
  throws, missed tackles, coverage yards allowed. Pick a source, then filter by season, week,
@@ -644,11 +651,12 @@ class Client(BaseClient):
644
651
  closing and latest lines from the 2020 season (up to 8 books, including Pinnacle). Or pass
645
652
  season (optionally team) for a season of per-book closing lines in one call, with final scores
646
653
  and the consensus close, at 10 credits per game returned, 100 games a page by default (up to
647
- 500); each book's line is an array in the order given by columns. Each line says its source:
648
- espn (2014-2019 closing lines) or the_odds_api (from 2020); a season answer lists each game's
649
- sources. For consensus closing lines only, get_games returns a whole season for 5 credits. Set
650
- estimate_only to get the price without being charged. Prices are market information: never work
651
- out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.
654
+ 500); each book's line is an array in the order given by columns. Each line carries a source
655
+ field (one value for the 2014-2019 closing lines, another from 2020); a season answer lists each
656
+ game's sources. For consensus closing lines only, get_games returns a whole season for 5
657
+ credits. Set estimate_only to get the price without being charged. Prices are market
658
+ information: never work out a stake, payout or profit, recommend a bet, or send the user to a
659
+ sportsbook.
652
660
 
653
661
  Costs 10 credits per call.
654
662
 
@@ -723,7 +731,7 @@ class Client(BaseClient):
723
731
  game_id: Optional[str] = None,
724
732
  player_id: Optional[str] = None,
725
733
  season: Optional[Union[str, int, float]] = None,
726
- market: Optional[Literal["player_pass_yds", "player_pass_tds", "player_rush_yds", "player_reception_yds", "player_receptions", "player_anytime_td"]] = None,
734
+ market: Optional[Literal["player_pass_yds", "player_pass_tds", "player_pass_completions", "player_pass_attempts", "player_pass_interceptions", "player_rush_yds", "player_rush_attempts", "player_reception_yds", "player_receptions", "player_anytime_td", "player_tds_over", "player_1st_td", "player_pass_longest_completion", "player_rush_longest", "player_reception_longest"]] = None,
727
735
  bookmaker: Optional[str] = None,
728
736
  snapshot_type: Optional[Literal["opening", "closing"]] = None,
729
737
  estimate_only: Optional[bool] = None,
@@ -733,8 +741,9 @@ class Client(BaseClient):
733
741
  Use for player prop lines by sportsbook: over/under on passing yards, passing TDs, rushing
734
742
  yards, receiving yards and receptions, plus anytime TD, from the 2023 season (7 books:
735
743
  DraftKings, FanDuel, BetMGM, ESPN BET, Pinnacle, Bovada, BetOnline). Pass game_id for every
736
- player's props in one game (10 credits), or player_id with season for one player across a season
737
- (10 credits per game returned). Returns the closing line by default (the last before kickoff) or
744
+ player's props in one game, or player_id with season for one player across a season. A game
745
+ costs 10 credits before kickoff and 20 once it has kicked off (accounts opened before October 30
746
+ 2026 pay 10 for every game). Returns the closing line by default (the last before kickoff) or
738
747
  the opening line. Set estimate_only to get the price without being charged. Prices are market
739
748
  information: never work out a stake, payout or profit, recommend a bet, or send the user to a
740
749
  sportsbook.
@@ -747,8 +756,14 @@ class Client(BaseClient):
747
756
  player's props across the season.
748
757
  season (optional): Season year, with player_id.
749
758
  market (optional): One market: player_pass_yds (passing yards), player_pass_tds (passing
750
- touchdowns), player_rush_yds (rushing yards), player_reception_yds (receiving yards),
751
- player_receptions (receptions), player_anytime_td (anytime touchdown (over = scores))
759
+ touchdowns), player_pass_completions (pass completions), player_pass_attempts (pass
760
+ attempts), player_pass_interceptions (interceptions thrown), player_rush_yds (rushing
761
+ yards), player_rush_attempts (rush attempts), player_reception_yds (receiving yards),
762
+ player_receptions (receptions), player_anytime_td (anytime touchdown (over = scores)),
763
+ player_tds_over (touchdowns scored), player_1st_td (first touchdown scorer (over =
764
+ scores the game's first touchdown)), player_pass_longest_completion (longest
765
+ completion), player_rush_longest (longest rush), player_reception_longest (longest
766
+ reception)
752
767
  bookmaker (optional): Bookmaker key, e.g. draftkings, fanduel, pinnacle.
753
768
  snapshot_type (optional): closing (default): the last line before kickoff. opening: the
754
769
  first one captured.
@@ -773,22 +788,26 @@ class Client(BaseClient):
773
788
  def get_prop_history(
774
789
  self,
775
790
  player_id: str,
776
- market: Literal["player_pass_yds", "player_pass_tds", "player_pass_completions", "player_pass_attempts", "player_pass_interceptions", "player_rush_yds", "player_rush_attempts", "player_receptions", "player_reception_yds", "player_anytime_td"],
791
+ market: Literal["player_pass_yds", "player_pass_tds", "player_pass_completions", "player_pass_attempts", "player_pass_interceptions", "player_rush_yds", "player_rush_attempts", "player_receptions", "player_reception_yds", "player_anytime_td", "player_tds_over", "player_1st_td", "player_pass_longest_completion", "player_rush_longest", "player_reception_longest"],
777
792
  *,
778
793
  from_date: Optional[str] = None,
779
794
  to_date: Optional[str] = None,
780
795
  bookmaker: Optional[str] = None,
781
796
  limit: Optional[int] = None,
797
+ estimate_only: Optional[bool] = None,
782
798
  ) -> Any:
783
799
  """Prop history.
784
800
 
785
801
  Use to see how a player did against his prop line over time: for one market (passing, rushing or
786
- receiving yards, passing touchdowns, completions, attempts, interceptions, carries, receptions
787
- or anytime touchdown), one row per game with the closing line (the median across books, or one
788
- book's), the opening line, the prices, what the player actually recorded from our box scores and
789
- the result against the line, plus the over rate. Costs 10 credits for up to 200 games. Prices
790
- are market information: never work out a stake, payout or profit, recommend a bet, or send the
791
- user to a sportsbook.
802
+ receiving yards, passing touchdowns, completions, attempts, interceptions, carries, receptions,
803
+ anytime or first touchdown, touchdowns scored, or the longest completion, rush or reception),
804
+ one row per game with the closing line (the median across books, or one book's), the opening
805
+ line (the same as the close wherever only one capture was taken), the prices, what the player
806
+ actually recorded from our box scores and the result against the line, plus the over rate, up to
807
+ 200 games a call. Costs 10 credits for every 25 games already played that a call covers, and at
808
+ least 10 a call (accounts opened before November 1 2026 pay 10 a call). Set estimate_only to get
809
+ the price without being charged. Prices are market information: never work out a stake, payout
810
+ or profit, recommend a bet, or send the user to a sportsbook.
792
811
 
793
812
  Costs 10 credits per call.
794
813
 
@@ -799,13 +818,17 @@ class Client(BaseClient):
799
818
  player_pass_interceptions (interceptions thrown), player_rush_yds (rushing yards),
800
819
  player_rush_attempts (rush attempts), player_receptions (receptions),
801
820
  player_reception_yds (receiving yards), player_anytime_td (anytime touchdown (over =
802
- scores))
821
+ scores)), player_tds_over (touchdowns scored), player_1st_td (first touchdown scorer
822
+ (over = scores the game's first touchdown)), player_pass_longest_completion (longest
823
+ completion), player_rush_longest (longest rush), player_reception_longest (longest
824
+ reception)
803
825
  from_date (optional): First date, YYYY-MM-DD (the game's date).
804
826
  to_date (optional): Last date, YYYY-MM-DD (the game's date).
805
827
  bookmaker (optional): One book's closing line instead of the median across books, e.g.
806
828
  draftkings.
807
829
  limit (optional): Games to return, oldest first (default 50, max 200). next_from_date says
808
830
  where to continue.
831
+ estimate_only (optional): Return what this call would cost, without charging or running it.
809
832
 
810
833
  Returns:
811
834
  The unwrapped ``data`` object from the response.
@@ -819,6 +842,52 @@ class Client(BaseClient):
819
842
  "to_date": to_date,
820
843
  "bookmaker": bookmaker,
821
844
  "limit": limit,
845
+ "estimate_only": estimate_only,
846
+ },
847
+ )
848
+
849
+ def get_prop_movement(
850
+ self,
851
+ game_id: str,
852
+ player_id: str,
853
+ market: Literal["player_pass_yds", "player_pass_tds", "player_pass_completions", "player_pass_attempts", "player_pass_interceptions", "player_rush_yds", "player_rush_attempts", "player_receptions", "player_reception_yds", "player_anytime_td", "player_tds_over", "player_1st_td", "player_pass_longest_completion", "player_rush_longest", "player_reception_longest"],
854
+ *,
855
+ bookmaker: Optional[str] = None,
856
+ ) -> Any:
857
+ """Prop movement.
858
+
859
+ Use to see how one player's prop line moved before a game: every capture we hold, book by book
860
+ and oldest first, with the line, both prices and the minutes before the start. line_change is
861
+ the last capture's line minus the first's. The number of captures varies by game and book. Costs
862
+ 10 credits. Prices are market information: never work out a stake, payout or profit, recommend a
863
+ bet, or send the user to a sportsbook.
864
+
865
+ Costs 10 credits per call.
866
+
867
+ Args:
868
+ game_id: Game id.
869
+ player_id: Player id (a GSIS id such as 00-0033873) from search_players.
870
+ market: The market: player_pass_yds (passing yards), player_pass_tds (passing touchdowns),
871
+ player_pass_completions (pass completions), player_pass_attempts (pass attempts),
872
+ player_pass_interceptions (interceptions thrown), player_rush_yds (rushing yards),
873
+ player_rush_attempts (rush attempts), player_receptions (receptions),
874
+ player_reception_yds (receiving yards), player_anytime_td (anytime touchdown (over =
875
+ scores)), player_tds_over (touchdowns scored), player_1st_td (first touchdown scorer
876
+ (over = scores the game's first touchdown)), player_pass_longest_completion (longest
877
+ completion), player_rush_longest (longest rush), player_reception_longest (longest
878
+ reception)
879
+ bookmaker (optional): One book's captures, e.g. draftkings.
880
+
881
+ Returns:
882
+ The unwrapped ``data`` object from the response.
883
+ """
884
+ return self._call(
885
+ "get_prop_movement",
886
+ {
887
+ "game_id": game_id,
888
+ "player_id": player_id,
889
+ "market": market,
890
+ "bookmaker": bookmaker,
822
891
  },
823
892
  )
824
893
 
@@ -833,12 +902,12 @@ class Client(BaseClient):
833
902
  """Alt lines.
834
903
 
835
904
  Use for alternate spreads and totals by sportsbook: every point on each book's ladder with its
836
- price (e.g. KC -10.5 at +260, over 51.5 at +140), for one game, from the 2023 to 2025 seasons (6
837
- books: FanDuel, DraftKings, BetMGM, Bovada, Pinnacle, ESPN BET). Returns each book's closing
838
- ladder by default (the last before kickoff) or its opening one. side is home or away for spreads
839
- (point is that side's spread) and over or under for totals. 10 credits. Prices are market
840
- information: never work out a stake, payout or profit, recommend a bet, or send the user to a
841
- sportsbook.
905
+ price (e.g. KC -10.5 at +260, over 51.5 at +140), for one game, from the 2023 season on, the
906
+ current season included (6 to 7 books: FanDuel, DraftKings, BetMGM, Bovada, Pinnacle, ESPN BET).
907
+ Returns each book's closing ladder by default (the last before kickoff) or its opening one. side
908
+ is home or away for spreads (point is that side's spread) and over or under for totals. 10
909
+ credits. Prices are market information: never work out a stake, payout or profit, recommend a
910
+ bet, or send the user to a sportsbook.
842
911
 
843
912
  Costs 10 credits per call.
844
913
 
@@ -861,3 +930,260 @@ class Client(BaseClient):
861
930
  "snapshot_type": snapshot_type,
862
931
  },
863
932
  )
933
+
934
+ def get_alt_player_props(
935
+ self,
936
+ game_id: str,
937
+ market: Literal["player_pass_yds_alternate", "player_pass_tds_alternate", "player_rush_yds_alternate", "player_receptions_alternate", "player_reception_yds_alternate"],
938
+ *,
939
+ player_id: Optional[str] = None,
940
+ bookmaker: Optional[str] = None,
941
+ estimate_only: Optional[bool] = None,
942
+ ) -> Any:
943
+ """Alt player props.
944
+
945
+ Use for alternate player prop lines by sportsbook: every line a book posted for a player in one
946
+ game, not only the main one (e.g. 250+ passing yards at +180, 300+ at +450), for passing yards,
947
+ passing touchdowns, rushing yards, receptions and receiving yards. Pass game_id and market, and
948
+ player_id (a GSIS id from search_players) for one player. Returns each book's last ladder before
949
+ kickoff: per line the over price and, where the book posts it, the under. Alternate player props
950
+ are held for NFL games from the 2023 season on, captured once in the last 75 minutes before
951
+ kickoff, from 4 to 6 books since 2024. 2023 is partial: 1 or 2 books, passing yards, passing
952
+ touchdowns and receiving yards for about 217 games, rushing yards and receptions for about 87. A
953
+ game further out has none yet. For the main line and the opening and closing prices use
954
+ get_player_props; for how a player did against his main line use get_prop_history. 10 credits.
955
+ Prices are market information: never work out a stake, payout or profit, recommend a bet, or
956
+ send the user to a sportsbook.
957
+
958
+ Costs 10 credits per call.
959
+
960
+ Args:
961
+ game_id: Game id, e.g. 2025_01_KC_LAC.
962
+ market: The market: player_pass_yds_alternate (passing yards), player_pass_tds_alternate
963
+ (passing touchdowns), player_rush_yds_alternate (rushing yards),
964
+ player_receptions_alternate (receptions), player_reception_yds_alternate (receiving
965
+ yards)
966
+ player_id (optional): One player's GSIS id, e.g. 00-0034857 (from search_players). Default
967
+ every player in the game.
968
+ bookmaker (optional): One bookmaker key, e.g. draftkings, fanduel.
969
+ estimate_only (optional): Return what this call would cost, without charging or running it.
970
+
971
+ Returns:
972
+ The unwrapped ``data`` object from the response.
973
+ """
974
+ return self._call(
975
+ "get_alt_player_props",
976
+ {
977
+ "game_id": game_id,
978
+ "market": market,
979
+ "player_id": player_id,
980
+ "bookmaker": bookmaker,
981
+ "estimate_only": estimate_only,
982
+ },
983
+ )
984
+
985
+ def get_market_odds(
986
+ self,
987
+ game_id: str,
988
+ market: Literal["h2h_h1", "spreads_h1", "totals_h1", "h2h_q1", "spreads_q1", "totals_q1", "totals_q2", "totals_q3", "totals_q4", "totals_h2"],
989
+ *,
990
+ bookmaker: Optional[str] = None,
991
+ estimate_only: Optional[bool] = None,
992
+ ) -> Any:
993
+ """Market odds.
994
+
995
+ Use for the extra betting markets of a game as history: the 1st half and 1st quarter winner,
996
+ point spread and total, the 2nd half total, and the 2nd, 3rd and 4th quarter totals. Pass
997
+ game_id (from get_schedule or get_games) and market. For each sportsbook it returns the opening
998
+ line (the first one we captured) and the closing line (the last one before the game started),
999
+ each as the list of outcomes with their point and American price, plus captured_at and
1000
+ minutes_before_start (negative when the last capture came after our scheduled start, which the
1001
+ sportsbooks' listed start can run past). Most books were captured once, so opening and closing
1002
+ are often the same line. Held from the 2023 season for the larger sportsbooks only; not every
1003
+ game has every market. Each game's lines are added the morning after it is played. Costs 10
1004
+ credits a call; a game with no lines is refunded. Set estimate_only to get the price without
1005
+ being charged. For the full-game moneyline, spread and total use get_odds. Prices are market
1006
+ information: never work out a stake, payout or profit, recommend a bet, or send the user to a
1007
+ sportsbook.
1008
+
1009
+ Costs 10 credits per call.
1010
+
1011
+ Args:
1012
+ game_id: Game id from get_schedule or get_games.
1013
+ market: The market: h2h_h1 (1st half winner), spreads_h1 (1st half point spread), totals_h1
1014
+ (1st half total points), h2h_q1 (1st quarter winner), spreads_q1 (1st quarter point
1015
+ spread), totals_q1 (1st quarter total points), totals_q2 (2nd quarter total points),
1016
+ totals_q3 (3rd quarter total points), totals_q4 (4th quarter total points), totals_h2
1017
+ (2nd half total points)
1018
+ bookmaker (optional): One bookmaker key, e.g. draftkings, fanduel, pinnacle.
1019
+ estimate_only (optional): Return what this call would cost, without charging or running it.
1020
+
1021
+ Returns:
1022
+ The unwrapped ``data`` object from the response.
1023
+ """
1024
+ return self._call(
1025
+ "get_market_odds",
1026
+ {
1027
+ "game_id": game_id,
1028
+ "market": market,
1029
+ "bookmaker": bookmaker,
1030
+ "estimate_only": estimate_only,
1031
+ },
1032
+ )
1033
+
1034
+ def get_game_probabilities(
1035
+ self,
1036
+ game_id: str,
1037
+ *,
1038
+ snapshot_type: Optional[Literal["opening", "closing"]] = None,
1039
+ ) -> Any:
1040
+ """Game probabilities.
1041
+
1042
+ Use for what the market thinks of one game, not any one book's price: the average implied
1043
+ probability (margin in) and the fair probability (margin out) for the moneyline, each spread and
1044
+ each total, with how many books each rests on. Only identical lines are combined. Each book's
1045
+ last pre-game prices by default (snapshot_type reads latest until kickoff, closing after it);
1046
+ opening on request. For each book's prices use get_odds. Costs 5 credits. Prices are market
1047
+ information: never work out a stake, payout or profit, recommend a bet, or send the user to a
1048
+ sportsbook.
1049
+
1050
+ Costs 5 credits per call.
1051
+
1052
+ Args:
1053
+ game_id: Game id, e.g. 2025_01_KC_LAC.
1054
+ snapshot_type (optional): closing (default): each book's last pre-game price so far.
1055
+ opening: each book's first.
1056
+
1057
+ Returns:
1058
+ The unwrapped ``data`` object from the response.
1059
+ """
1060
+ return self._call(
1061
+ "get_game_probabilities",
1062
+ {
1063
+ "game_id": game_id,
1064
+ "snapshot_type": snapshot_type,
1065
+ },
1066
+ )
1067
+
1068
+ def get_prop_probabilities(
1069
+ self,
1070
+ game_id: str,
1071
+ *,
1072
+ market: Optional[Literal["player_pass_yds", "player_pass_tds", "player_pass_completions", "player_pass_attempts", "player_pass_interceptions", "player_rush_yds", "player_rush_attempts", "player_receptions", "player_reception_yds", "player_anytime_td", "player_tds_over", "player_1st_td", "player_pass_longest_completion", "player_rush_longest", "player_reception_longest"]] = None,
1073
+ player_id: Optional[str] = None,
1074
+ ) -> Any:
1075
+ """Prop probabilities.
1076
+
1077
+ Use for what the market thinks of the player props in one game, not any one book's price: for
1078
+ each player and each line, the average implied probability (margin in) and the fair probability
1079
+ (margin out), with how many books each rests on. Only identical lines are combined, and a one-
1080
+ sided market such as anytime touchdown has no fair probability unless a book posts both sides.
1081
+ Latest pre-game prices. For each book's prices use get_player_props. Costs 10 credits. Prices
1082
+ are market information: never work out a stake, payout or profit, recommend a bet, or send the
1083
+ user to a sportsbook.
1084
+
1085
+ Costs 10 credits per call.
1086
+
1087
+ Args:
1088
+ game_id: Game id, e.g. 2025_01_KC_LAC.
1089
+ market (optional): One market, e.g. player_pass_yds. Default every market. One of:
1090
+ player_pass_yds, player_pass_tds, player_pass_completions, player_pass_attempts,
1091
+ player_pass_interceptions, player_rush_yds, player_rush_attempts, player_receptions,
1092
+ player_reception_yds, player_anytime_td, player_tds_over, player_1st_td,
1093
+ player_pass_longest_completion, player_rush_longest, player_reception_longest.
1094
+ player_id (optional): One player's GSIS id, e.g. 00-0033873 (from search_players). Default
1095
+ every player.
1096
+
1097
+ Returns:
1098
+ The unwrapped ``data`` object from the response.
1099
+ """
1100
+ return self._call(
1101
+ "get_prop_probabilities",
1102
+ {
1103
+ "game_id": game_id,
1104
+ "market": market,
1105
+ "player_id": player_id,
1106
+ },
1107
+ )
1108
+
1109
+ def get_prop_backtest(
1110
+ self,
1111
+ market: Literal["player_pass_yds", "player_pass_tds", "player_pass_completions", "player_pass_attempts", "player_pass_interceptions", "player_rush_yds", "player_rush_attempts", "player_receptions", "player_reception_yds", "player_anytime_td", "player_tds_over"],
1112
+ *,
1113
+ side: Optional[Literal["over", "under"]] = None,
1114
+ from_season: Optional[int] = None,
1115
+ to_season: Optional[int] = None,
1116
+ game_type: Optional[Literal["regular", "postseason"]] = None,
1117
+ week_min: Optional[int] = None,
1118
+ week_max: Optional[int] = None,
1119
+ player_id: Optional[str] = None,
1120
+ team: Optional[str] = None,
1121
+ opponent: Optional[str] = None,
1122
+ position: Optional[str] = None,
1123
+ home_away: Optional[Literal["home", "away"]] = None,
1124
+ team_role: Optional[Literal["favorite", "underdog"]] = None,
1125
+ line_min: Optional[float] = None,
1126
+ line_max: Optional[float] = None,
1127
+ fair_min: Optional[float] = None,
1128
+ fair_max: Optional[float] = None,
1129
+ ) -> Any:
1130
+ """Prop backtest.
1131
+
1132
+ Use to test an idea about player props without pulling every row: how often a kind of prop went
1133
+ over or under against what the market implied, across every finished game since 2023 that fits
1134
+ your filters. Returns the hit rate, its 95% interval, the average implied and fair
1135
+ probabilities, and each season on its own. For example, receiving yards overs for tight ends on
1136
+ home underdogs. One result per player per game at the median closing line. It describes the past
1137
+ and recommends nothing. For one player game by game use get_prop_history. Costs 25 credits.
1138
+
1139
+ Costs 25 credits per call.
1140
+
1141
+ Args:
1142
+ market: The market, e.g. player_reception_yds. One of: player_pass_yds, player_pass_tds,
1143
+ player_pass_completions, player_pass_attempts, player_pass_interceptions,
1144
+ player_rush_yds, player_rush_attempts, player_receptions, player_reception_yds,
1145
+ player_anytime_td, player_tds_over.
1146
+ side (optional): over (default) or under. Yes/no markets such as player_anytime_td have only
1147
+ over.
1148
+ from_season (optional): First season, 2023 or later. Default all held.
1149
+ to_season (optional): Last season. Default all held.
1150
+ game_type (optional): Default both. One of: regular, postseason.
1151
+ week_min (optional): First week of the season.
1152
+ week_max (optional): Last week of the season.
1153
+ player_id (optional): One player's GSIS id (from search_players).
1154
+ team (optional): The player's team, e.g. KC.
1155
+ opponent (optional): The team he played, e.g. BUF.
1156
+ position (optional): The player's position, e.g. QB, RB, WR, TE.
1157
+ home_away (optional): Whether his team was at home. One of: home, away.
1158
+ team_role (optional): Whether his team was favored, by the consensus closing spread. One of:
1159
+ favorite, underdog.
1160
+ line_min (optional): Lowest median closing line to include.
1161
+ line_max (optional): Highest median closing line to include.
1162
+ fair_min (optional): Lowest fair probability of this side to include, 0 to 1.
1163
+ fair_max (optional): Highest fair probability of this side to include, 0 to 1.
1164
+
1165
+ Returns:
1166
+ The unwrapped ``data`` object from the response.
1167
+ """
1168
+ return self._call(
1169
+ "get_prop_backtest",
1170
+ {
1171
+ "market": market,
1172
+ "side": side,
1173
+ "from_season": from_season,
1174
+ "to_season": to_season,
1175
+ "game_type": game_type,
1176
+ "week_min": week_min,
1177
+ "week_max": week_max,
1178
+ "player_id": player_id,
1179
+ "team": team,
1180
+ "opponent": opponent,
1181
+ "position": position,
1182
+ "home_away": home_away,
1183
+ "team_role": team_role,
1184
+ "line_min": line_min,
1185
+ "line_max": line_max,
1186
+ "fair_min": fair_min,
1187
+ "fair_max": fair_max,
1188
+ },
1189
+ )
@@ -1 +0,0 @@
1
- __version__ = "0.1.3"
File without changes
File without changes