propline 0.32.2 → 0.34.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/dist/index.d.cts CHANGED
@@ -17,6 +17,17 @@ interface Event {
17
17
  home_team: string;
18
18
  away_team: string;
19
19
  commence_time: string;
20
+ /**
21
+ * Event ids that were merged INTO this event when duplicate fixtures
22
+ * from different bookmakers were folded into one. Always present (there
23
+ * is no flag); `null`/absent for the large majority of events, which
24
+ * have never been merged.
25
+ *
26
+ * Use it to reconcile a stored id from a response you were already
27
+ * fetching. The alternative — re-requesting each saved id to see where
28
+ * it now resolves — costs one request per stored event.
29
+ */
30
+ merged_from_event_ids?: string[] | null;
20
31
  [k: string]: unknown;
21
32
  }
22
33
  interface Outcome {
@@ -134,6 +145,17 @@ interface OddsResponse {
134
145
  home_team: string;
135
146
  away_team: string;
136
147
  commence_time: string;
148
+ /**
149
+ * Event ids that were merged INTO this event when duplicate fixtures
150
+ * from different bookmakers were folded into one. Always present (there
151
+ * is no flag); `null`/absent for the large majority of events, which
152
+ * have never been merged.
153
+ *
154
+ * Use it to reconcile a stored id from a response you were already
155
+ * fetching. The alternative — re-requesting each saved id to see where
156
+ * it now resolves — costs one request per stored event.
157
+ */
158
+ merged_from_event_ids?: string[] | null;
137
159
  bookmakers: Bookmaker[];
138
160
  [k: string]: unknown;
139
161
  }
@@ -728,6 +750,78 @@ interface DfsPayoutsResponse {
728
750
  plays: DfsPlayPayout[];
729
751
  [k: string]: unknown;
730
752
  }
753
+ /**
754
+ * One placed bet submitted to `gradeClv`.
755
+ *
756
+ * `selection` is the subject: player name for a prop, team name for a
757
+ * game line. Set `side` ("Over" / "Under") for two-way markets; omit it
758
+ * for YES-only props where the player IS the outcome.
759
+ */
760
+ interface ClvBetInput {
761
+ /** Echoed back untouched, so rows can be aligned without relying on order. */
762
+ ref?: string | null;
763
+ sport_key: string;
764
+ event_id: number;
765
+ market: string;
766
+ bookmaker: string;
767
+ selection: string;
768
+ side?: string | null;
769
+ point?: number | null;
770
+ /** Canonical period code (q1, h1, p1, f5). Omit for full-game markets. */
771
+ period?: string | null;
772
+ /** American odds you took. */
773
+ price: number;
774
+ /** Defaults to 1 unit when computing `profit_units`. */
775
+ stake?: number | null;
776
+ }
777
+ /** One graded bet returned by `gradeClv`. */
778
+ interface ClvGradedBet extends ClvBetInput {
779
+ /**
780
+ * False whenever the bet could not be pinned to EXACTLY one stored
781
+ * outcome. Matching is fail-closed: a confident wrong match would report
782
+ * a real-looking CLV for a different bet, so ambiguity is refused.
783
+ */
784
+ matched: boolean;
785
+ unmatched_reason?: "event_not_found" | "no_market_for_key" | "no_outcome_for_selection" | "ambiguous_selection" | "no_closing_snapshot" | null;
786
+ closing_price?: number | null;
787
+ closing_point?: number | null;
788
+ closing_at?: string | null;
789
+ /** Book stopped quoting well before kickoff — advisory, not a hard filter. */
790
+ closing_is_stale: boolean;
791
+ /**
792
+ * False when the event had not started, i.e. the "closing" snapshot is
793
+ * just the latest price. These rows are excluded from summary averages.
794
+ */
795
+ closing_is_final: boolean;
796
+ /** Which book's closing pair the de-vig came from — NOT necessarily yours. */
797
+ fair_source?: string | null;
798
+ closing_fair_prob?: number | null;
799
+ /** Price-vs-price. Familiar and quotable, but vig-blind. */
800
+ clv_pct?: number | null;
801
+ /** Price vs the DE-VIGGED close. The honest number. */
802
+ ev_vs_close_pct?: number | null;
803
+ beat_close?: boolean | null;
804
+ resolution?: "won" | "lost" | "push" | "void" | null;
805
+ actual_value?: number | null;
806
+ }
807
+ interface ClvSummary {
808
+ bets: number;
809
+ matched: number;
810
+ unmatched: number;
811
+ graded: number;
812
+ /** Matched bets whose event has not started; excluded from the averages. */
813
+ pending: number;
814
+ avg_clv_pct?: number | null;
815
+ avg_ev_vs_close_pct?: number | null;
816
+ beat_close_pct?: number | null;
817
+ profit_units?: number | null;
818
+ }
819
+ interface ClvGradeResponse {
820
+ summary: ClvSummary;
821
+ bets: ClvGradedBet[];
822
+ redacted?: boolean;
823
+ upgrade_url?: string | null;
824
+ }
731
825
 
732
826
  /** Options for {@link PropLineClient.getDfsPayouts}. */
733
827
  interface GetDfsPayoutsOptions {
@@ -1448,6 +1542,53 @@ declare class PropLine {
1448
1542
  testWebhook(webhookId: number): Promise<unknown>;
1449
1543
  /** Last 50 (default) delivery attempts for a webhook. */
1450
1544
  listWebhookDeliveries(webhookId: number, options?: ListWebhookDeliveriesOptions): Promise<WebhookDelivery[]>;
1545
+ /**
1546
+ * Grade placed bets against their closing lines (CLV).
1547
+ *
1548
+ * Closing line value is the only durable proxy for whether a bettor has
1549
+ * edge: did the price you took beat the number the market settled on?
1550
+ * Send the bets you actually placed; each comes back with its closing
1551
+ * price, the de-vigged closing fair probability, CLV, and — once the
1552
+ * game settles — the graded result and actual stat value.
1553
+ *
1554
+ * Stateless: nothing is stored server-side.
1555
+ *
1556
+ * **Two CLV numbers are returned deliberately.** `clv_pct` is
1557
+ * price-vs-price — familiar and quotable, but vig-blind, so it flatters
1558
+ * a bet taken on the juicy side of a wide market. `ev_vs_close_pct`
1559
+ * scores your price against the DE-VIGGED close and is the honest one;
1560
+ * on a real bet the two came out +6.52% and +0.08%.
1561
+ *
1562
+ * The de-vig anchors to the **sharpest book quoting that line at close**
1563
+ * (`fair_source`), not the book you bet at — de-vigging your own book
1564
+ * always returns a negative number, because you paid its hold.
1565
+ *
1566
+ * Bets whose event has not started carry `closing_is_final: false`, land
1567
+ * in `summary.pending`, and are excluded from the summary averages:
1568
+ * before kickoff the "closing" price is just the latest price.
1569
+ *
1570
+ * Matching is fail-closed — a bet that cannot be pinned to exactly one
1571
+ * stored outcome returns `matched: false` with an `unmatched_reason`
1572
+ * rather than a confident wrong match. Max 500 bets per request.
1573
+ *
1574
+ * Hobby+ required; free tier receives the structure with numbers nulled.
1575
+ *
1576
+ * @example
1577
+ * const res = await client.gradeClv([{
1578
+ * ref: "b1",
1579
+ * sport_key: "baseball_mlb",
1580
+ * event_id: 150791,
1581
+ * market: "batter_hits_runs_rbis",
1582
+ * bookmaker: "lowvig",
1583
+ * selection: "Drake Baldwin",
1584
+ * side: "Under",
1585
+ * point: 0.5,
1586
+ * price: 145,
1587
+ * stake: 1,
1588
+ * }]);
1589
+ * console.log(res.summary.avg_ev_vs_close_pct);
1590
+ */
1591
+ gradeClv(bets: ClvBetInput[]): Promise<ClvGradeResponse>;
1451
1592
  /**
1452
1593
  * Verify that an inbound webhook delivery was signed by PropLine.
1453
1594
  *
@@ -1502,6 +1643,6 @@ declare const Bookmakers: {
1502
1643
  readonly PRIZEPICKS: "prizepicks";
1503
1644
  };
1504
1645
  type BookmakerKey = (typeof Bookmakers)[keyof typeof Bookmakers];
1505
- declare const VERSION = "0.32.2";
1646
+ declare const VERSION = "0.34.0";
1506
1647
 
1507
- export { AuthError, type BestLine, type BestLineSide, type BestPrice, type Bookmaker, type BookmakerKey, Bookmakers, type CalcEventEvOptions, type ClosingBookmaker, type ClosingMarket, type ClosingOutcome, type ContextResponse, type CreateWebhookOptions, type DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetMlbGrandSalamiOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, 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 PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerStat, type PlayerTrends, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type Sport, type StatsResponse, type SteamMove, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
1648
+ 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 DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetMlbGrandSalamiOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, 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 PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerStat, type PlayerTrends, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type Sport, type StatsResponse, type SteamMove, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
package/dist/index.d.ts CHANGED
@@ -17,6 +17,17 @@ interface Event {
17
17
  home_team: string;
18
18
  away_team: string;
19
19
  commence_time: string;
20
+ /**
21
+ * Event ids that were merged INTO this event when duplicate fixtures
22
+ * from different bookmakers were folded into one. Always present (there
23
+ * is no flag); `null`/absent for the large majority of events, which
24
+ * have never been merged.
25
+ *
26
+ * Use it to reconcile a stored id from a response you were already
27
+ * fetching. The alternative — re-requesting each saved id to see where
28
+ * it now resolves — costs one request per stored event.
29
+ */
30
+ merged_from_event_ids?: string[] | null;
20
31
  [k: string]: unknown;
21
32
  }
22
33
  interface Outcome {
@@ -134,6 +145,17 @@ interface OddsResponse {
134
145
  home_team: string;
135
146
  away_team: string;
136
147
  commence_time: string;
148
+ /**
149
+ * Event ids that were merged INTO this event when duplicate fixtures
150
+ * from different bookmakers were folded into one. Always present (there
151
+ * is no flag); `null`/absent for the large majority of events, which
152
+ * have never been merged.
153
+ *
154
+ * Use it to reconcile a stored id from a response you were already
155
+ * fetching. The alternative — re-requesting each saved id to see where
156
+ * it now resolves — costs one request per stored event.
157
+ */
158
+ merged_from_event_ids?: string[] | null;
137
159
  bookmakers: Bookmaker[];
138
160
  [k: string]: unknown;
139
161
  }
@@ -728,6 +750,78 @@ interface DfsPayoutsResponse {
728
750
  plays: DfsPlayPayout[];
729
751
  [k: string]: unknown;
730
752
  }
753
+ /**
754
+ * One placed bet submitted to `gradeClv`.
755
+ *
756
+ * `selection` is the subject: player name for a prop, team name for a
757
+ * game line. Set `side` ("Over" / "Under") for two-way markets; omit it
758
+ * for YES-only props where the player IS the outcome.
759
+ */
760
+ interface ClvBetInput {
761
+ /** Echoed back untouched, so rows can be aligned without relying on order. */
762
+ ref?: string | null;
763
+ sport_key: string;
764
+ event_id: number;
765
+ market: string;
766
+ bookmaker: string;
767
+ selection: string;
768
+ side?: string | null;
769
+ point?: number | null;
770
+ /** Canonical period code (q1, h1, p1, f5). Omit for full-game markets. */
771
+ period?: string | null;
772
+ /** American odds you took. */
773
+ price: number;
774
+ /** Defaults to 1 unit when computing `profit_units`. */
775
+ stake?: number | null;
776
+ }
777
+ /** One graded bet returned by `gradeClv`. */
778
+ interface ClvGradedBet extends ClvBetInput {
779
+ /**
780
+ * False whenever the bet could not be pinned to EXACTLY one stored
781
+ * outcome. Matching is fail-closed: a confident wrong match would report
782
+ * a real-looking CLV for a different bet, so ambiguity is refused.
783
+ */
784
+ matched: boolean;
785
+ unmatched_reason?: "event_not_found" | "no_market_for_key" | "no_outcome_for_selection" | "ambiguous_selection" | "no_closing_snapshot" | null;
786
+ closing_price?: number | null;
787
+ closing_point?: number | null;
788
+ closing_at?: string | null;
789
+ /** Book stopped quoting well before kickoff — advisory, not a hard filter. */
790
+ closing_is_stale: boolean;
791
+ /**
792
+ * False when the event had not started, i.e. the "closing" snapshot is
793
+ * just the latest price. These rows are excluded from summary averages.
794
+ */
795
+ closing_is_final: boolean;
796
+ /** Which book's closing pair the de-vig came from — NOT necessarily yours. */
797
+ fair_source?: string | null;
798
+ closing_fair_prob?: number | null;
799
+ /** Price-vs-price. Familiar and quotable, but vig-blind. */
800
+ clv_pct?: number | null;
801
+ /** Price vs the DE-VIGGED close. The honest number. */
802
+ ev_vs_close_pct?: number | null;
803
+ beat_close?: boolean | null;
804
+ resolution?: "won" | "lost" | "push" | "void" | null;
805
+ actual_value?: number | null;
806
+ }
807
+ interface ClvSummary {
808
+ bets: number;
809
+ matched: number;
810
+ unmatched: number;
811
+ graded: number;
812
+ /** Matched bets whose event has not started; excluded from the averages. */
813
+ pending: number;
814
+ avg_clv_pct?: number | null;
815
+ avg_ev_vs_close_pct?: number | null;
816
+ beat_close_pct?: number | null;
817
+ profit_units?: number | null;
818
+ }
819
+ interface ClvGradeResponse {
820
+ summary: ClvSummary;
821
+ bets: ClvGradedBet[];
822
+ redacted?: boolean;
823
+ upgrade_url?: string | null;
824
+ }
731
825
 
732
826
  /** Options for {@link PropLineClient.getDfsPayouts}. */
733
827
  interface GetDfsPayoutsOptions {
@@ -1448,6 +1542,53 @@ declare class PropLine {
1448
1542
  testWebhook(webhookId: number): Promise<unknown>;
1449
1543
  /** Last 50 (default) delivery attempts for a webhook. */
1450
1544
  listWebhookDeliveries(webhookId: number, options?: ListWebhookDeliveriesOptions): Promise<WebhookDelivery[]>;
1545
+ /**
1546
+ * Grade placed bets against their closing lines (CLV).
1547
+ *
1548
+ * Closing line value is the only durable proxy for whether a bettor has
1549
+ * edge: did the price you took beat the number the market settled on?
1550
+ * Send the bets you actually placed; each comes back with its closing
1551
+ * price, the de-vigged closing fair probability, CLV, and — once the
1552
+ * game settles — the graded result and actual stat value.
1553
+ *
1554
+ * Stateless: nothing is stored server-side.
1555
+ *
1556
+ * **Two CLV numbers are returned deliberately.** `clv_pct` is
1557
+ * price-vs-price — familiar and quotable, but vig-blind, so it flatters
1558
+ * a bet taken on the juicy side of a wide market. `ev_vs_close_pct`
1559
+ * scores your price against the DE-VIGGED close and is the honest one;
1560
+ * on a real bet the two came out +6.52% and +0.08%.
1561
+ *
1562
+ * The de-vig anchors to the **sharpest book quoting that line at close**
1563
+ * (`fair_source`), not the book you bet at — de-vigging your own book
1564
+ * always returns a negative number, because you paid its hold.
1565
+ *
1566
+ * Bets whose event has not started carry `closing_is_final: false`, land
1567
+ * in `summary.pending`, and are excluded from the summary averages:
1568
+ * before kickoff the "closing" price is just the latest price.
1569
+ *
1570
+ * Matching is fail-closed — a bet that cannot be pinned to exactly one
1571
+ * stored outcome returns `matched: false` with an `unmatched_reason`
1572
+ * rather than a confident wrong match. Max 500 bets per request.
1573
+ *
1574
+ * Hobby+ required; free tier receives the structure with numbers nulled.
1575
+ *
1576
+ * @example
1577
+ * const res = await client.gradeClv([{
1578
+ * ref: "b1",
1579
+ * sport_key: "baseball_mlb",
1580
+ * event_id: 150791,
1581
+ * market: "batter_hits_runs_rbis",
1582
+ * bookmaker: "lowvig",
1583
+ * selection: "Drake Baldwin",
1584
+ * side: "Under",
1585
+ * point: 0.5,
1586
+ * price: 145,
1587
+ * stake: 1,
1588
+ * }]);
1589
+ * console.log(res.summary.avg_ev_vs_close_pct);
1590
+ */
1591
+ gradeClv(bets: ClvBetInput[]): Promise<ClvGradeResponse>;
1451
1592
  /**
1452
1593
  * Verify that an inbound webhook delivery was signed by PropLine.
1453
1594
  *
@@ -1502,6 +1643,6 @@ declare const Bookmakers: {
1502
1643
  readonly PRIZEPICKS: "prizepicks";
1503
1644
  };
1504
1645
  type BookmakerKey = (typeof Bookmakers)[keyof typeof Bookmakers];
1505
- declare const VERSION = "0.32.2";
1646
+ declare const VERSION = "0.34.0";
1506
1647
 
1507
- export { AuthError, type BestLine, type BestLineSide, type BestPrice, type Bookmaker, type BookmakerKey, Bookmakers, type CalcEventEvOptions, type ClosingBookmaker, type ClosingMarket, type ClosingOutcome, type ContextResponse, type CreateWebhookOptions, type DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetMlbGrandSalamiOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, 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 PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerStat, type PlayerTrends, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type Sport, type StatsResponse, type SteamMove, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
1648
+ 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 DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetMlbGrandSalamiOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, 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 PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerStat, type PlayerTrends, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type Sport, type StatsResponse, type SteamMove, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
package/dist/index.js CHANGED
@@ -707,6 +707,55 @@ var PropLine = class {
707
707
  { params: { limit: options.limit ?? 50, before_id: options.beforeId } }
708
708
  );
709
709
  }
710
+ /**
711
+ * Grade placed bets against their closing lines (CLV).
712
+ *
713
+ * Closing line value is the only durable proxy for whether a bettor has
714
+ * edge: did the price you took beat the number the market settled on?
715
+ * Send the bets you actually placed; each comes back with its closing
716
+ * price, the de-vigged closing fair probability, CLV, and — once the
717
+ * game settles — the graded result and actual stat value.
718
+ *
719
+ * Stateless: nothing is stored server-side.
720
+ *
721
+ * **Two CLV numbers are returned deliberately.** `clv_pct` is
722
+ * price-vs-price — familiar and quotable, but vig-blind, so it flatters
723
+ * a bet taken on the juicy side of a wide market. `ev_vs_close_pct`
724
+ * scores your price against the DE-VIGGED close and is the honest one;
725
+ * on a real bet the two came out +6.52% and +0.08%.
726
+ *
727
+ * The de-vig anchors to the **sharpest book quoting that line at close**
728
+ * (`fair_source`), not the book you bet at — de-vigging your own book
729
+ * always returns a negative number, because you paid its hold.
730
+ *
731
+ * Bets whose event has not started carry `closing_is_final: false`, land
732
+ * in `summary.pending`, and are excluded from the summary averages:
733
+ * before kickoff the "closing" price is just the latest price.
734
+ *
735
+ * Matching is fail-closed — a bet that cannot be pinned to exactly one
736
+ * stored outcome returns `matched: false` with an `unmatched_reason`
737
+ * rather than a confident wrong match. Max 500 bets per request.
738
+ *
739
+ * Hobby+ required; free tier receives the structure with numbers nulled.
740
+ *
741
+ * @example
742
+ * const res = await client.gradeClv([{
743
+ * ref: "b1",
744
+ * sport_key: "baseball_mlb",
745
+ * event_id: 150791,
746
+ * market: "batter_hits_runs_rbis",
747
+ * bookmaker: "lowvig",
748
+ * selection: "Drake Baldwin",
749
+ * side: "Under",
750
+ * point: 0.5,
751
+ * price: 145,
752
+ * stake: 1,
753
+ * }]);
754
+ * console.log(res.summary.avg_ev_vs_close_pct);
755
+ */
756
+ gradeClv(bets) {
757
+ return this._request("POST", "/clv/grade", { body: bets });
758
+ }
710
759
  /**
711
760
  * Verify that an inbound webhook delivery was signed by PropLine.
712
761
  *
@@ -797,7 +846,7 @@ var Bookmakers = {
797
846
  POLYMARKET: "polymarket",
798
847
  PRIZEPICKS: "prizepicks"
799
848
  };
800
- var VERSION = "0.32.2";
849
+ var VERSION = "0.34.0";
801
850
  export {
802
851
  AuthError,
803
852
  Bookmakers,