JS SDK v1.129.0
about 2 hours ago by Viktor Yordanov
Added
- getByMatchId(matchId, filters?) — odds for a single match, grouped per operator.
- getByDateRange(filters) — odds for every fixture starting inside a date range, paginated and ordered by start time.
dateFromanddateToare required and the range must not exceed 7 days.- Optional
sport,competitionId,limitandpagefilters via the new MatchOddsByDateFilters object.- Returns an EventsOddsPaginationModel (
data+metawithtotal,limitandpage).- Both new methods return EventOddsModel, which follows the structure of the API: odds grouped per operator, the market code and scope in
meta, numeric odds, and links as{ desktop, mobile }objects.getByMatchIdskeeps returning MatchOddsModel.- New filters on MatchOddsFilters:
operators— restrict the response to specific operators.affiliateId— affiliate ID substituted into every operator link.affiliateIds— affiliate IDs per operator, taking precedence overaffiliateIdfor the operators they name.language— BCP 47 language tag for the operator content.- Operator betslip links:
betslipUrlTemplateandbetslipIdSeparator. Join the selection IDs the user picked with the separator and substitute them into the{betslip_ids}placeholder.startTimeandupdatedAton MatchOddsModel, andhoverBackgroundColor/borderColoron the bookmaker branding.- New market types:
HT_1X2,DRAW_NO_BET,TEAM_SCORE_FIRST_GOAL,OVER_GOALS_6_5andOVER_CORNERS_6_5…OVER_CORNERS_13_5.- New models: EventOddsModel, EventsOddsPaginationModel, OperatorOddsModel, OddsOperatorModel, OddsMarketModel, OddsSelectionModel, OddsUrlModel, MatchOddsMetaModel and related sub-models.
Changed
- The Odds namespace now reads odds from the Fans United Sports API instead of the previous third-party feed.
getByMatchIds(matchIds, filters?)is unchanged — same signature, same Map of MatchOddsModel arrays, same field names and types — so no integration needs updating.MatchOddsModel.typeis now derived from the status of the match:PRE_EVENTorLIVE, andnullonly when the status could not be resolved.bookmaker.urlis derived from the operator domain, andbookmaker.linksis composed from the resolved match and selection links plus the homepage. Both were previously empty.market.typecarries the Fans United market code —FT_1X2where the previous feed sent1x2. MatchOddsMarketEnum values were already the Fans United spellings, so filters are unaffected.OVER_GOALS_*markets now return both the over and the under selection, because each goal line is its own market.marketTypesaccepts a market code this SDK version does not know yet, matching it against the response as-is and logging a warning, instead of resetting the filter toFT_1X2.
Deprecated
oddClientin the SDK configuration is ignored and no longer required. Omitting it is now the correct setup; providing it logs a warning.- The
oddTypefilter is ignored — the odds API has no odd type request parameter, so pre-event and live odds cannot be requested separately. ReadMatchOddsModel.typeinstead. Providing the filter logs a warning.OddFormatEnum.MONEYLINEis no longer supported and falls back toOddFormatEnum.DECIMALwith a warning.
