dunkapi 0.1.4__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: dunkapi
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Python client for the DunkAPI NBA data API. No dependencies.
5
5
  Project-URL: Homepage, https://dunkapi.com
6
6
  Project-URL: Documentation, https://dunkapi.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://dunkapi.com/signup
9
9
  Author-email: DunkAPI <support@dunkapi.com>
10
10
  License-Expression: MIT
@@ -196,6 +196,12 @@ Method names match the API tool names. Arguments are keyword arguments; required
196
196
  | `get_ratings` | 2 | Ratings |
197
197
  | `get_player_props` | 10 | Player props |
198
198
  | `get_prop_history` | 10 | Prop history |
199
+ | `get_prop_movement` | 10 | Prop movement |
200
+ | `get_market_odds` | 10 | Market odds |
201
+ | `get_game_probabilities` | 5 | Game probabilities |
202
+ | `get_prop_probabilities` | 10 | Prop probabilities |
203
+ | `get_prop_backtest` | 25 | Prop backtest |
204
+ | `get_alt_lines` | 10 | Alt lines |
199
205
 
200
206
  Full API reference: https://dunkapi.com/docs
201
207
 
@@ -166,6 +166,12 @@ Method names match the API tool names. Arguments are keyword arguments; required
166
166
  | `get_ratings` | 2 | Ratings |
167
167
  | `get_player_props` | 10 | Player props |
168
168
  | `get_prop_history` | 10 | Prop history |
169
+ | `get_prop_movement` | 10 | Prop movement |
170
+ | `get_market_odds` | 10 | Market odds |
171
+ | `get_game_probabilities` | 5 | Game probabilities |
172
+ | `get_prop_probabilities` | 10 | Prop probabilities |
173
+ | `get_prop_backtest` | 25 | Prop backtest |
174
+ | `get_alt_lines` | 10 | Alt lines |
169
175
 
170
176
  Full API reference: https://dunkapi.com/docs
171
177
 
@@ -34,7 +34,7 @@ test = ["pytest>=7"]
34
34
  [project.urls]
35
35
  Homepage = "https://dunkapi.com"
36
36
  Documentation = "https://dunkapi.com/docs"
37
- Repository = "https://github.com/noahowsh/puckapi"
37
+ Repository = "https://github.com/sports-data-hq/sdhq"
38
38
  "Sign up" = "https://dunkapi.com/signup"
39
39
 
40
40
  [tool.hatch.version]
@@ -0,0 +1 @@
1
+ __version__ = "0.1.5"
@@ -25,6 +25,12 @@ TOOLS: Dict[str, int] = {
25
25
  "get_ratings": 2,
26
26
  "get_player_props": 10,
27
27
  "get_prop_history": 10,
28
+ "get_prop_movement": 10,
29
+ "get_market_odds": 10,
30
+ "get_game_probabilities": 5,
31
+ "get_prop_probabilities": 10,
32
+ "get_prop_backtest": 25,
33
+ "get_alt_lines": 10,
28
34
  }
29
35
 
30
36
 
@@ -41,19 +47,19 @@ class Client(BaseClient):
41
47
  self,
42
48
  *,
43
49
  season: Optional[Union[int, float, str]] = None,
44
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
50
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
45
51
  ) -> Any:
46
52
  """List teams.
47
53
 
48
54
  Use to find team ids and abbreviations for a season (default: the latest). Every other tool
49
- takes a team as an id or abbreviation. Pass league for the WNBA (wnba) or college (ncaam,
50
- ncaaw); default NBA. Costs 1 credit.
55
+ takes a team as an id or abbreviation. Pass league for the WNBA (wnba), college (ncaam, ncaaw)
56
+ or Australia's NBL (nbl); default NBA. Costs 1 credit.
51
57
 
52
58
  Costs 1 credit per call.
53
59
 
54
60
  Args:
55
61
  season (optional): Season by the year it ends: 2025 = 2024-25. WNBA: the calendar year.
56
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
62
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
57
63
 
58
64
  Returns:
59
65
  The unwrapped ``data`` object from the response.
@@ -78,7 +84,7 @@ class Client(BaseClient):
78
84
  status: Optional[Literal["scheduled", "final"]] = None,
79
85
  limit: Optional[int] = None,
80
86
  offset: Optional[int] = None,
81
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
87
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
82
88
  ) -> Any:
83
89
  """List games.
84
90
 
@@ -97,7 +103,7 @@ class Client(BaseClient):
97
103
  status (optional): One of: scheduled, final.
98
104
  limit (optional): Max games (default 50).
99
105
  offset (optional): Page offset; use next_offset.
100
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
106
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
101
107
 
102
108
  Returns:
103
109
  The unwrapped ``data`` object from the response.
