propline 0.69.0 → 0.71.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 +29 -0
- package/dist/index.cjs +58 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +149 -2
- package/dist/index.d.ts +149 -2
- package/dist/index.js +58 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -485,6 +485,19 @@ const h = await client.getInjuryHistory("basketball_nba", { days: 7 });
|
|
|
485
485
|
for (const c of h.changes) console.log(c.changed_at, c.player_name, c.old_status, "->", c.new_status);
|
|
486
486
|
```
|
|
487
487
|
|
|
488
|
+
### Referee card stats (free)
|
|
489
|
+
|
|
490
|
+
Card counts per referee, and each referee's matches with per-team cards.
|
|
491
|
+
Premier League (`soccer_epl`) only today.
|
|
492
|
+
|
|
493
|
+
```ts
|
|
494
|
+
const r = await client.getReferees("soccer_epl", { since: "2026-08-01" });
|
|
495
|
+
for (const ref of r.referees) console.log(ref.referee, ref.matches, ref.cards_per_match);
|
|
496
|
+
|
|
497
|
+
const m = await client.getRefereeMatches("soccer_epl", "Michael Oliver", { limit: 10 });
|
|
498
|
+
for (const g of m.matches) console.log(g.commence_time.slice(0, 10), g.home_team, "v", g.away_team, g.yellow_cards);
|
|
499
|
+
```
|
|
500
|
+
|
|
488
501
|
### Golf round history (free)
|
|
489
502
|
|
|
490
503
|
Every completed round for every golfer, by tour (pga, dp_world, liv, lpga,
|
|
@@ -612,6 +625,22 @@ after a line was posted, `opening_*` means *first observed by us* rather
|
|
|
612
625
|
than the book's true open — a value in minutes rather than hours is the
|
|
613
626
|
tell.
|
|
614
627
|
|
|
628
|
+
### Price a parlay across games (Hobby+)
|
|
629
|
+
|
|
630
|
+
```ts
|
|
631
|
+
const res = await client.priceParlay([
|
|
632
|
+
{ sport_key: "basketball_nba", event_id: 287401, market: "h2h", selection: "Detroit Pistons" },
|
|
633
|
+
{ sport_key: "basketball_nba", event_id: 287402, market: "h2h", selection: "Atlanta Hawks" },
|
|
634
|
+
], { price: 180 });
|
|
635
|
+
console.log(res.fair_price, res.offered_ev_pct, res.books.slice(0, 3));
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
### Find an event by another id (free)
|
|
639
|
+
|
|
640
|
+
```ts
|
|
641
|
+
await client.lookupEventIds({ book: "pinnacle", bookEventId: "1612345678" });
|
|
642
|
+
```
|
|
643
|
+
|
|
615
644
|
### Settle your bets (Hobby+)
|
|
616
645
|
|
|
617
646
|
`settleBets` returns won / lost / push / void / half_won / half_lost per bet,
|
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;
|
|
@@ -433,6 +449,36 @@ var PropLine = class {
|
|
|
433
449
|
{ params }
|
|
434
450
|
);
|
|
435
451
|
}
|
|
452
|
+
/**
|
|
453
|
+
* Referee card stats for a sport (free tier). Only `soccer_epl` today;
|
|
454
|
+
* other sports return 404 `referees_not_available`.
|
|
455
|
+
*/
|
|
456
|
+
getReferees(sport, options = {}) {
|
|
457
|
+
const params = {};
|
|
458
|
+
if (options.search) params.search = options.search;
|
|
459
|
+
if (options.since) params.since = options.since;
|
|
460
|
+
if (options.until) params.until = options.until;
|
|
461
|
+
return this._request(
|
|
462
|
+
"GET",
|
|
463
|
+
`/sports/${encodeURIComponent(sport)}/referees`,
|
|
464
|
+
{ params }
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* One referee's summary plus their matches with per-team cards
|
|
469
|
+
* (free tier). `limit` is 1-500 (default 100).
|
|
470
|
+
*/
|
|
471
|
+
getRefereeMatches(sport, name, options = {}) {
|
|
472
|
+
const params = {};
|
|
473
|
+
if (options.since) params.since = options.since;
|
|
474
|
+
if (options.until) params.until = options.until;
|
|
475
|
+
if (options.limit !== void 0) params.limit = String(options.limit);
|
|
476
|
+
return this._request(
|
|
477
|
+
"GET",
|
|
478
|
+
`/sports/${encodeURIComponent(sport)}/referees/${encodeURIComponent(name)}/matches`,
|
|
479
|
+
{ params }
|
|
480
|
+
);
|
|
481
|
+
}
|
|
436
482
|
/**
|
|
437
483
|
* Get raw player/team box-score stats (book-agnostic, free tier).
|
|
438
484
|
*
|
|
@@ -1147,6 +1193,17 @@ var PropLine = class {
|
|
|
1147
1193
|
settleBets(bets) {
|
|
1148
1194
|
return this._request("POST", "/bets/settle", { body: bets });
|
|
1149
1195
|
}
|
|
1196
|
+
/**
|
|
1197
|
+
* Fair price of a parlay across games, from the same no-vig lines as
|
|
1198
|
+
* `getEventEv`, plus each book's price for the same legs and the EV% of
|
|
1199
|
+
* an offered `price`. Legs on one event are flagged `same_game` (the
|
|
1200
|
+
* fair price assumes independent legs). 2-15 legs. Hobby+.
|
|
1201
|
+
*/
|
|
1202
|
+
priceParlay(legs, options = {}) {
|
|
1203
|
+
return this._request("POST", "/parlay/price", {
|
|
1204
|
+
body: { legs, price: options.price, devig: options.devig }
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1150
1207
|
priceSgp(sportKey, eventId, legs, bookmaker = "fanduel") {
|
|
1151
1208
|
return this._request(
|
|
1152
1209
|
"POST",
|
|
@@ -1248,7 +1305,7 @@ var Bookmakers = {
|
|
|
1248
1305
|
POLYMARKET: "polymarket",
|
|
1249
1306
|
PRIZEPICKS: "prizepicks"
|
|
1250
1307
|
};
|
|
1251
|
-
var VERSION = "0.
|
|
1308
|
+
var VERSION = "0.71.0";
|
|
1252
1309
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1253
1310
|
0 && (module.exports = {
|
|
1254
1311
|
AuthError,
|