Skip to content

Changelog

The SDK is in alpha (0.x). Breaking changes between minor versions are possible until 1.0. The shapes documented in Data model and Markets are intended to stay stable through the 0.x line.

For the canonical commit history, see the realtimeodds-js repo.

  • The SDK exposes the gateway’s internal entity classes directly. SportEvent, Market, Selection, Quote, and OrderBook are read through the same getter and helper methods used internally — name, marketName, isAvailable, impliedProbability, bestBid, availableSizeUpTo, calculateMargin, etc.
  • markets and selections are ReadonlyMaps for O(1) lookup. The mutation surface (with*, cloneWith*, toJSON, getOrThrow*) is hidden at the type level.
  • Generated types follow JSON Schema definitions strictly with additionalProperties: false.
  • SportEvent rename (was Event) to avoid collision with the DOM Event type in browser environments.
  • Wire message types renamed in lock-step: sportEvent:added/updated/removed (was event:*), sportEventId field (was eventId).
  • connect() returns a robust promise contract: resolves on first connection, rejects on fatal errors, stays pending across transient retries, supports AbortSignal.
  • Configurable reconnect policy via ClientOptions.reconnect — exponential backoff with jitter, optional maxAttempts cap. Auth close codes (4001, 4002, 4003) bypass the loop and emit fatal error immediately.
  • receivedAt added to every event payload — the SDK’s local-clock timestamp at receipt, separate from quote.timestamp (observation time set by the gateway).
  • Initial public release of the unified SDK. Replaced an earlier ad-hoc assembly of internal packages with a single realtimeodds entry point.
  • Dual node/browser bundles via the package.json exports map (built with tsup).
  • Auth via apiKey query parameter; static accept-list on the gateway side for MVP.
  • Sport-discriminated unions: SportEvent = BasketballMatch | FootballMatch | TennisMatch, narrowable via sport and kind.
  • Six market kinds at launch: basketball moneyline / handicap / total / player_prop_over_under, football moneyline, tennis moneyline.
  • 0.x.y — alpha. Breaking changes may occur on a minor bump (0.x → 0.(x+1)). Patch bumps (0.x.y → 0.x.(y+1)) stay backwards-compatible.
  • 1.0.0 — first stable release. Beyond that, semantic versioning applies strictly.

We call out breaking changes explicitly in this changelog. Pin to a minor version (^0.3.0) if you want patch updates without surprises.