@@ -123,7 +129,7 @@ class Client(BaseClient):
123
129
  *,
124
130
  days: Optional[int] = None,
125
131
  team: Optional[str] = None,
126
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
132
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
127
133
  ) -> Any:
128
134
  """Schedule.
129
135
 
@@ -137,7 +143,7 @@ class Client(BaseClient):
137
143
  Args:
138
144
  days (optional): Days ahead (default 7).
139
145
  team (optional): Team id or abbreviation.
140
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
146
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
141
147
 
142
148
  Returns:
143
149
  The unwrapped ``data`` object from the response.
@@ -155,7 +161,7 @@ class Client(BaseClient):
155
161
  self,
156
162
  game_id: str,
157
163
  *,
158
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
164
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
159
165
  ) -> Any:
160
166
  """Game.
161
167
 
@@ -168,7 +174,7 @@ class Client(BaseClient):
168
174
 
169
175
  Args:
170
176
  game_id: Game id, from list_games or get_schedule.
171
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
177
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
172
178
 
173
179
  Returns:
174
180
  The unwrapped ``data`` object from the response.
@@ -185,7 +191,7 @@ class Client(BaseClient):
185
191
  self,
186
192
  *,
187
193
  season: Optional[Union[int, float, str]] = None,
188
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
194
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
189
195
  ) -> Any:
190
196
  """Standings.
191
197
 
@@ -196,7 +202,7 @@ class Client(BaseClient):
196
202
 
197
203
  Args:
198
204
  season (optional): Season by the year it ends (default: the latest).
199
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
205
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
200
206
 
201
207
  Returns:
202
208
  The unwrapped ``data`` object from the response.
@@ -246,19 +252,20 @@ class Client(BaseClient):
246
252
  name: str,
247
253
  *,
248
254
  limit: Optional[int] = None,
249
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
255
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
250
256
  ) -> Any:
251
257
  """Search players.
252
258
 
253
259
  Use to find a player's id by name (partial names work), most recent players first. Pass league
254
- for the WNBA (wnba) or college (ncaam, ncaaw); default NBA. Costs 1 credit.
260
+ for the WNBA (wnba), college (ncaam, ncaaw) or Australia's NBL (nbl); default NBA. Costs 1
261
+ credit.
255
262
 
256
263
  Costs 1 credit per call.
257
264
 
258
265
  Args:
259
266
  name: Full or partial name.
260
267
  limit (optional): limit
261
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
268
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
262
269
 
263
270
  Returns:
264
271
  The unwrapped ``data`` object from the response.
@@ -276,7 +283,7 @@ class Client(BaseClient):
276
283
  self,
277
284
  player_id: str,
278
285
  *,
279
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
286
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
280
287
  ) -> Any:
281
288
  """Player.
282
289
 
@@ -287,7 +294,7 @@ class Client(BaseClient):
287
294
 
288
295
  Args:
289
296
  player_id: Player id, from search_players.
290
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
297
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
291
298
 
292
299
  Returns:
293
300
  The unwrapped ``data`` object from the response.
@@ -308,7 +315,7 @@ class Client(BaseClient):
308
315
  season_type: Optional[Literal["regular", "postseason", "play_in", "preseason"]] = None,
309
316
  limit: Optional[int] = None,
310
317
  offset: Optional[int] = None,
311
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
318
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
312
319
  ) -> Any:
313
320
  """Player games.
314
321
 
@@ -323,7 +330,7 @@ class Client(BaseClient):
323
330
  season_type (optional): One of: regular, postseason, play_in, preseason.
324
331
  limit (optional): Max games (default 100).
325
332
  offset (optional): offset
326
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
333
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
327
334
 
328
335
  Returns:
329
336
  The unwrapped ``data`` object from the response.
@@ -348,7 +355,7 @@ class Client(BaseClient):
348
355
  season_type: Optional[Literal["regular", "postseason", "play_in", "preseason"]] = None,
349
356
  min_games: Optional[int] = None,
350
357
  limit: Optional[int] = None,
351
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
358
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
352
359
  ) -> Any:
353
360
  """Leaders.
354
361
 
@@ -364,7 +371,7 @@ class Client(BaseClient):
364
371
  season_type (optional): Default regular. One of: regular, postseason, play_in, preseason.
365
372
  min_games (optional): Minimum games played (default: a quarter of the season).
366
373
  limit (optional): limit
367
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
374
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
368
375
 
369
376
  Returns:
370
377
  The unwrapped ``data`` object from the response.
@@ -387,13 +394,17 @@ class Client(BaseClient):
387
394
  season: Optional[Union[int, float, str]] = None,
388
395
  season_type: Optional[Literal["regular", "postseason", "play_in", "preseason"]] = None,
389
396
  team: Optional[str] = None,
390
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
397
+ before: Optional[str] = None,
398
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
391
399
  ) -> Any:
392
400
  """Team stats.
