propline 0.68.1 → 0.70.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 CHANGED
@@ -612,6 +612,42 @@ after a line was posted, `opening_*` means *first observed by us* rather
612
612
  than the book's true open — a value in minutes rather than hours is the
613
613
  tell.
614
614
 
615
+ ### Price a parlay across games (Hobby+)
616
+
617
+ ```ts
618
+ const res = await client.priceParlay([
619
+ { sport_key: "basketball_nba", event_id: 287401, market: "h2h", selection: "Detroit Pistons" },
620
+ { sport_key: "basketball_nba", event_id: 287402, market: "h2h", selection: "Atlanta Hawks" },
621
+ ], { price: 180 });
622
+ console.log(res.fair_price, res.offered_ev_pct, res.books.slice(0, 3));
623
+ ```
624
+
625
+ ### Find an event by another id (free)
626
+
627
+ ```ts
628
+ await client.lookupEventIds({ book: "pinnacle", bookEventId: "1612345678" });
629
+ ```
630
+
631
+ ### Settle your bets (Hobby+)
632
+
633
+ `settleBets` returns won / lost / push / void / half_won / half_lost per bet,
634
+ with the stat it settled on and the payout. Works for parlays, and for a book
635
+ or line PropLine never stored.
636
+
637
+ ```ts
638
+ const res = await client.settleBets([
639
+ { ref: "b1", sport_key: "baseball_mlb", event_id: 150791, market: "totals",
640
+ selection: "Over", side: "Over", point: 7.75, price: -105, stake: 10 },
641
+ { ref: "p1", stake: 5, legs: [
642
+ { sport_key: "baseball_mlb", event_id: 150791, market: "h2h",
643
+ selection: "Boston Red Sox", price: -140 },
644
+ { sport_key: "baseball_mlb", event_id: 150791, market: "pitcher_strikeouts",
645
+ selection: "Garrett Crochet", side: "Over", point: 6.5, price: 110 },
646
+ ] },
647
+ ]);
648
+ for (const b of res.bets) console.log(b.ref, b.result, b.profit);
649
+ ```
650
+
615
651
  ### Grade your bets against the close (Hobby+)
616
652
 
617
653
  `getOddsClosing` gives you the closing line; `gradeClv` does the whole job —
package/dist/index.cjs CHANGED
@@ -375,6 +375,22 @@ var PropLine = class {
375
375
  getEventIds(sport) {
376
376
  return this._request("GET", `/sports/${encodeURIComponent(sport)}/ids`);
377
377
  }
378
+ /**
379
+ * Find PropLine events from someone else's id (free tier). Pass exactly
380
+ * one of `book` + `bookEventId` (a sportsbook's own event id),
381
+ * `espnEventId` or `mlbGamePk`; arrays send up to 50.
382
+ */
383
+ lookupEventIds(opts) {
384
+ const j = (v) => Array.isArray(v) ? v.join(",") : v === void 0 ? void 0 : String(v);
385
+ return this._request("GET", "/ids/lookup", {
386
+ params: {
387
+ book: opts.book,
388
+ book_event_id: j(opts.bookEventId),
389
+ espn_event_id: j(opts.espnEventId),
390
+ mlb_game_pk: j(opts.mlbGamePk)
391
+ }
392
+ });
393
+ }
378
394
  getBookAccuracy(options = {}) {
379
395
  const params = { days: String(options.days ?? 30) };
380
396
  if (options.sport) params.sport = options.sport;
@@ -1127,6 +1143,37 @@ var PropLine = class {
1127
1143
  params: options.devig ? { devig: options.devig } : void 0
1128
1144
  });
1129
1145
  }
1146
+ /**
1147
+ * Settle placed bets: won, lost, push, void, half_won or half_lost.
1148
+ *
1149
+ * Singles or parlays (`legs`). The book and the line are free: a bet at a
1150
+ * book PropLine does not carry, or at a line nobody posted, still settles
1151
+ * from the same box score the grader used (`source: "computed"`). Asian
1152
+ * quarter lines settle as two half-stakes. Max 200 bets. Stateless.
1153
+ *
1154
+ * Hobby+ required; free tier sees the structure with results hidden.
1155
+ *
1156
+ * @example
1157
+ * const res = await client.settleBets([{
1158
+ * sport_key: "baseball_mlb", event_id: 150791, market: "totals",
1159
+ * selection: "Over", side: "Over", point: 7.75, price: -105, stake: 10,
1160
+ * }]);
1161
+ * console.log(res.bets[0].result); // "half_won"
1162
+ */
1163
+ settleBets(bets) {
1164
+ return this._request("POST", "/bets/settle", { body: bets });
1165
+ }
1166
+ /**
1167
+ * Fair price of a parlay across games, from the same no-vig lines as
1168
+ * `getEventEv`, plus each book's price for the same legs and the EV% of
1169
+ * an offered `price`. Legs on one event are flagged `same_game` (the
1170
+ * fair price assumes independent legs). 2-15 legs. Hobby+.
1171
+ */
1172
+ priceParlay(legs, options = {}) {
1173
+ return this._request("POST", "/parlay/price", {
1174
+ body: { legs, price: options.price, devig: options.devig }
1175
+ });
1176
+ }
1130
1177
  priceSgp(sportKey, eventId, legs, bookmaker = "fanduel") {
1131
1178
  return this._request(
1132
1179
  "POST",
@@ -1228,7 +1275,7 @@ var Bookmakers = {
1228
1275
  POLYMARKET: "polymarket",
1229
1276
  PRIZEPICKS: "prizepicks"
1230
1277
  };
1231
- var VERSION = "0.68.1";
1278
+ var VERSION = "0.70.0";
1232
1279
  // Annotate the CommonJS export names for ESM import in node:
1233
1280
  0 && (module.exports = {
1234
1281
  AuthError,