puntersedge
v0.1.0
Published
Official Node.js client for the PuntersEdge Australian Sports Odds API
Maintainers
Readme
puntersedge
Official Node.js / TypeScript client for the PuntersEdge Australian Sports Odds API.
Install
npm install puntersedgeQuick start
import PuntersEdgeClient from "puntersedge";
const client = new PuntersEdgeClient({ apiKey: "YOUR_API_KEY" });
// List sports
const sports = await client.sports();
// NRL head-to-head odds
const nrl = await client.odds("nrl", "h2h");
// Best odds across bookmakers (with arb detection)
const best = await client.bestOdds("afl");
// Next 5 horse races
const races = await client.nextToGo(5, "horse");
// Check your credit usage
const usage = await client.usage();API key
Get a free API key — no credit card required.
Errors
import { AuthError, RateLimitError, NotFoundError, ServerError } from "puntersedge";
try {
const data = await client.odds("afl");
} catch (e) {
if (e instanceof AuthError) { /* invalid key */ }
if (e instanceof RateLimitError) { /* out of credits */ }
if (e instanceof NotFoundError) { /* sport not found */ }
if (e instanceof ServerError) { /* 5xx */ }
}Supported sports
AFL, NRL, NBA, Tennis ATP/WTA, EPL, A-League, Super Rugby, Big Bash, Test Cricket
Links
License
MIT