393
401
 
394
402
  Use for team efficiency for a season: pace, offensive, defensive and net rating per 100
395
403
  possessions, the four factors (eFG%, turnover %, offensive rebound %, free throw rate) and
396
- three-point rate, from every box score. Costs 5 credits.
404
+ three-point rate, plus per-game box score averages (shooting, rebounds, steals, blocks and
405
+ blocks against, fouls and fouls drawn, point margin, overtime periods), from every box score.
406
+ Pass before (a date) for the numbers as they stood going into that day, for models that must not
407
+ see later games. Costs 5 credits.
397
408
 
398
409
  Costs 5 credits per call.
399
410
 
@@ -401,7 +412,8 @@ class Client(BaseClient):
401
412
  season (optional): Season by the year it ends: 2025 = 2024-25 (default: the latest).
402
413
  season_type (optional): One of: regular, postseason, play_in, preseason.
403
414
  team (optional): One team (id or abbreviation).
404
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
415
+ before (optional): YYYY-MM-DD: only games played before this date (point-in-time stats).
416
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
405
417
 
406
418
  Returns:
407
419
  The unwrapped ``data`` object from the response.
@@ -412,6 +424,7 @@ class Client(BaseClient):
412
424
  "season": season,
413
425
  "season_type": season_type,
414
426
  "team": team,
427
+ "before": before,
415
428
  "league": league,
416
429
  },
417
430
  )
@@ -431,14 +444,15 @@ class Client(BaseClient):
431
444
  clutch: Optional[bool] = None,
432
445
  limit: Optional[int] = None,
433
446
  offset: Optional[int] = None,
434
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
447
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
435
448
  ) -> Any:
436
449
  """Plays.
437
450
 
438
451
  Use for play-by-play: every event of a game, or a player's or team's plays across a season, with
439
452
  shot location (feet), zone, our expected points, the score and the home win probability after
440
- each play (2018 on). Filter to shots, makes or misses, a zone, a period or clutch time. Pass
441
- league for the WNBA (wnba) or college (ncaam, ncaaw); default NBA. Costs 10 credits.
453
+ each play (our model, on every game we hold). Filter to shots, makes or misses, a zone, a period
454
+ or clutch time. Pass league for the WNBA (wnba), college (ncaam, ncaaw) or Australia's NBL
455
+ (nbl); default NBA. Costs 10 credits.
442
456
 
443
457
  Costs 10 credits per call.
444
458
 
@@ -457,7 +471,7 @@ class Client(BaseClient):
457
471
  score within 5.
458
472
  limit (optional): Max plays (default 200).
459
473
  offset (optional): offset
460
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
474
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
461
475
 
462
476
  Returns:
463
477
  The unwrapped ``data`` object from the response.
@@ -491,7 +505,7 @@ class Client(BaseClient):
491
505
  season: Optional[Union[int, float, str]] = None,
492
506
  season_type: Optional[Literal["regular", "postseason", "play_in", "preseason"]] = None,
493
507
  include_shots: Optional[bool] = None,
494
- league: Optional[Literal["nba", "wnba"]] = None,
508
+ league: Optional[Literal["nba", "wnba", "nbl"]] = None,
495
509
  ) -> Any:
496
510
  """Shot chart.
497
511
 
@@ -510,7 +524,7 @@ class Client(BaseClient):
510
524
  season (optional): Season by the year it ends (default: the latest).
511
525
  season_type (optional): One of: regular, postseason, play_in, preseason.
512
526
  include_shots (optional): Add each shot's x, y and result (up to 3,000).
513
- league (optional): League. Defaults to nba. One of: nba, wnba.
527
+ league (optional): League. Defaults to nba. One of: nba, wnba, nbl.
514
528
 
515
529
  Returns:
516
530
  The unwrapped ``data`` object from the response.
@@ -534,7 +548,7 @@ class Client(BaseClient):
534
548
  *,
535
549
  game_id: Optional[str] = None,
536
550
  date: Optional[str] = None,
537
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
551
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
538
552
  ) -> Any:
539
553
  """Odds.
540
554
 
@@ -550,7 +564,7 @@ class Client(BaseClient):
550
564
  Args:
551
565
  game_id (optional): One game.
552
566
  date (optional): A day's games, YYYY-MM-DD (US Eastern).
553
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
567
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
554
568
 
555
569
  Returns:
556
570
  The unwrapped ``data`` object from the response.
@@ -570,7 +584,7 @@ class Client(BaseClient):
570
584
  *,
571
585
  provider: Optional[str] = None,
572
586
  all_snapshots: Optional[bool] = None,
573
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
587
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
574
588
  ) -> Any:
575
589
  """Line movement.
576
590
 
