propline 0.55.0 → 0.57.0
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.
- package/README.md +27 -0
- package/dist/index.cjs +36 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -3
- package/dist/index.d.ts +59 -3
- package/dist/index.js +36 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -765,6 +765,21 @@ interface ResultsResponse {
|
|
|
765
765
|
upgrade_url?: string;
|
|
766
766
|
[k: string]: unknown;
|
|
767
767
|
}
|
|
768
|
+
/** One match from {@link PropLine.searchPlayers}. */
|
|
769
|
+
interface PlayerSearchResult {
|
|
770
|
+
/** Stable id, usable in place of a name on history/trends (e.g. `"mlb:677951"`). */
|
|
771
|
+
player_id: string;
|
|
772
|
+
name: string;
|
|
773
|
+
/** Every spelling the books use for this player. */
|
|
774
|
+
known_names: string[];
|
|
775
|
+
[k: string]: unknown;
|
|
776
|
+
}
|
|
777
|
+
interface PlayerSearchResponse {
|
|
778
|
+
sport_key: string;
|
|
779
|
+
search: string;
|
|
780
|
+
players: PlayerSearchResult[];
|
|
781
|
+
[k: string]: unknown;
|
|
782
|
+
}
|
|
768
783
|
interface PlayerHistoryEntry {
|
|
769
784
|
event_id: number | string;
|
|
770
785
|
commence_time: string;
|
|
@@ -779,11 +794,17 @@ interface PlayerHistoryEntry {
|
|
|
779
794
|
over_result: "won" | "lost" | "push" | "void" | null;
|
|
780
795
|
under_result: "won" | "lost" | "push" | "void" | null;
|
|
781
796
|
resolved_at: string | null;
|
|
797
|
+
/** True when this line is the book's main line (not an alt-ladder rung). */
|
|
798
|
+
is_main_line?: boolean;
|
|
799
|
+
/** True when the book moved this line after the game started. */
|
|
800
|
+
line_moved_in_play?: boolean;
|
|
782
801
|
redacted?: boolean;
|
|
783
802
|
[k: string]: unknown;
|
|
784
803
|
}
|
|
785
804
|
interface PlayerHistoryResponse {
|
|
786
805
|
player_name: string;
|
|
806
|
+
/** Stable player id (e.g. `"mlb:677951"`), or `null` when unknown. */
|
|
807
|
+
player_id?: string | null;
|
|
787
808
|
sport_key: string;
|
|
788
809
|
market: string;
|
|
789
810
|
entries: PlayerHistoryEntry[];
|
|
@@ -834,6 +855,8 @@ interface PlayerMarketTrend {
|
|
|
834
855
|
}
|
|
835
856
|
interface PlayerTrends {
|
|
836
857
|
player_name: string;
|
|
858
|
+
/** Stable player id (e.g. `"mlb:592450"`), or `null` when unknown. */
|
|
859
|
+
player_id?: string | null;
|
|
837
860
|
sport_key: string;
|
|
838
861
|
/**
|
|
839
862
|
* Echo of the `dfs_odds_type` filter that scoped these trends (PrizePicks
|
|
@@ -870,6 +893,8 @@ interface PlayerGame {
|
|
|
870
893
|
}
|
|
871
894
|
interface PlayerGameLog {
|
|
872
895
|
player_name: string;
|
|
896
|
+
/** Stable cross-book player id (e.g. `"mlb:677951"`); null when none yet. */
|
|
897
|
+
player_id: string | null;
|
|
873
898
|
sport_key: string;
|
|
874
899
|
/** Echo of the `opponent` filter, or null. */
|
|
875
900
|
opponent: string | null;
|
|
@@ -1574,6 +1599,12 @@ interface GetPlayerHistoryOptions {
|
|
|
1574
1599
|
bookmaker?: string;
|
|
1575
1600
|
/** Max entries (1-100). Default 20. */
|
|
1576
1601
|
limit?: number;
|
|
1602
|
+
/** Only each book's main line (drops alt-ladder rungs). */
|
|
1603
|
+
mainLineOnly?: boolean;
|
|
1604
|
+
}
|
|
1605
|
+
interface SearchPlayersOptions {
|
|
1606
|
+
/** Max players (1-100). Server default 25. */
|
|
1607
|
+
limit?: number;
|
|
1577
1608
|
}
|
|
1578
1609
|
interface GetPlayerGamesOptions {
|
|
1579
1610
|
/** Games to return, 1-100. Default 20. */
|
|
@@ -1635,6 +1666,13 @@ interface GetEventEvOptions {
|
|
|
1635
1666
|
* on a +600 anytime scorer. The response echoes it as `devig_method`.
|
|
1636
1667
|
*/
|
|
1637
1668
|
devig?: "multiplicative" | "shin";
|
|
1669
|
+
/**
|
|
1670
|
+
* Override the fair-line anchor: one book or a list tried IN ORDER per
|
|
1671
|
+
* line, from `pinnacle`, `polymarket`, `kalshi`, `bovada`, `smarkets`.
|
|
1672
|
+
* A line none of them anchors is dropped; any other value is a 400.
|
|
1673
|
+
* Omit for the default order.
|
|
1674
|
+
*/
|
|
1675
|
+
fairSource?: string | string[];
|
|
1638
1676
|
}
|
|
1639
1677
|
interface GetEventBestLineOptions {
|
|
1640
1678
|
/**
|
|
@@ -1993,10 +2031,24 @@ declare class PropLine {
|
|
|
1993
2031
|
* Pro tier: full data. Free tier: redacted (resolution + actual nulled).
|
|
1994
2032
|
*/
|
|
1995
2033
|
getResults(sport: string, eventId: number | string, options?: GetResultsOptions): Promise<ResultsResponse>;
|
|
2034
|
+
/**
|
|
2035
|
+
* Search players by name fragment and get their stable `player_id`.
|
|
2036
|
+
* Free tier. Pass the id in place of a name to {@link getPlayerHistory}
|
|
2037
|
+
* or {@link getPlayerTrends}.
|
|
2038
|
+
*
|
|
2039
|
+
* @example
|
|
2040
|
+
* ```ts
|
|
2041
|
+
* const res = await client.searchPlayers("baseball_mlb", "judge", { limit: 5 });
|
|
2042
|
+
* for (const p of res.players) console.log(p.player_id, p.name, p.known_names);
|
|
2043
|
+
* ```
|
|
2044
|
+
*/
|
|
2045
|
+
searchPlayers(sport: string, search: string, options?: SearchPlayersOptions): Promise<PlayerSearchResponse>;
|
|
1996
2046
|
/**
|
|
1997
2047
|
* Recent resolved prop history for a player on a market.
|
|
1998
2048
|
*
|
|
1999
2049
|
* One entry per (event, bookmaker) pair. Pro: full. Free: redacted.
|
|
2050
|
+
* `playerName` may be a name or a `player_id` like `"mlb:677951"`
|
|
2051
|
+
* (see {@link searchPlayers}).
|
|
2000
2052
|
*/
|
|
2001
2053
|
getPlayerHistory(sport: string, playerName: string, options: GetPlayerHistoryOptions): Promise<PlayerHistoryResponse>;
|
|
2002
2054
|
/**
|
|
@@ -2011,6 +2063,9 @@ declare class PropLine {
|
|
|
2011
2063
|
* built from {@link getPlayerHistory} or {@link getPlayerTrends}. Carries
|
|
2012
2064
|
* no line, price or grade.
|
|
2013
2065
|
*
|
|
2066
|
+
* `playerName` may also be a stable `player_id` (e.g. `"mlb:677951"`),
|
|
2067
|
+
* which skips name matching; the response carries it back as `player_id`.
|
|
2068
|
+
*
|
|
2014
2069
|
* @example
|
|
2015
2070
|
* ```ts
|
|
2016
2071
|
* const log = await client.getPlayerGames("baseball_mlb", "Aaron Judge", { limit: 10 });
|
|
@@ -2029,7 +2084,8 @@ declare class PropLine {
|
|
|
2029
2084
|
*
|
|
2030
2085
|
* Returns over/under/push splits over the last 5/10/20/50 graded games,
|
|
2031
2086
|
* the current streak, and the most recent game per market. Pro: full.
|
|
2032
|
-
* Free: redacted.
|
|
2087
|
+
* Free: redacted. `playerName` may be a name or a `player_id` like
|
|
2088
|
+
* `"mlb:592450"` (see {@link searchPlayers}).
|
|
2033
2089
|
*/
|
|
2034
2090
|
getPlayerTrends(sportKey: string, playerName: string, options?: GetPlayerTrendsOptions): Promise<PlayerTrends>;
|
|
2035
2091
|
/**
|
|
@@ -2417,6 +2473,6 @@ declare const Bookmakers: {
|
|
|
2417
2473
|
readonly PRIZEPICKS: "prizepicks";
|
|
2418
2474
|
};
|
|
2419
2475
|
type BookmakerKey = (typeof Bookmakers)[keyof typeof Bookmakers];
|
|
2420
|
-
declare const VERSION = "0.
|
|
2476
|
+
declare const VERSION = "0.57.0";
|
|
2421
2477
|
|
|
2422
|
-
export { AuthError, type BestLine, type BestLineSide, type BestPrice, type Bookmaker, type BookmakerKey, Bookmakers, type CalcEventEvOptions, type ClosingBookmaker, type ClosingMarket, type ClosingOutcome, type ClvBetInput, type ClvGradeResponse, type ClvGradedBet, type ClvSummary, type ContextResponse, type CreateWebhookOptions, type DepthLevel, type DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type EventProjectionsResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetEventProjectionsOptions, type GetMlbGrandSalamiOptions, type GetMovementOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerGamesOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, type LineMovementPrice, type LineMovementWebhookPayload, type ListWebhookDeliveriesOptions, type Market, type MarketSummary, type MlbGrandSalamiBook, type MlbGrandSalamiResponse, type MovementBookmaker, type MovementMarket, type MovementOutcome, type MovementResponse, type NhlDailyGoalsTotalBook, type NhlDailyGoalsTotalResponse, type OddsClosingResponse, type OddsHistoryBookmaker, type OddsHistoryMarket, type OddsHistoryOutcome, type OddsHistoryResponse, type OddsResponse, type Outcome, type OutcomeSnapshot, type PeriodFilter, type PlayerGame, type PlayerGameLog, type PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerStat, type PlayerTrends, type ProjectionRow, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ReplayEvent, type ReplayPage, type ReplayWebhookEventsOptions, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type SgpBookError, type SgpLegInput, type SgpLegQuote, type SgpMultiQuoteResponse, type SgpQuoteResponse, type Sport, type StatsResponse, type SteamMove, type SteamWebhookPayload, type StreamOptions, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
|
|
2478
|
+
export { AuthError, type BestLine, type BestLineSide, type BestPrice, type Bookmaker, type BookmakerKey, Bookmakers, type CalcEventEvOptions, type ClosingBookmaker, type ClosingMarket, type ClosingOutcome, type ClvBetInput, type ClvGradeResponse, type ClvGradedBet, type ClvSummary, type ContextResponse, type CreateWebhookOptions, type DepthLevel, type DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type EventProjectionsResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetEventProjectionsOptions, type GetMlbGrandSalamiOptions, type GetMovementOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerGamesOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, type LineMovementPrice, type LineMovementWebhookPayload, type ListWebhookDeliveriesOptions, type Market, type MarketSummary, type MlbGrandSalamiBook, type MlbGrandSalamiResponse, type MovementBookmaker, type MovementMarket, type MovementOutcome, type MovementResponse, type NhlDailyGoalsTotalBook, type NhlDailyGoalsTotalResponse, type OddsClosingResponse, type OddsHistoryBookmaker, type OddsHistoryMarket, type OddsHistoryOutcome, type OddsHistoryResponse, type OddsResponse, type Outcome, type OutcomeSnapshot, type PeriodFilter, type PlayerGame, type PlayerGameLog, type PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerSearchResponse, type PlayerSearchResult, type PlayerStat, type PlayerTrends, type ProjectionRow, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ReplayEvent, type ReplayPage, type ReplayWebhookEventsOptions, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type SearchPlayersOptions, type SgpBookError, type SgpLegInput, type SgpLegQuote, type SgpMultiQuoteResponse, type SgpQuoteResponse, type Sport, type StatsResponse, type SteamMove, type SteamWebhookPayload, type StreamOptions, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
|
package/dist/index.d.ts
CHANGED
|
@@ -765,6 +765,21 @@ interface ResultsResponse {
|
|
|
765
765
|
upgrade_url?: string;
|
|
766
766
|
[k: string]: unknown;
|
|
767
767
|
}
|
|
768
|
+
/** One match from {@link PropLine.searchPlayers}. */
|
|
769
|
+
interface PlayerSearchResult {
|
|
770
|
+
/** Stable id, usable in place of a name on history/trends (e.g. `"mlb:677951"`). */
|
|
771
|
+
player_id: string;
|
|
772
|
+
name: string;
|
|
773
|
+
/** Every spelling the books use for this player. */
|
|
774
|
+
known_names: string[];
|
|
775
|
+
[k: string]: unknown;
|
|
776
|
+
}
|
|
777
|
+
interface PlayerSearchResponse {
|
|
778
|
+
sport_key: string;
|
|
779
|
+
search: string;
|
|
780
|
+
players: PlayerSearchResult[];
|
|
781
|
+
[k: string]: unknown;
|
|
782
|
+
}
|
|
768
783
|
interface PlayerHistoryEntry {
|
|
769
784
|
event_id: number | string;
|
|
770
785
|
commence_time: string;
|
|
@@ -779,11 +794,17 @@ interface PlayerHistoryEntry {
|
|
|
779
794
|
over_result: "won" | "lost" | "push" | "void" | null;
|
|
780
795
|
under_result: "won" | "lost" | "push" | "void" | null;
|
|
781
796
|
resolved_at: string | null;
|
|
797
|
+
/** True when this line is the book's main line (not an alt-ladder rung). */
|
|
798
|
+
is_main_line?: boolean;
|
|
799
|
+
/** True when the book moved this line after the game started. */
|
|
800
|
+
line_moved_in_play?: boolean;
|
|
782
801
|
redacted?: boolean;
|
|
783
802
|
[k: string]: unknown;
|
|
784
803
|
}
|
|
785
804
|
interface PlayerHistoryResponse {
|
|
786
805
|
player_name: string;
|
|
806
|
+
/** Stable player id (e.g. `"mlb:677951"`), or `null` when unknown. */
|
|
807
|
+
player_id?: string | null;
|
|
787
808
|
sport_key: string;
|
|
788
809
|
market: string;
|
|
789
810
|
entries: PlayerHistoryEntry[];
|
|
@@ -834,6 +855,8 @@ interface PlayerMarketTrend {
|
|
|
834
855
|
}
|
|
835
856
|
interface PlayerTrends {
|
|
836
857
|
player_name: string;
|
|
858
|
+
/** Stable player id (e.g. `"mlb:592450"`), or `null` when unknown. */
|
|
859
|
+
player_id?: string | null;
|
|
837
860
|
sport_key: string;
|
|
838
861
|
/**
|
|
839
862
|
* Echo of the `dfs_odds_type` filter that scoped these trends (PrizePicks
|
|
@@ -870,6 +893,8 @@ interface PlayerGame {
|
|
|
870
893
|
}
|
|
871
894
|
interface PlayerGameLog {
|
|
872
895
|
player_name: string;
|
|
896
|
+
/** Stable cross-book player id (e.g. `"mlb:677951"`); null when none yet. */
|
|
897
|
+
player_id: string | null;
|
|
873
898
|
sport_key: string;
|
|
874
899
|
/** Echo of the `opponent` filter, or null. */
|
|
875
900
|
opponent: string | null;
|
|
@@ -1574,6 +1599,12 @@ interface GetPlayerHistoryOptions {
|
|
|
1574
1599
|
bookmaker?: string;
|
|
1575
1600
|
/** Max entries (1-100). Default 20. */
|
|
1576
1601
|
limit?: number;
|
|
1602
|
+
/** Only each book's main line (drops alt-ladder rungs). */
|
|
1603
|
+
mainLineOnly?: boolean;
|
|
1604
|
+
}
|
|
1605
|
+
interface SearchPlayersOptions {
|
|
1606
|
+
/** Max players (1-100). Server default 25. */
|
|
1607
|
+
limit?: number;
|
|
1577
1608
|
}
|
|
1578
1609
|
interface GetPlayerGamesOptions {
|
|
1579
1610
|
/** Games to return, 1-100. Default 20. */
|
|
@@ -1635,6 +1666,13 @@ interface GetEventEvOptions {
|
|
|
1635
1666
|
* on a +600 anytime scorer. The response echoes it as `devig_method`.
|
|
1636
1667
|
*/
|
|
1637
1668
|
devig?: "multiplicative" | "shin";
|
|
1669
|
+
/**
|
|
1670
|
+
* Override the fair-line anchor: one book or a list tried IN ORDER per
|
|
1671
|
+
* line, from `pinnacle`, `polymarket`, `kalshi`, `bovada`, `smarkets`.
|
|
1672
|
+
* A line none of them anchors is dropped; any other value is a 400.
|
|
1673
|
+
* Omit for the default order.
|
|
1674
|
+
*/
|
|
1675
|
+
fairSource?: string | string[];
|
|
1638
1676
|
}
|
|
1639
1677
|
interface GetEventBestLineOptions {
|
|
1640
1678
|
/**
|
|
@@ -1993,10 +2031,24 @@ declare class PropLine {
|
|
|
1993
2031
|
* Pro tier: full data. Free tier: redacted (resolution + actual nulled).
|
|
1994
2032
|
*/
|
|
1995
2033
|
getResults(sport: string, eventId: number | string, options?: GetResultsOptions): Promise<ResultsResponse>;
|
|
2034
|
+
/**
|
|
2035
|
+
* Search players by name fragment and get their stable `player_id`.
|
|
2036
|
+
* Free tier. Pass the id in place of a name to {@link getPlayerHistory}
|
|
2037
|
+
* or {@link getPlayerTrends}.
|
|
2038
|
+
*
|
|
2039
|
+
* @example
|
|
2040
|
+
* ```ts
|
|
2041
|
+
* const res = await client.searchPlayers("baseball_mlb", "judge", { limit: 5 });
|
|
2042
|
+
* for (const p of res.players) console.log(p.player_id, p.name, p.known_names);
|
|
2043
|
+
* ```
|
|
2044
|
+
*/
|
|
2045
|
+
searchPlayers(sport: string, search: string, options?: SearchPlayersOptions): Promise<PlayerSearchResponse>;
|
|
1996
2046
|
/**
|
|
1997
2047
|
* Recent resolved prop history for a player on a market.
|
|
1998
2048
|
*
|
|
1999
2049
|
* One entry per (event, bookmaker) pair. Pro: full. Free: redacted.
|
|
2050
|
+
* `playerName` may be a name or a `player_id` like `"mlb:677951"`
|
|
2051
|
+
* (see {@link searchPlayers}).
|
|
2000
2052
|
*/
|
|
2001
2053
|
getPlayerHistory(sport: string, playerName: string, options: GetPlayerHistoryOptions): Promise<PlayerHistoryResponse>;
|
|
2002
2054
|
/**
|
|
@@ -2011,6 +2063,9 @@ declare class PropLine {
|
|
|
2011
2063
|
* built from {@link getPlayerHistory} or {@link getPlayerTrends}. Carries
|
|
2012
2064
|
* no line, price or grade.
|
|
2013
2065
|
*
|
|
2066
|
+
* `playerName` may also be a stable `player_id` (e.g. `"mlb:677951"`),
|
|
2067
|
+
* which skips name matching; the response carries it back as `player_id`.
|
|
2068
|
+
*
|
|
2014
2069
|
* @example
|
|
2015
2070
|
* ```ts
|
|
2016
2071
|
* const log = await client.getPlayerGames("baseball_mlb", "Aaron Judge", { limit: 10 });
|
|
@@ -2029,7 +2084,8 @@ declare class PropLine {
|
|
|
2029
2084
|
*
|
|
2030
2085
|
* Returns over/under/push splits over the last 5/10/20/50 graded games,
|
|
2031
2086
|
* the current streak, and the most recent game per market. Pro: full.
|
|
2032
|
-
* Free: redacted.
|
|
2087
|
+
* Free: redacted. `playerName` may be a name or a `player_id` like
|
|
2088
|
+
* `"mlb:592450"` (see {@link searchPlayers}).
|
|
2033
2089
|
*/
|
|
2034
2090
|
getPlayerTrends(sportKey: string, playerName: string, options?: GetPlayerTrendsOptions): Promise<PlayerTrends>;
|
|
2035
2091
|
/**
|
|
@@ -2417,6 +2473,6 @@ declare const Bookmakers: {
|
|
|
2417
2473
|
readonly PRIZEPICKS: "prizepicks";
|
|
2418
2474
|
};
|
|
2419
2475
|
type BookmakerKey = (typeof Bookmakers)[keyof typeof Bookmakers];
|
|
2420
|
-
declare const VERSION = "0.
|
|
2476
|
+
declare const VERSION = "0.57.0";
|
|
2421
2477
|
|
|
2422
|
-
export { AuthError, type BestLine, type BestLineSide, type BestPrice, type Bookmaker, type BookmakerKey, Bookmakers, type CalcEventEvOptions, type ClosingBookmaker, type ClosingMarket, type ClosingOutcome, type ClvBetInput, type ClvGradeResponse, type ClvGradedBet, type ClvSummary, type ContextResponse, type CreateWebhookOptions, type DepthLevel, type DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type EventProjectionsResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetEventProjectionsOptions, type GetMlbGrandSalamiOptions, type GetMovementOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerGamesOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, type LineMovementPrice, type LineMovementWebhookPayload, type ListWebhookDeliveriesOptions, type Market, type MarketSummary, type MlbGrandSalamiBook, type MlbGrandSalamiResponse, type MovementBookmaker, type MovementMarket, type MovementOutcome, type MovementResponse, type NhlDailyGoalsTotalBook, type NhlDailyGoalsTotalResponse, type OddsClosingResponse, type OddsHistoryBookmaker, type OddsHistoryMarket, type OddsHistoryOutcome, type OddsHistoryResponse, type OddsResponse, type Outcome, type OutcomeSnapshot, type PeriodFilter, type PlayerGame, type PlayerGameLog, type PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerStat, type PlayerTrends, type ProjectionRow, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ReplayEvent, type ReplayPage, type ReplayWebhookEventsOptions, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type SgpBookError, type SgpLegInput, type SgpLegQuote, type SgpMultiQuoteResponse, type SgpQuoteResponse, type Sport, type StatsResponse, type SteamMove, type SteamWebhookPayload, type StreamOptions, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
|
|
2478
|
+
export { AuthError, type BestLine, type BestLineSide, type BestPrice, type Bookmaker, type BookmakerKey, Bookmakers, type CalcEventEvOptions, type ClosingBookmaker, type ClosingMarket, type ClosingOutcome, type ClvBetInput, type ClvGradeResponse, type ClvGradedBet, type ClvSummary, type ContextResponse, type CreateWebhookOptions, type DepthLevel, type DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type EventProjectionsResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetEventProjectionsOptions, type GetMlbGrandSalamiOptions, type GetMovementOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerGamesOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, type LineMovementPrice, type LineMovementWebhookPayload, type ListWebhookDeliveriesOptions, type Market, type MarketSummary, type MlbGrandSalamiBook, type MlbGrandSalamiResponse, type MovementBookmaker, type MovementMarket, type MovementOutcome, type MovementResponse, type NhlDailyGoalsTotalBook, type NhlDailyGoalsTotalResponse, type OddsClosingResponse, type OddsHistoryBookmaker, type OddsHistoryMarket, type OddsHistoryOutcome, type OddsHistoryResponse, type OddsResponse, type Outcome, type OutcomeSnapshot, type PeriodFilter, type PlayerGame, type PlayerGameLog, type PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerSearchResponse, type PlayerSearchResult, type PlayerStat, type PlayerTrends, type ProjectionRow, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ReplayEvent, type ReplayPage, type ReplayWebhookEventsOptions, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type SearchPlayersOptions, type SgpBookError, type SgpLegInput, type SgpLegQuote, type SgpMultiQuoteResponse, type SgpQuoteResponse, type Sport, type StatsResponse, type SteamMove, type SteamWebhookPayload, type StreamOptions, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
|
package/dist/index.js
CHANGED
|
@@ -413,10 +413,34 @@ var PropLine = class {
|
|
|
413
413
|
{ params }
|
|
414
414
|
);
|
|
415
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* Search players by name fragment and get their stable `player_id`.
|
|
418
|
+
* Free tier. Pass the id in place of a name to {@link getPlayerHistory}
|
|
419
|
+
* or {@link getPlayerTrends}.
|
|
420
|
+
*
|
|
421
|
+
* @example
|
|
422
|
+
* ```ts
|
|
423
|
+
* const res = await client.searchPlayers("baseball_mlb", "judge", { limit: 5 });
|
|
424
|
+
* for (const p of res.players) console.log(p.player_id, p.name, p.known_names);
|
|
425
|
+
* ```
|
|
426
|
+
*/
|
|
427
|
+
searchPlayers(sport, search, options = {}) {
|
|
428
|
+
const params = { search };
|
|
429
|
+
if (options.limit !== void 0) {
|
|
430
|
+
params.limit = options.limit;
|
|
431
|
+
}
|
|
432
|
+
return this._request(
|
|
433
|
+
"GET",
|
|
434
|
+
`/sports/${encodeURIComponent(sport)}/players`,
|
|
435
|
+
{ params }
|
|
436
|
+
);
|
|
437
|
+
}
|
|
416
438
|
/**
|
|
417
439
|
* Recent resolved prop history for a player on a market.
|
|
418
440
|
*
|
|
419
441
|
* One entry per (event, bookmaker) pair. Pro: full. Free: redacted.
|
|
442
|
+
* `playerName` may be a name or a `player_id` like `"mlb:677951"`
|
|
443
|
+
* (see {@link searchPlayers}).
|
|
420
444
|
*/
|
|
421
445
|
getPlayerHistory(sport, playerName, options) {
|
|
422
446
|
const params = {
|
|
@@ -426,6 +450,9 @@ var PropLine = class {
|
|
|
426
450
|
if (options.bookmaker) {
|
|
427
451
|
params.bookmaker = options.bookmaker;
|
|
428
452
|
}
|
|
453
|
+
if (options.mainLineOnly !== void 0) {
|
|
454
|
+
params.main_line_only = options.mainLineOnly ? "true" : "false";
|
|
455
|
+
}
|
|
429
456
|
return this._request(
|
|
430
457
|
"GET",
|
|
431
458
|
`/sports/${encodeURIComponent(sport)}/players/${encodeURIComponent(playerName)}/history`,
|
|
@@ -444,6 +471,9 @@ var PropLine = class {
|
|
|
444
471
|
* built from {@link getPlayerHistory} or {@link getPlayerTrends}. Carries
|
|
445
472
|
* no line, price or grade.
|
|
446
473
|
*
|
|
474
|
+
* `playerName` may also be a stable `player_id` (e.g. `"mlb:677951"`),
|
|
475
|
+
* which skips name matching; the response carries it back as `player_id`.
|
|
476
|
+
*
|
|
447
477
|
* @example
|
|
448
478
|
* ```ts
|
|
449
479
|
* const log = await client.getPlayerGames("baseball_mlb", "Aaron Judge", { limit: 10 });
|
|
@@ -477,7 +507,8 @@ var PropLine = class {
|
|
|
477
507
|
*
|
|
478
508
|
* Returns over/under/push splits over the last 5/10/20/50 graded games,
|
|
479
509
|
* the current streak, and the most recent game per market. Pro: full.
|
|
480
|
-
* Free: redacted.
|
|
510
|
+
* Free: redacted. `playerName` may be a name or a `player_id` like
|
|
511
|
+
* `"mlb:592450"` (see {@link searchPlayers}).
|
|
481
512
|
*/
|
|
482
513
|
getPlayerTrends(sportKey, playerName, options = {}) {
|
|
483
514
|
const params = {};
|
|
@@ -587,6 +618,9 @@ var PropLine = class {
|
|
|
587
618
|
params.bookmakers = Array.isArray(options.bookmakers) ? options.bookmakers.join(",") : options.bookmakers;
|
|
588
619
|
}
|
|
589
620
|
if (options.devig) params.devig = options.devig;
|
|
621
|
+
if (options.fairSource) {
|
|
622
|
+
params.fair_source = Array.isArray(options.fairSource) ? options.fairSource.join(",") : options.fairSource;
|
|
623
|
+
}
|
|
590
624
|
return this._request(
|
|
591
625
|
"GET",
|
|
592
626
|
`/sports/${encodeURIComponent(sport)}/events/${encodeURIComponent(String(eventId))}/ev`,
|
|
@@ -1080,7 +1114,7 @@ var Bookmakers = {
|
|
|
1080
1114
|
POLYMARKET: "polymarket",
|
|
1081
1115
|
PRIZEPICKS: "prizepicks"
|
|
1082
1116
|
};
|
|
1083
|
-
var VERSION = "0.
|
|
1117
|
+
var VERSION = "0.57.0";
|
|
1084
1118
|
export {
|
|
1085
1119
|
AuthError,
|
|
1086
1120
|
Bookmakers,
|