Skip to content

Releases

JavaScript SDK 0.5.0 · Bounded rate-limit retries

Choose a tag to compare

@JacobiusMakes JacobiusMakes released this 01 Dec 21:45
8774322

The JavaScript client now supports opt-in rate-limit recovery. Setting maxRetries: 2 allows up to three HTTP attempts per method call, each with its own timeout. The default is one attempt. The client honors a valid Retry-After of up to 30 seconds and surfaces longer pauses to the caller.

Run three local examples to see one successful retry, an exhausted budget and an immediate plan denial. The replay uses invented responses and needs no account.

Install the prebuilt ESM, CommonJS and TypeScript package with npm install https://github.com/JacobiusMakes/parlay-api-js/releases/download/v0.5.0/parlay-api-0.5.0.tgz.

Check your installation

In the same project, run this local calculation with two fictional prices. It works without an API key.

node --input-type=module -e 'import { marketHold } from "parlay-api"; console.log((100 * marketHold([-110, -110])).toFixed(2) + "%")'

Expected output is 4.76%. At −110 on both sides, the two implied probabilities add up to 104.76%. The extra 4.76 percentage points are the overround in that quote.

Open the public odds preview to inspect the events and prices returned for a selected sport before connecting an account.

JavaScript SDK 0.4.4

Choose a tag to compare

@JacobiusMakes JacobiusMakes released this 01 Dec 17:12
6857071

The installed client now identifies structured service refusals. A monthly credit denial raises CreditLimitExceededError, a lookback or plan denial raises TierGatedError, and both preserve the service message. Plain-text gateway responses remain supported.

Install the prebuilt package with npm install https://github.com/JacobiusMakes/parlay-api-js/releases/download/v0.4.4/parlay-api-0.4.4.tgz. The package check exercises eleven ordinary HTTP scenarios through both ES modules and CommonJS and compiles both TypeScript imports.

v0.4.3 — Measure market overround offline

Choose a tag to compare

@JacobiusMakes JacobiusMakes released this 01 Dec 14:27
5e2b028

Measure the overround in one complete two-way or three-way market with marketHold(prices). The helper runs locally with American prices. Both marketHold([-110, -110]) and ParlayAPI.marketHold([-110, -110]) return approximately 0.047619, or 4.76%.

Install the prebuilt ESM, CommonJS and TypeScript package from the release asset.

npm install https://github.com/JacobiusMakes/parlay-api-js/releases/download/v0.4.3/parlay-api-0.4.3.tgz

JavaScript and TypeScript SDK 0.4.2

Choose a tag to compare

@JacobiusMakes JacobiusMakes released this 01 Dec 02:42
7e758d4

Install the JavaScript or TypeScript client directly from this release with Node 18 or newer.

npm install https://github.com/JacobiusMakes/parlay-api-js/releases/download/v0.4.2/parlay-api-0.4.2.tgz

Try a fictional NBA odds response without creating an account.

import { ParlayAPI } from "parlay-api";
const sandbox = new ParlayAPI({ sandbox: true, apiKey: "" });
const events = await sandbox.odds("nba", { markets: ["h2h"] });
console.log(events.map(event => event.id));

Short league names now work across sport-scoped requests and streaming URLs. Existing full keys keep working. Both ES modules and CommonJS include TypeScript declarations. Thanks to Harlan Jones for the original contribution. Contributor pull request

When the sandbox shows the fields your integration needs, get your own API key for a live request.

JavaScript and TypeScript SDK 0.4.1

Choose a tag to compare

@JacobiusMakes JacobiusMakes released this 26 Nov 22:48
2c787cc

Install the compiled ParlayAPI SDK in a Node.js 18+ project with one command.

npm install https://github.com/JacobiusMakes/parlay-api-js/releases/download/v0.4.1/parlay-api-0.4.1.tgz

Try a local calculation immediately.

node --input-type=module -e 'import { devig } from "parlay-api"; console.log(devig(-110, -110))'

The expected output is [ 0.5, 0.5 ]. The package includes ES modules, CommonJS and TypeScript declarations for both import styles. It has zero runtime dependencies.

To request your first synthetic odds board, follow the sandbox example. Before polling live data, estimate your request volume.