@@ -586,7 +600,7 @@ class Client(BaseClient):
586
600
  provider (optional): One sportsbook, e.g. DraftKings.
587
601
  all_snapshots (optional): Every hourly capture. By default a capture identical to the one
588
602
  before it is left out (the latest is always kept), which keeps every move and its time.
589
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
603
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
590
604
 
591
605
  Returns:
592
606
  The unwrapped ``data`` object from the response.
@@ -605,7 +619,8 @@ class Client(BaseClient):
605
619
  self,
606
620
  *,
607
621
  season: Optional[Union[int, float, str]] = None,
608
- league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
622
+ limit: Optional[int] = None,
623
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
609
624
  ) -> Any:
610
625
  """Ratings.
611
626
 
@@ -616,7 +631,8 @@ class Client(BaseClient):
616
631
 
617
632
  Args:
618
633
  season (optional): Season by the year it ends (default: the latest).
619
- league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
634
+ limit (optional): Teams to return, best first (default 100; college has more than 300).
635
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
620
636
 
621
637
  Returns:
622
638
  The unwrapped ``data`` object from the response.
@@ -625,6 +641,7 @@ class Client(BaseClient):
625
641
  "get_ratings",
626
642
  {
627
643
  "season": season,
644
+ "limit": limit,
628
645
  "league": league,
629
646
  },
630
647
  )
@@ -636,7 +653,7 @@ class Client(BaseClient):
636
653
  player_id: Optional[str] = None,
637
654
  from_date: Optional[str] = None,
638
655
  to_date: Optional[str] = None,
639
- market: Optional[Literal["player_points", "player_rebounds", "player_assists", "player_threes", "player_points_rebounds_assists", "player_blocks", "player_steals"]] = None,
656
+ market: Optional[Literal["player_points", "player_rebounds", "player_assists", "player_threes", "player_points_rebounds_assists", "player_blocks", "player_steals", "player_points_rebounds", "player_points_assists", "player_rebounds_assists", "player_double_double", "player_triple_double"]] = None,
640
657
  bookmaker: Optional[str] = None,
641
658
  snapshot_type: Optional[Literal["opening", "closing"]] = None,
642
659
  estimate_only: Optional[bool] = None,
@@ -644,18 +661,25 @@ class Client(BaseClient):
644
661
  ) -> Any:
645
662
  """Player props.
646
663
 
647
- Use for player prop lines by sportsbook: over/under on points, rebounds, assists, threes, points
648
- + rebounds + assists, blocks and steals, from May 2023 for the NBA and WNBA and the 2023-24
649
- season for men's college basketball (DraftKings, FanDuel, BetMGM, ESPN BET, Pinnacle and
650
- others). Pass game_id for every player's props in one game (10 credits), or player_id with
651
- from_date (and to_date) for one player across games (10 credits per game returned, up to 100).
652
- Returns the closing line by default (the last before the game starts) or the opening line, with
653
- each book's over and under prices. Outside football the archive mostly holds one pre-game
654
- capture per line, so the opening and closing lines are usually the same; the opening line
655
- differs only where a second capture was taken (live capture from October 2026, and wherever else
656
- it is held). Set estimate_only to get the price without being charged. Prices are market
657
- information: never work out a stake, payout or profit, recommend a bet, or send the user to a
658
- sportsbook.
664
+ Use for player prop lines by sportsbook: over/under on points, rebounds, assists, threes,
665
+ blocks, steals, the combos (points + rebounds + assists, points + rebounds, points + assists,
666
+ rebounds + assists) and double- and triple-doubles (the NBA has them all; the WNBA has no
667
+ blocks, steals or triple-doubles and college basketball has points, rebounds, assists and the
668
+ combos), from May 2023 for the NBA and WNBA and the 2023-24 season for men's college basketball
669
+ (DraftKings, FanDuel, BetMGM, ESPN BET, Pinnacle and others). Pass game_id for every player's
670
+ props in one game, or player_id with from_date (and to_date) for one player across games (up to
671
+ 100). A game costs 10 credits before it starts and 20 once it has (accounts opened before
672
+ October 30 2026 pay 10 for every game). Returns the closing line by default (the last before the
673
+ game starts) or the opening line, with each book's over and under prices. Each row has
674
+ captured_at, scheduled_start and minutes_before_scheduled_start (negative when captured after
675
+ the scheduled start); a row is kept when it was captured before the sportsbooks' listed start,
676
+ which in the NBA is usually about 10 minutes after the scheduled one, so filter on
677
+ minutes_before_scheduled_start > 0 for a strictly before-schedule backtest. Outside football the
678
+ archive mostly holds one pre-game capture per line, so the opening and closing lines are usually
679
+ the same; the opening line differs only where a second capture was taken (live capture from
680
+ October 2026, and wherever else it is held). Set estimate_only to get the price without being
681
+ charged. Prices are market information: never work out a stake, payout or profit, recommend a
682
+ bet, or send the user to a sportsbook.
659
683
 
