Versions in this module Expand all Collapse all v0 v0.2.2 Nov 21, 2026 v0.2.1 Nov 20, 2026 v0.2.0 Nov 19, 2026 Changes in this version + const SgpBookmakerDegraded + const SgpBookmakerLive + const SgpBookmakerPaused + const SgpNextChangeLegs + const SgpNextChooseOtherBookmaker + const SgpNextRefreshLegs + const SgpNextRemoveLeg + const SgpNextRetry + const SgpNextRetryLater + const SgpQuoteLegUnavailable + const SgpQuoteNotCombinable + const SgpQuoteOK + const SgpQuoteSuspended + const SgpQuoteTemporarilyUnavailable + const SgpQuoteTimeout + const SgpQuoteUnsupported type Client + func (c *Client) GetSgpBookmakers(ctx context.Context, sport string) ([]SgpBookmaker, error) + func (c *Client) GetSgpLegs(ctx context.Context, p SgpLegsParams) (*SgpLegsResponse, error) + func (c *Client) QuoteSgp(ctx context.Context, p SgpQuoteParams) (*SgpQuoteResponse, error) + type SgpBookQuote struct + Bookmaker string + CacheExpiresAt Time + Cached bool + DurationMs int + Jurisdiction string + LegIDs []string + Legs []SgpQuoteLegResult + LegsMultiplied Decimal + Links *SgpQuoteLinks + NextAction string + Price Decimal + PriceAdjustmentPct string + QuotedAt Time + Reason string + RetryAfter int + Retryable bool + Status string + type SgpBookmaker struct + Jurisdiction string + MaxLegs int + Name string + Sports []string + Status string + type SgpLeg struct + Bookmakers map[string]SgpLegBook + Hdp *float64 + Label string + LegID string + Market string + Side string + type SgpLegBook struct + Eligible bool + Price Decimal + UpdatedAt Time + type SgpLegsBookmaker struct + Bookmaker string + NextAction string + Reason string + RetryAfter int + Retryable bool + Status string + type SgpLegsParams struct + Bookmakers []string + EventID int64 + Limit int + Markets []string + Skip int + type SgpLegsResponse struct + Bookmakers []SgpLegsBookmaker + Date Time + EventID ID + HasMore bool + Legs []SgpLeg + Status string + type SgpQuoteLeg struct + ExpectedPrice string + Hdp *float64 + Label string + LegID string + Market string + Side string + type SgpQuoteLegResult struct + Hdp *float64 + LegID string + Price Decimal + PriceMoved bool + type SgpQuoteLinks struct + Desktop string + Mobile string + type SgpQuoteParams struct + Bookmakers []string + EventID int64 + Legs []SgpQuoteLeg + type SgpQuoteResponse struct + EventID ID + Quotes []SgpBookQuote v0.1.1 Nov 13, 2026 v0.1.0 Nov 11, 2026 Changes in this version + const DefaultBaseURL + const GradeHalfLost + const GradeHalfWon + const GradeLost + const GradePending + const GradeUngradeable + const GradeVoid + const GradeWon + const HistoricalWindow + const StatusCancelled + const StatusLive + const StatusPending + const StatusSettled + const Version + var ErrBadRequest = errors.New("oddsapi: bad request") + var ErrForbidden = errors.New("oddsapi: forbidden") + var ErrNotFound = errors.New("oddsapi: not found") + var ErrRateLimited = errors.New("oddsapi: rate limit exceeded") + var ErrServer = errors.New("oddsapi: server error") + var ErrUnauthorized = errors.New("oddsapi: invalid API key") + var StopIteration = errors.New("oddsapi: stop iteration") + type APIError struct + Body []byte + Message string + Method string + RateLimit *RateLimit + RetryAfter time.Duration + StatusCode int + URL string + func (e *APIError) Error() string + func (e *APIError) Is(target error) bool + func (e *APIError) IsAddOnRequired() bool + type ArbitrageBet struct + Event *EventInfo + EventID ID + FirstSeenAt Time + ID string + ImpliedProbability float64 + Legs []ArbitrageLeg + Market struct{ ... } + OptimalStakes []OptimalStake + ProfitMargin float64 + TotalStake float64 + UpdatedAt Time + type ArbitrageLeg struct + Bookmaker string + BookmakerFixtureID string + DirectLink string + Href string + Label string + MaxStake *float64 + NetOdds Decimal + Odds Decimal + OddsUpdatedAt Time + Side string + type ArbitrageParams struct + AllCombinations bool + Bookmakers []string + IncludeEventDetails bool + League string + Limit int + Markets []string + MinProfit float64 + Sport string + type Bookmaker struct + Active bool + CreatedAt Time + Name string + Reason string + Status string + type Client struct + func NewClient(apiKey string, opts ...Option) *Client + func (c *Client) ClearSelectedBookmakers(ctx context.Context) (*SelectedBookmakers, error) + func (c *Client) GetAllMarkets(ctx context.Context) (map[string][]MarketInfo, error) + func (c *Client) GetArbitrageBets(ctx context.Context, p ArbitrageParams) ([]ArbitrageBet, error) + func (c *Client) GetBookmakers(ctx context.Context) ([]Bookmaker, error) + func (c *Client) GetClosingLines(ctx context.Context, p ClosingLinesParams) ([]EventOdds, error) + func (c *Client) GetDroppingOdds(ctx context.Context, p DroppingOddsParams) (*DroppingOddsPage, error) + func (c *Client) GetEvent(ctx context.Context, id int64) (*Event, error) + func (c *Client) GetEvents(ctx context.Context, p EventsParams) ([]Event, error) + func (c *Client) GetHistoricalEvents(ctx context.Context, p HistoricalEventsParams) ([]Event, error) + func (c *Client) GetHistoricalOdds(ctx context.Context, p OddsParams) (*EventOdds, error) + func (c *Client) GetLeagues(ctx context.Context, p LeaguesParams) ([]League, error) + func (c *Client) GetLiveEvents(ctx context.Context, sport string) ([]Event, error) + func (c *Client) GetMappings(ctx context.Context, p MappingsParams) (*MappingsPage, error) + func (c *Client) GetMarkets(ctx context.Context, sport string) (*MarketsResponse, error) + func (c *Client) GetOdds(ctx context.Context, p OddsParams) (*EventOdds, error) + func (c *Client) GetOddsMovements(ctx context.Context, p MovementsParams) (*OddsMovement, error) + func (c *Client) GetOddsMulti(ctx context.Context, p MultiOddsParams) ([]EventOdds, error) + func (c *Client) GetOddsSnapshot(ctx context.Context, p MultiOddsParams) (*OddsSnapshot, error) + func (c *Client) GetOddsSummary(ctx context.Context, p SummaryParams) (*EventSummary, error) + func (c *Client) GetOddsSummaryMulti(ctx context.Context, p SummaryParams) ([]EventSummary, error) + func (c *Client) GetOutrightOdds(ctx context.Context, id int64, bookmakers ...string) (*OutrightOdds, error) + func (c *Client) GetOutrightResults(ctx context.Context, id int64) (*OutrightResults, error) + func (c *Client) GetOutrights(ctx context.Context, p OutrightsParams) ([]Outright, error) + func (c *Client) GetParticipant(ctx context.Context, id int64) (*Participant, error) + func (c *Client) GetParticipantLogo(ctx context.Context, id int64) ([]byte, error) + func (c *Client) GetParticipants(ctx context.Context, p ParticipantsParams) ([]Participant, error) + func (c *Client) GetSelectedBookmakers(ctx context.Context) (*SelectedBookmakers, error) + func (c *Client) GetSettlements(ctx context.Context, eventIDs ...int64) (*SettlementsResponse, error) + func (c *Client) GetSports(ctx context.Context) ([]Sport, error) + func (c *Client) GetUpdatedOdds(ctx context.Context, p UpdatedOddsParams) (*UpdatedOdds, error) + func (c *Client) GetValueBets(ctx context.Context, p ValueBetsParams) ([]ValueBet, error) + func (c *Client) GradeBets(ctx context.Context, selections []GradeSelection) (*GradesResponse, error) + func (c *Client) IterateClosingLines(ctx context.Context, p ClosingLinesParams, fn func(EventOdds) error) error + func (c *Client) IterateDroppingOdds(ctx context.Context, p DroppingOddsParams, fn func(DroppingOddsEntry) error) error + func (c *Client) IterateEvents(ctx context.Context, p EventsParams, pageSize int, fn func(Event) error) error + func (c *Client) IterateHistoricalEvents(ctx context.Context, p HistoricalEventsParams, fn func(Event) error) error + func (c *Client) IterateMappings(ctx context.Context, p MappingsParams, fn func(Mapping) error) error + func (c *Client) LastRateLimit() *RateLimit + func (c *Client) ParticipantLogoURL(id int64) string + func (c *Client) PollUpdatedOdds(ctx context.Context, p UpdatedOddsParams, interval time.Duration, ...) error + func (c *Client) SearchEvents(ctx context.Context, p SearchEventsParams) ([]Event, error) + func (c *Client) SearchHistoricalEvents(ctx context.Context, p SearchHistoricalEventsParams) ([]Event, error) + func (c *Client) SelectBookmakers(ctx context.Context, bookmakers ...string) (*SelectedBookmakers, error) + type Clock struct + InjuryTime int + Minute int + Period int + PeriodStartedAt int64 + PlayedSeconds int + Running bool + Serve string + StatusDetail string + type ClosingLinesParams struct + Bookmakers []string + From time.Time + Leagues []string + Limit int + Markets []string + Skip int + Sport string + To time.Time + type Decimal string + func (d *Decimal) UnmarshalJSON(b []byte) error + func (d Decimal) Float() float64 + type DroppingOddsEntry struct + BetSide string + Event ... + EventID ID + LastMovedAt *int64 + Market struct{ ... } + Odds struct{ ... } + UpdatedAt int64 + type DroppingOddsPage struct + Data []DroppingOddsEntry + Page int64 + PerPage int64 + Total int64 + UpdatedAt int64 + type DroppingOddsParams struct + IncludeEventDetails bool + League string + Leagues []string + Limit int + Markets []string + MinDrop float64 + Page int + Sort string + Sport string + TimeWindow string + type EsportsDetails struct + Format ... + Game NamedSlug + League NamedSlug + Region string + type Event struct + Away string + AwayID ID + BookmakerCount int + Clock *Clock + Date Time + Esports *EsportsDetails + Home string + HomeID ID + ID ID + League NamedSlug + Scores *Score + Sport NamedSlug + Status string + type EventInfo struct + Away string + Date Time + Home string + League string + Sport string + type EventOdds struct + Away string + AwayID ID + BookmakerIDs map[string]string + Bookmakers map[string][]Market + Date Time + Home string + HomeID ID + ID ID + League NamedSlug + Scores *Score + Sport NamedSlug + Status string + URLs map[string]string + func (o *EventOdds) Market(bookmaker, name string) *Market + type EventSummary struct + Away string + ComputedAt Time + Date Time + Demo bool + EventID ID + Home string + Markets []SummaryMarket + Message string + Status string + type EventsParams struct + Bookmaker string + From time.Time + League string + Limit int + ParticipantID int64 + Skip int + Sport string + Status []string + To time.Time + type Grade struct + Basis ... + EventID ID + Final bool + Reason string + Ref string + Result string + type GradeSelection struct + EventID int64 + Hdp *float64 + Label string + Market string + Ref string + Side string + TieRule string + type GradesResponse struct + Grades []Grade + type HistoricalEventsParams struct + From time.Time + League string + Sport string + To time.Time + type ID int64 + func (id *ID) UnmarshalJSON(b []byte) error + func (id ID) Int64() int64 + func (id ID) String() string + type League struct + EventsCount int + Name string + Slug string + type LeaguesParams struct + All bool + Sport string + type Mapping struct + Active bool + Away string + Bookmaker string + Date Time + EventID ID + Extra map[string]json.RawMessage + FirstSeenAt Time + Hdp *float64 + Home string + Label string + LastCheckedAt Time + League NamedSlug + Market string + MarketID string + NativeEventID string + OutcomeID string + OutcomeLabel string + Side string + Sport NamedSlug + type MappingsPage struct + Data []Mapping + NextCursor string + type MappingsParams struct + Active *bool + Bookmaker string + Cursor string + EventID int64 + EventIDs []int64 + League string + Limit int + Market string + MarketID string + MarketIDs []string + OutcomeID string + Sport string + type Market struct + Name string + Odds []OddsLine + UpdatedAt Time + type MarketInfo struct + Live bool + Name string + Period string + Prematch bool + Shape string + type MarketsResponse struct + Markets []MarketInfo + Sport NamedSlug + type MovementsParams struct + Bookmaker string + EventID int64 + Market string + MarketLine string + type MultiOddsParams struct + Bookmakers []string + EventIDs []int64 + Markets []string + type NamedSlug struct + Name string + Slug string + type OddsLine struct + Away Decimal + AwayLink string + Draw Decimal + DrawLink string + Exactly Decimal + Fields map[string]json.RawMessage + Hdp *float64 + Home Decimal + HomeLink string + Label string + LayAway Decimal + LayDraw Decimal + LayHome Decimal + LayNo Decimal + LayOver Decimal + LayUnder Decimal + LayYes Decimal + Max *float64 + No Decimal + Odds Decimal + Over Decimal + Under Decimal + Yes Decimal + func (l *OddsLine) UnmarshalJSON(b []byte) error + func (l OddsLine) Price(key string) Decimal + type OddsMovement struct + Bookmaker string + EventID ID + Latest OddsMovementPoint + Movements []OddsMovementPoint + Opening OddsMovementPoint + type OddsMovementPoint struct + Away float64 + Draw *float64 + Hdp Decimal + Home float64 + Max *float64 + Timestamp int64 + type OddsParams struct + Bookmakers []string + EventID int64 + Markets []string + type OddsSnapshot struct + Data []EventOdds + Seq int64 + type OptimalStake struct + Bookmaker string + PotentialReturn float64 + Side string + Stake float64 + type Option func(*Client) + func WithBaseURL(u string) Option + func WithHTTPClient(hc *http.Client) Option + func WithMaxRetries(n int) Option + func WithMaxRetryDelay(d time.Duration) Option + func WithTimeout(d time.Duration) Option + func WithUserAgent(ua string) Option + type Outright struct + BookmakerCount int + Date Time + ID ID + League NamedSlug + Name string + Sport NamedSlug + Status string + type OutrightMarket struct + Name string + Odds []OutrightRunner + UpdatedAt Time + type OutrightOdds struct + Bookmakers map[string][]OutrightMarket + Date Time + ID ID + League NamedSlug + Name string + Sport NamedSlug + Status string + type OutrightResultRow struct + Label string + MadeCut *bool + ParticipantID ID + Position *int + Status string + Tied bool + type OutrightResults struct + ID ID + Name string + Results []OutrightResultRow + Status string + Winners map[string][]ID + type OutrightRunner struct + Label string + LayNo Decimal + LayOdds Decimal + LayYes Decimal + No Decimal + Odds Decimal + ParticipantID ID + Yes Decimal + func (r OutrightRunner) IsYesNo() bool + type OutrightsParams struct + League string + Sport string + Status []string + type Participant struct + Game string + ID ID + Name string + ShortCode string + Sport string + type ParticipantsParams struct + Search string + Sport string + type PeriodScore struct + Away float64 + Home float64 + Overs *SideFloats + Wickets *SideFloats + type RateLimit struct + Limit int + Remaining int + Reset time.Time + type Score struct + Away float64 + Home float64 + Periods map[string]PeriodScore + type SearchEventsParams struct + Query string + Status string + type SearchHistoricalEventsParams struct + From time.Time + Query string + Sport string + To time.Time + type SelectedBookmakers struct + Added int + Bookmakers []string + Count int + Message string + type Settlement struct + EventID ID + Final bool + Scores *Score + SettledAt Time + Sport string + Status string + type SettlementsResponse struct + NotFound []string + Settlements []Settlement + type SideFloats struct + Away float64 + Home float64 + type Sport = NamedSlug + type SummaryExchangeQuote struct + Best float64 + Currency string + Liquidity *float64 + Venue string + type SummaryLine struct + Books int + Exchanges map[string]SummaryExchangeQuote + FairBooks int + Hdp *float64 + Main bool + Outcomes map[string]SummaryOutcome + Payout ... + type SummaryMarket struct + Lines []SummaryLine + Name string + type SummaryOutcome struct + Average float64 + Best float64 + BestBookmakers []string + Excluded int + Fair *float64 + Median float64 + SharpFair *float64 + Worst float64 + type SummaryParams struct + Bookmakers []string + EventID int64 + EventIDs []int64 + IncludeExchanges bool + Lines string + Markets []string + type Time struct + func (t *Time) UnmarshalJSON(b []byte) error + func (t Time) MarshalJSON() ([]byte, error) + type UpdatedOdds struct + Data []EventOdds + NextSince int64 + ServerTime int64 + UnknownMarkets []string + type UpdatedOddsParams struct + Bookmaker string + Limit int + Markets []string + Since int64 + Sport string + type ValueBet struct + BetSide string + Bookmaker string + BookmakerOdds struct{ ... } + BookmakerOddsUpdatedAt Time + Event *EventInfo + EventID ID + ExpectedValue float64 + ExpectedValueUpdatedAt Time + FirstSeenAt Time + ID string + Market struct{ ... } + func (v ValueBet) Edge() float64 + type ValueBetsParams struct + Bookmaker string + IncludeEventDetails bool + League string + Sport string