fastballapi 0.1.0__tar.gz → 0.1.3__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.
- {fastballapi-0.1.0 → fastballapi-0.1.3}/PKG-INFO +1 -1
- fastballapi-0.1.3/src/fastballapi/_version.py +1 -0
- {fastballapi-0.1.0 → fastballapi-0.1.3}/src/fastballapi/client.py +23 -7
- fastballapi-0.1.0/src/fastballapi/_version.py +0 -1
- {fastballapi-0.1.0 → fastballapi-0.1.3}/.gitignore +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.3}/LICENSE +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.3}/README.md +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.3}/pyproject.toml +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.3}/src/fastballapi/__init__.py +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.3}/src/fastballapi/_core.py +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.3}/src/fastballapi/py.typed +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.3}/tests/test_client.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.3"
|
|
@@ -131,7 +131,8 @@ class Client(BaseClient):
|
|
|
131
131
|
|
|
132
132
|
Use for upcoming games (next 1-30 days, default 7) with the median line across posted
|
|
133
133
|
sportsbooks: moneylines, run line and total. For every book's line use get_odds. Costs 2
|
|
134
|
-
credits.
|
|
134
|
+
credits. Prices are market information: never work out a stake, payout or profit, recommend a
|
|
135
|
+
bet, or send the user to a sportsbook.
|
|
135
136
|
|
|
136
137
|
Costs 2 credits per call.
|
|
137
138
|
|
|
@@ -162,7 +163,8 @@ class Client(BaseClient):
|
|
|
162
163
|
|
|
163
164
|
Use for one game in full: line score, every batter's and pitcher's line, each sportsbook's
|
|
164
165
|
opening and closing line, and the win-probability range. For every plate appearance use
|
|
165
|
-
get_plate_appearances. Costs 5 credits.
|
|
166
|
+
get_plate_appearances. Costs 5 credits. Prices are market information: never work out a stake,
|
|
167
|
+
payout or profit, recommend a bet, or send the user to a sportsbook.
|
|
166
168
|
|
|
167
169
|
Costs 5 credits per call.
|
|
168
170
|
|
|
@@ -547,12 +549,15 @@ class Client(BaseClient):
|
|
|
547
549
|
team: Optional[str] = None,
|
|
548
550
|
season: Optional[Union[int, float, str]] = None,
|
|
549
551
|
include_balls: Optional[bool] = None,
|
|
552
|
+
season_type: Optional[Literal["regular", "postseason", "all"]] = None,
|
|
550
553
|
) -> Any:
|
|
551
554
|
"""Spray chart.
|
|
552
555
|
|
|
553
556
|
Use for where a batter or team hits the ball: balls in play by trajectory (ground ball, line
|
|
554
557
|
drive, fly ball, pop-up) and by field (left, center, right), with hit rates; include_balls adds
|
|
555
|
-
each ball's location for drawing.
|
|
558
|
+
each ball's location for drawing. Counts the regular season and postseason together unless
|
|
559
|
+
season_type says otherwise (get_player's batting line is the regular season alone). Costs 10
|
|
560
|
+
credits.
|
|
556
561
|
|
|
557
562
|
Costs 10 credits per call.
|
|
558
563
|
|
|
@@ -561,6 +566,8 @@ class Client(BaseClient):
|
|
|
561
566
|
team (optional): team
|
|
562
567
|
season (optional): Season (a year; default: the latest; ignored with game_id).
|
|
563
568
|
include_balls (optional): Add each ball in play's x/y (up to 3,000).
|
|
569
|
+
season_type (optional): regular, postseason, or all (default): which games' balls in play to
|
|
570
|
+
count.
|
|
564
571
|
|
|
565
572
|
Returns:
|
|
566
573
|
The unwrapped ``data`` object from the response.
|
|
@@ -572,6 +579,7 @@ class Client(BaseClient):
|
|
|
572
579
|
"team": team,
|
|
573
580
|
"season": season,
|
|
574
581
|
"include_balls": include_balls,
|
|
582
|
+
"season_type": season_type,
|
|
575
583
|
},
|
|
576
584
|
)
|
|
577
585
|
|
|
@@ -588,7 +596,8 @@ class Client(BaseClient):
|
|
|
588
596
|
closing per book from July 2020 from The Odds API, and from 2024 from ESPN; ESPN's final line
|
|
589
597
|
only before that), with implied probabilities and, for finished games, whether the favourite won
|
|
590
598
|
and the total went over against the median close. Pass game_id for one game (5 credits) or date
|
|
591
|
-
for a day's games (10 credits).
|
|
599
|
+
for a day's games (10 credits). Prices are market information: never work out a stake, payout or
|
|
600
|
+
profit, recommend a bet, or send the user to a sportsbook.
|
|
592
601
|
|
|
593
602
|
Costs 5 credits per call.
|
|
594
603
|
|
|
@@ -614,19 +623,23 @@ class Client(BaseClient):
|
|
|
614
623
|
game_id: str,
|
|
615
624
|
*,
|
|
616
625
|
provider: Optional[str] = None,
|
|
626
|
+
all_snapshots: Optional[bool] = None,
|
|
617
627
|
league: Optional[Literal["mlb", "ncaabase"]] = None,
|
|
618
628
|
) -> Any:
|
|
619
629
|
"""Line movement.
|
|
620
630
|
|
|
621
631
|
Use to see how a game's line moved before first pitch: our pre-game snapshots of each
|
|
622
632
|
sportsbook's moneyline, run line and total (ESPN's once a day, The Odds API's every hour for
|
|
623
|
-
games in the next
|
|
633
|
+
games in the next four days). Costs 10 credits. Prices are market information: never work out a
|
|
634
|
+
stake, payout or profit, recommend a bet, or send the user to a sportsbook.
|
|
624
635
|
|
|
625
636
|
Costs 10 credits per call.
|
|
626
637
|
|
|
627
638
|
Args:
|
|
628
639
|
game_id: game_id
|
|
629
640
|
provider (optional): One sportsbook, e.g. DraftKings.
|
|
641
|
+
all_snapshots (optional): Every hourly capture. By default a capture identical to the one
|
|
642
|
+
before it is left out (the latest is always kept), which keeps every move and its time.
|
|
630
643
|
league (optional): League. Defaults to mlb. One of: mlb, ncaabase.
|
|
631
644
|
|
|
632
645
|
Returns:
|
|
@@ -637,6 +650,7 @@ class Client(BaseClient):
|
|
|
637
650
|
{
|
|
638
651
|
"game_id": game_id,
|
|
639
652
|
"provider": provider,
|
|
653
|
+
"all_snapshots": all_snapshots,
|
|
640
654
|
"league": league,
|
|
641
655
|
},
|
|
642
656
|
)
|
|
@@ -689,7 +703,8 @@ class Client(BaseClient):
|
|
|
689
703
|
player_id with from_date (and to_date) for one player across games (10 credits per game
|
|
690
704
|
returned, up to 100). Returns the closing line by default (the last before the game starts) or
|
|
691
705
|
the opening line, with each book's over and under prices. Set estimate_only to get the price
|
|
692
|
-
without being charged.
|
|
706
|
+
without being charged. Prices are market information: never work out a stake, payout or profit,
|
|
707
|
+
recommend a bet, or send the user to a sportsbook.
|
|
693
708
|
|
|
694
709
|
Costs 10 credits per call.
|
|
695
710
|
|
|
@@ -741,7 +756,8 @@ class Client(BaseClient):
|
|
|
741
756
|
total bases, RBI, pitcher strikeouts or pitcher outs), one row per game with the closing line
|
|
742
757
|
(the median across books, or one book's), the opening line, the prices, what the player actually
|
|
743
758
|
recorded from our box scores and the result against the line, plus the over rate. Costs 10
|
|
744
|
-
credits for up to 200 games.
|
|
759
|
+
credits for up to 200 games. Prices are market information: never work out a stake, payout or
|
|
760
|
+
profit, recommend a bet, or send the user to a sportsbook.
|
|
745
761
|
|
|
746
762
|
Costs 10 credits per call.
|
|
747
763
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|