660
684
  Costs 10 credits per call.
661
685
 
@@ -669,7 +693,10 @@ class Client(BaseClient):
669
693
  market (optional): One market: player_points (points), player_rebounds (rebounds),
670
694
  player_assists (assists), player_threes (three-pointers made),
671
695
  player_points_rebounds_assists (points + rebounds + assists), player_blocks (blocks),
672
- player_steals (steals)
696
+ player_steals (steals), player_points_rebounds (points + rebounds),
697
+ player_points_assists (points + assists), player_rebounds_assists (rebounds + assists),
698
+ player_double_double (double-double (over = yes)), player_triple_double (triple-double
699
+ (over = yes))
673
700
  bookmaker (optional): Bookmaker key, e.g. draftkings, fanduel, pinnacle.
674
701
  snapshot_type (optional): closing (default): the last line before the game starts. opening:
675
702
  the first one captured, which is the same capture as the close wherever only one was
@@ -698,23 +725,27 @@ class Client(BaseClient):
698
725
  def get_prop_history(
699
726
  self,
700
727
  player_id: str,
701
- market: Literal["player_points", "player_rebounds", "player_assists", "player_threes", "player_points_rebounds_assists", "player_blocks", "player_steals"],
728
+ market: Literal["player_points", "player_rebounds", "player_assists", "player_threes", "player_points_rebounds_assists", "player_blocks", "player_steals", "player_points_rebounds", "player_points_assists", "player_rebounds_assists", "player_double_double", "player_triple_double"],
702
729
  *,
703
730
  from_date: Optional[str] = None,
704
731
  to_date: Optional[str] = None,
705
732
  bookmaker: Optional[str] = None,
706
733
  limit: Optional[int] = None,
734
+ estimate_only: Optional[bool] = None,
707
735
  league: Optional[Literal["nba", "wnba", "ncaam"]] = None,
708
736
  ) -> Any:
