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.
0.3.x — current
Section titled “0.3.x — current”- The SDK exposes the gateway’s internal entity classes directly.
SportEvent,Market,Selection,Quote, andOrderBookare read through the same getter and helper methods used internally —name,marketName,isAvailable,impliedProbability,bestBid,availableSizeUpTo,calculateMargin, etc. marketsandselectionsareReadonlyMaps 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.
SportEventrename (wasEvent) to avoid collision with the DOMEventtype in browser environments.- Wire message types renamed in lock-step:
sportEvent:added/updated/removed(wasevent:*),sportEventIdfield (waseventId). connect()returns a robust promise contract: resolves on first connection, rejects on fatal errors, stays pending across transient retries, supportsAbortSignal.- Configurable reconnect policy via
ClientOptions.reconnect— exponential backoff with jitter, optionalmaxAttemptscap. Auth close codes (4001,4002,4003) bypass the loop and emit fatalerrorimmediately. receivedAtadded to every event payload — the SDK’s local-clock timestamp at receipt, separate fromquote.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
realtimeoddsentry point. - Dual node/browser bundles via the
package.jsonexportsmap (built with tsup). - Auth via
apiKeyquery parameter; static accept-list on the gateway side for MVP. - Sport-discriminated unions:
SportEvent = BasketballMatch | FootballMatch | TennisMatch, narrowable viasportandkind. - Six market kinds at launch: basketball moneyline / handicap / total / player_prop_over_under, football moneyline, tennis moneyline.
Versioning policy
Section titled “Versioning policy”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.