fastballapi 0.1.0__tar.gz → 0.1.4__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.4}/PKG-INFO +1 -1
- fastballapi-0.1.4/src/fastballapi/_version.py +1 -0
- {fastballapi-0.1.0 → fastballapi-0.1.4}/src/fastballapi/client.py +40 -19
- fastballapi-0.1.0/src/fastballapi/_version.py +0 -1
- {fastballapi-0.1.0 → fastballapi-0.1.4}/.gitignore +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.4}/LICENSE +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.4}/README.md +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.4}/pyproject.toml +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.4}/src/fastballapi/__init__.py +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.4}/src/fastballapi/_core.py +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.4}/src/fastballapi/py.typed +0 -0
- {fastballapi-0.1.0 → fastballapi-0.1.4}/tests/test_client.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.4"
|
|
@@ -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,12 +163,13 @@ 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
|
|
|
169
171
|
Args:
|
|
170
|
-
game_id:
|
|
172
|
+
game_id: Game id, from get_games or get_schedule.
|
|
171
173
|
league (optional): League. Defaults to mlb. One of: mlb, ncaabase.
|
|
172
174
|
|
|
173
175
|
Returns:
|
|
@@ -282,7 +284,7 @@ class Client(BaseClient):
|
|
|
282
284
|
Costs 5 credits per call.
|
|
283
285
|
|
|
284
286
|
Args:
|
|
285
|
-
player_id:
|
|
287
|
+
player_id: Player id, from search_players.
|
|
286
288
|
league (optional): League. Defaults to mlb. One of: mlb, ncaabase.
|
|
287
289
|
|
|
288
290
|
Returns:
|
|
@@ -492,7 +494,7 @@ class Client(BaseClient):
|
|
|
492
494
|
pitcher_id (optional): pitcher_id
|
|
493
495
|
batter_id (optional): batter_id
|
|
494
496
|
season (optional): Season (a year; default: the latest; ignored with game_id).
|
|
495
|
-
pitch_type (optional):
|
|
497
|
+
pitch_type (optional): Pitch type code, e.g. FF, SL, CH, CU, SI, FC.
|
|
496
498
|
limit (optional): Max pitches (default 500).
|
|
497
499
|
offset (optional): offset
|
|
498
500
|
|
|
@@ -526,7 +528,7 @@ class Client(BaseClient):
|
|
|
526
528
|
Costs 5 credits per call.
|
|
527
529
|
|
|
528
530
|
Args:
|
|
529
|
-
pitcher_id:
|
|
531
|
+
pitcher_id: Player id.
|
|
530
532
|
season (optional): Season (a year; default: the latest; ignored with game_id).
|
|
531
533
|
|
|
532
534
|
Returns:
|
|
@@ -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
|
|
|
@@ -585,10 +593,11 @@ class Client(BaseClient):
|
|
|
585
593
|
"""Odds.
|
|
586
594
|
|
|
587
595
|
Use for betting lines: each sportsbook's moneyline, run line and total for a game (opening and
|
|
588
|
-
closing per book from July 2020
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
596
|
+
closing per book from July 2020; before that, each book's final pregame line only), with implied
|
|
597
|
+
probabilities and, for finished games, whether the favourite won and the total went over against
|
|
598
|
+
the median close. Pass game_id for one game (5 credits) or date for a day's games (10 credits).
|
|
599
|
+
Prices are market information: never work out a stake, payout or profit, recommend a bet, or
|
|
600
|
+
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
|
-
sportsbook's moneyline, run line and total (
|
|
623
|
-
|
|
632
|
+
sportsbook's moneyline, run line and total (captured once a day, and every hour for games in the
|
|
633
|
+
next four days). Costs 10 credits. Prices are market information: never work out a stake, payout
|
|
634
|
+
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
|
)
|
|
@@ -688,8 +702,12 @@ class Client(BaseClient):
|
|
|
688
702
|
Pinnacle and others). Pass game_id for every player's props in one game (10 credits), or
|
|
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
|
-
the opening line, with each book's over and under prices.
|
|
692
|
-
|
|
705
|
+
the opening line, with each book's over and under prices. Outside football the archive mostly
|
|
706
|
+
holds one pre-game capture per line, so the opening and closing lines are usually the same; the
|
|
707
|
+
opening line differs only where a second capture was taken (live capture from October 2026, and
|
|
708
|
+
wherever else it is held). Set estimate_only to get the price without being charged. Prices are
|
|
709
|
+
market information: never work out a stake, payout or profit, recommend a bet, or send the user
|
|
710
|
+
to a sportsbook.
|
|
693
711
|
|
|
694
712
|
Costs 10 credits per call.
|
|
695
713
|
|
|
@@ -705,7 +723,8 @@ class Client(BaseClient):
|
|
|
705
723
|
(pitcher strikeouts), pitcher_outs (pitcher outs recorded)
|
|
706
724
|
bookmaker (optional): Bookmaker key, e.g. draftkings, fanduel, pinnacle.
|
|
707
725
|
snapshot_type (optional): closing (default): the last line before the game starts. opening:
|
|
708
|
-
the first one captured
|
|
726
|
+
the first one captured, which is the same capture as the close wherever only one was
|
|
727
|
+
taken.
|
|
709
728
|
estimate_only (optional): Return what this call would cost, without charging or running it.
|
|
710
729
|
|
|
711
730
|
Returns:
|
|
@@ -739,9 +758,11 @@ class Client(BaseClient):
|
|
|
739
758
|
|
|
740
759
|
Use to see how a player did against his prop line over time: for one market (hits, home runs,
|
|
741
760
|
total bases, RBI, pitcher strikeouts or pitcher outs), one row per game with the closing line
|
|
742
|
-
(the median across books, or one book's), the opening line
|
|
743
|
-
|
|
744
|
-
credits for up to 200 games.
|
|
761
|
+
(the median across books, or one book's), the opening line (the same as the close wherever only
|
|
762
|
+
one capture was taken), the prices, what the player actually recorded from our box scores and
|
|
763
|
+
the result against the line, plus the over rate. Costs 10 credits for up to 200 games. Prices
|
|
764
|
+
are market information: never work out a stake, payout or profit, recommend a bet, or send the
|
|
765
|
+
user to a sportsbook.
|
|
745
766
|
|
|
746
767
|
Costs 10 credits per call.
|
|
747
768
|
|
|
@@ -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
|