709
737
  """Prop history.
710
738
 
711
739
  Use to see how a player did against his prop line over time: for one market (points, rebounds,
712
- assists, threes, points + rebounds + assists, blocks or steals), one row per game with the
713
- closing line (the median across books, or one book's), the opening line (the same as the close
714
- wherever only one capture was taken), the prices, what the player actually recorded from our box
715
- scores and the result against the line, plus the over rate. Costs 10 credits for up to 200
716
- games. Prices are market information: never work out a stake, payout or profit, recommend a bet,
717
- or send the user to a sportsbook.
740
+ assists, threes, blocks, steals, one of the combos (points + rebounds + assists, points +
741
+ rebounds, points + assists, rebounds + assists), double-double or triple-double), one row per
742
+ game with the closing line (the median across books, or one book's), the opening line (the same
743
+ as the close wherever only one capture was taken), the prices, what the player actually recorded
744
+ from our box scores and the result against the line, plus the over rate, up to 200 games a call.
745
+ Costs 10 credits for every 25 games already played that a call covers, and at least 10 a call
746
+ (accounts opened before November 1 2026 pay 10 a call). Set estimate_only to get the price
747
+ without being charged. Prices are market information: never work out a stake, payout or profit,
748
+ recommend a bet, or send the user to a sportsbook.
718
749
 
719
750
  Costs 10 credits per call.
720
751
 
@@ -722,13 +753,17 @@ class Client(BaseClient):
722
753
  player_id: Player id (e.g. 3945274) from search_players.
723
754
  market: The market: player_points (points), player_rebounds (rebounds), player_assists
724
755
  (assists), player_threes (three-pointers made), player_points_rebounds_assists (points +
725
- rebounds + assists), player_blocks (blocks), player_steals (steals)
756
+ rebounds + assists), player_blocks (blocks), player_steals (steals),
757
+ player_points_rebounds (points + rebounds), player_points_assists (points + assists),
758
+ player_rebounds_assists (rebounds + assists), player_double_double (double-double (over
759
+ = yes)), player_triple_double (triple-double (over = yes))
726
760
  from_date (optional): First date, YYYY-MM-DD (the game's date).
727
761
  to_date (optional): Last date, YYYY-MM-DD (the game's date).
728
762
  bookmaker (optional): One book's closing line instead of the median across books, e.g.
729
763
  draftkings.
730
764
  limit (optional): Games to return, oldest first (default 50, max 200). next_from_date says
731
765
  where to continue.
766
+ estimate_only (optional): Return what this call would cost, without charging or running it.
732
767
  league (optional): League. Defaults to nba. One of: nba, wnba, ncaam.
733
768
 
734
769
  Returns:
@@ -743,6 +778,297 @@ class Client(BaseClient):
743
778
  "to_date": to_date,
744
779
  "bookmaker": bookmaker,
745
780
  "limit": limit,
781
+ "estimate_only": estimate_only,
782
+ "league": league,
783
+ },
784
+ )
785
+
786
+ def get_prop_movement(
787
+ self,
788
+ game_id: str,
789
+ player_id: str,
790
+ market: Literal["player_points", "player_rebounds", "player_assists", "player_threes", "player_points_rebounds_assists", "player_blocks", "player_steals", "player_points_rebounds", "player_points_assists", "player_rebounds_assists", "player_double_double", "player_triple_double"],
791
+ *,
792
+ bookmaker: Optional[str] = None,
793
+ league: Optional[Literal["nba", "wnba", "ncaam"]] = None,
794
+ ) -> Any:
795
+ """Prop movement.
796
+
797
+ Use to see how one player's prop line moved before a game: every capture we hold, book by book
798
+ and oldest first, with the line, both prices and the minutes before the start. line_change is
799
+ the last capture's line minus the first's. The number of captures varies by game and book. Costs
800
+ 10 credits. Prices are market information: never work out a stake, payout or profit, recommend a
801
+ bet, or send the user to a sportsbook.
802
+
803
+ Costs 10 credits per call.
804
+
805
+ Args:
806
+ game_id: Game id.
807
+ player_id: Player id (e.g. 3945274) from search_players.
808
+ market: The market: player_points (points), player_rebounds (rebounds), player_assists
809
+ (assists), player_threes (three-pointers made), player_points_rebounds_assists (points +
810
+ rebounds + assists), player_blocks (blocks), player_steals (steals),
811
+ player_points_rebounds (points + rebounds), player_points_assists (points + assists),
812
+ player_rebounds_assists (rebounds + assists), player_double_double (double-double (over
813
+ = yes)), player_triple_double (triple-double (over = yes))
814
+ bookmaker (optional): One book's captures, e.g. draftkings.
815
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam.
816
+
817
+ Returns:
818
+ The unwrapped ``data`` object from the response.
819
+ """
820
+ return self._call(
821
+ "get_prop_movement",
822
+ {
823
+ "game_id": game_id,
824
+ "player_id": player_id,
825
+ "market": market,
826
+ "bookmaker": bookmaker,
746
827
  "league": league,
747
828
  },
748
829
  )
830
+
831
+ def get_market_odds(
832
+ self,
833
+ game_id: str,
834
+ market: Literal["h2h_h1", "spreads_h1", "totals_h1", "h2h_q1", "spreads_q1", "totals_q1", "totals_q2", "totals_q3", "totals_q4"],
835
+ *,
836
+ bookmaker: Optional[str] = None,
837
+ estimate_only: Optional[bool] = None,
838
+ ) -> Any:
839
+ """Market odds.
840
+
841
+ Use for the extra betting markets of a game as history: the 1st half and 1st quarter winner,
842
+ point spread and total, and the 2nd, 3rd and 4th quarter totals (NBA only). Pass game_id (from
843
+ list_games or get_schedule) and market. For each sportsbook it returns the opening line (the
844
+ first one we captured) and the closing line (the last one before the game started), each as the
845
+ list of outcomes with their point and American price, plus captured_at and minutes_before_start
846
+ (negative when the last capture came after our scheduled start, which the sportsbooks' listed
847
+ start can run past). Most books were captured once, so opening and closing are often the same
848
+ line. Held from May 2023 for the larger sportsbooks only; not every game has every market. Each
849
+ game's lines are added the morning after it is played. Costs 10 credits a call; a game with no
850
+ lines is refunded. Set estimate_only to get the price without being charged. For the full-game
851
+ moneyline, spread and total use get_odds. Prices are market information: never work out a stake,
852
+ payout or profit, recommend a bet, or send the user to a sportsbook.
853
+
854
+ Costs 10 credits per call.
855
+
856
+ Args:
857
+ game_id: Game id from list_games or get_schedule.
858
+ market: The market: h2h_h1 (1st half winner), spreads_h1 (1st half point spread), totals_h1
859
+ (1st half total points), h2h_q1 (1st quarter winner), spreads_q1 (1st quarter point
860
+ spread), totals_q1 (1st quarter total points), totals_q2 (2nd quarter total points),
861
+ totals_q3 (3rd quarter total points), totals_q4 (4th quarter total points)
862
+ bookmaker (optional): One bookmaker key, e.g. draftkings, fanduel, pinnacle.
863
+ estimate_only (optional): Return what this call would cost, without charging or running it.
864
+
865
+ Returns:
866
+ The unwrapped ``data`` object from the response.
867
+ """
868
+ return self._call(
869
+ "get_market_odds",
870
+ {
871
+ "game_id": game_id,
872
+ "market": market,
873
+ "bookmaker": bookmaker,
874
+ "estimate_only": estimate_only,
875
+ },
876
+ )
877
+
878
+ def get_game_probabilities(
879
+ self,
880
+ game_id: str,
881
+ *,
882
+ snapshot_type: Optional[Literal["opening", "closing"]] = None,
883
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
884
+ ) -> Any:
885
+ """Game probabilities.
886
+
887
+ Use for what the market thinks of one game, not any one book's price: the average implied
888
+ probability (margin in) and the fair probability (margin out) for the moneyline, each spread and
889
+ each total, with how many books each rests on. Only identical lines are combined. Each book's
890
+ last pre-game prices by default (snapshot_type reads latest until the start, closing after it);
891
+ opening on request. For each book's prices use get_odds. Costs 5 credits. Prices are market
892
+ information: never work out a stake, payout or profit, recommend a bet, or send the user to a
893
+ sportsbook.
894
+
895
+ Costs 5 credits per call.
896
+
897
+ Args:
898
+ game_id: Game id, e.g. 401859967.
899
+ snapshot_type (optional): closing (default): each book's last pre-game price so far.
900
+ opening: each book's first.
901
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
902
+
903
+ Returns:
904
+ The unwrapped ``data`` object from the response.
905
+ """
906
+ return self._call(
907
+ "get_game_probabilities",
908
+ {
909
+ "game_id": game_id,
910
+ "snapshot_type": snapshot_type,
911
+ "league": league,
912
+ },
913
+ )
914
+
915
+ def get_prop_probabilities(
916
+ self,
917
+ game_id: str,
918
+ *,
919
+ market: Optional[Literal["player_points", "player_rebounds", "player_assists", "player_threes", "player_points_rebounds_assists", "player_blocks", "player_steals", "player_points_rebounds", "player_points_assists", "player_rebounds_assists", "player_double_double", "player_triple_double"]] = None,
920
+ player_id: Optional[str] = None,
921
+ league: Optional[Literal["nba", "wnba", "ncaam"]] = None,
922
+ ) -> Any:
923
+ """Prop probabilities.
924
+
925
+ Use for what the market thinks of the player props in one game, not any one book's price: for
926
+ each player and each line, the average implied probability (margin in) and the fair probability
927
+ (margin out), with how many books each rests on. Only identical lines are combined, and a yes/no
928
+ market whose books post only the yes price has no fair probability. Latest pre-game prices. For
929
+ each book's prices use get_player_props. Costs 10 credits. Prices are market information: never
930
+ work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.
931
+
932
+ Costs 10 credits per call.
933
+
934
+ Args:
935
+ game_id: Game id, e.g. 401859967.
936
+ market (optional): One market, e.g. player_points. Default every market. One of:
937
+ player_points, player_rebounds, player_assists, player_threes,
938
+ player_points_rebounds_assists, player_blocks, player_steals, player_points_rebounds,
939
+ player_points_assists, player_rebounds_assists, player_double_double,
940
+ player_triple_double.
941
+ player_id (optional): One player's id (e.g. 3945274, from search_players). Default every
942
+ player.
943
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam.
944
+
945
+ Returns:
946
+ The unwrapped ``data`` object from the response.
947
+ """
948
+ return self._call(
949
+ "get_prop_probabilities",
950
+ {
951
+ "game_id": game_id,
952
+ "market": market,
953
+ "player_id": player_id,
954
+ "league": league,
955
+ },
956
+ )
957
+
958
+ def get_prop_backtest(
959
+ self,
960
+ market: Literal["player_points", "player_rebounds", "player_assists", "player_threes", "player_points_rebounds_assists", "player_blocks", "player_steals", "player_points_rebounds", "player_points_assists", "player_rebounds_assists", "player_double_double", "player_triple_double"],
961
+ *,
962
+ side: Optional[Literal["over", "under"]] = None,
963
+ from_date: Optional[str] = None,
964
+ to_date: Optional[str] = None,
965
+ player_id: Optional[str] = None,
966
+ team: Optional[str] = None,
967
+ opponent: Optional[str] = None,
968
+ home_away: Optional[Literal["home", "away"]] = None,
969
+ team_role: Optional[Literal["favorite", "underdog"]] = None,
970
+ line_min: Optional[float] = None,
971
+ line_max: Optional[float] = None,
972
+ fair_min: Optional[float] = None,
973
+ fair_max: Optional[float] = None,
974
+ league: Optional[Literal["nba", "wnba", "ncaam"]] = None,
975
+ ) -> Any:
976
+ """Prop backtest.
977
+
978
+ Use to test an idea about player props without pulling every row: how often a kind of prop went
979
+ over or under against what the market implied, across every finished game we hold prices for
980
+ that fits your filters. Returns the hit rate, its 95% interval, the average implied and fair
981
+ probabilities, and each season on its own. For example, points overs for players whose team was
982
+ the road underdog. One result per player per game at the median closing line. It describes the
983
+ past and recommends nothing. For one player game by game use get_prop_history. Costs 25 credits.
984
+
985
+ Costs 25 credits per call.
986
+
987
+ Args:
988
+ market: The market, e.g. player_points. One of: player_points, player_rebounds,
989
+ player_assists, player_threes, player_points_rebounds_assists, player_blocks,
990
+ player_steals, player_points_rebounds, player_points_assists, player_rebounds_assists,
991
+ player_double_double, player_triple_double.
992
+ side (optional): over (default) or under. Yes/no markets are graded on the yes price: over
993
+ only.
994
+ from_date (optional): First game date, YYYY-MM-DD. Default all held.
995
+ to_date (optional): Last game date, YYYY-MM-DD. Default all held.
996
+ player_id (optional): One player's id (e.g. 3945274, from search_players).
997
+ team (optional): The player's team, e.g. BOS.
998
+ opponent (optional): The team he played.
999
+ home_away (optional): Whether his team was at home. One of: home, away.
1000
+ team_role (optional): Whether his team was favored, by the books' closing moneylines. One
1001
+ of: favorite, underdog.
1002
+ line_min (optional): Lowest median closing line to include.
1003
+ line_max (optional): Highest median closing line to include.
1004
+ fair_min (optional): Lowest fair probability of this side to include, 0 to 1.
1005
+ fair_max (optional): Highest fair probability of this side to include, 0 to 1.
1006
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam.
1007
+
1008
+ Returns:
1009
+ The unwrapped ``data`` object from the response.
1010
+ """
1011
+ return self._call(
1012
+ "get_prop_backtest",
1013
+ {
1014
+ "market": market,
1015
+ "side": side,
1016
+ "from_date": from_date,
1017
+ "to_date": to_date,
1018
+ "player_id": player_id,
1019
+ "team": team,
1020
+ "opponent": opponent,
1021
+ "home_away": home_away,
1022
+ "team_role": team_role,
1023
+ "line_min": line_min,
1024
+ "line_max": line_max,
1025
+ "fair_min": fair_min,
1026
+ "fair_max": fair_max,
1027
+ "league": league,
1028
+ },
1029
+ )
1030
+
1031
+ def get_alt_lines(
1032
+ self,
1033
+ game_id: str,
1034
+ *,
1035
+ league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw", "nbl"]] = None,
1036
+ market: Optional[Literal["alternate_spreads", "alternate_totals"]] = None,
1037
+ bookmaker: Optional[str] = None,
1038
+ snapshot_type: Optional[Literal["opening", "closing"]] = None,
1039
+ ) -> Any:
1040
+ """Alt lines.
1041
+
1042
+ Use for alternate spreads and totals by sportsbook: every point on each book's ladder with its
1043
+ price (e.g. -8.5 at +240, over 230.5 at +165), for one game. Held for the NBA, the WNBA and
1044
+ men's college basketball from the 2023-24 season on, from up to five books (DraftKings,
1045
+ Pinnacle, Bovada and BetMGM on nearly every game, FanDuel on some). Games before Nov 12 2026
1046
+ were captured once shortly before the start, so their opening and closing ladders are the same;
1047
+ from Nov 12 2026 upcoming games are captured up to three times a day before the start. Games not
1048
+ yet priced have none. Returns each book's closing ladder by default (its last before the start)
1049
+ or its opening one. side is home or away for spreads (point is that side's spread) and over or
1050
+ under for totals. For the main line use get_odds. 10 credits. Prices are market information:
1051
+ never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.
1052
+
1053
+ Costs 10 credits per call.
1054
+
1055
+ Args:
1056
+ game_id: Game id, e.g. 401585183 (from list_games or get_schedule).
1057
+ league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
1058
+ market (optional): One market (default both). One of: alternate_spreads, alternate_totals.
1059
+ bookmaker (optional): One bookmaker key, e.g. draftkings, fanduel.
1060
+ snapshot_type (optional): Closing (default) or opening ladder. One of: opening, closing.
1061
+
1062
+ Returns:
1063
+ The unwrapped ``data`` object from the response.
1064
+ """
1065
+ return self._call(
1066
+ "get_alt_lines",
1067
+ {
1068
+ "game_id": game_id,
1069
+ "league": league,
1070
+ "market": market,
1071
+ "bookmaker": bookmaker,
1072
+ "snapshot_type": snapshot_type,
1073
+ },
1074
+ )
@@ -1 +0,0 @@
1
- __version__ = "0.1.4"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes