Documentation
¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func Byte(b byte) *byte
- func Bytes(b []byte) *[]byte
- func Complex64(c complex64) *complex64
- func Complex128(c complex128) *complex128
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int8(i int8) *int8
- func Int16(i int16) *int16
- func Int32(i int32) *int32
- func Int64(i int64) *int64
- func MustParseDate(date string) time.Time
- func MustParseDateTime(datetime string) time.Time
- func Rune(r rune) *rune
- func String(s string) *string
- func Time(t time.Time) *time.Time
- func UUID(u uuid.UUID) *uuid.UUID
- func Uint(u uint) *uint
- func Uint8(u uint8) *uint8
- func Uint16(u uint16) *uint16
- func Uint32(u uint32) *uint32
- func Uint64(u uint64) *uint64
- func Uintptr(u uintptr) *uintptr
- type AmbiguousIdentifierError
- func (a *AmbiguousIdentifierError) GetCandidates() []string
- func (a *AmbiguousIdentifierError) GetError() string
- func (a *AmbiguousIdentifierError) GetExtraProperties() map[string]interface{}
- func (a *AmbiguousIdentifierError) GetMessage() *string
- func (a *AmbiguousIdentifierError) GetStatusCode() int
- func (a *AmbiguousIdentifierError) MarshalJSON() ([]byte, error)
- func (a *AmbiguousIdentifierError) SetCandidates(candidates []string)
- func (a *AmbiguousIdentifierError) SetError(error_ string)
- func (a *AmbiguousIdentifierError) SetMessage(message *string)
- func (a *AmbiguousIdentifierError) SetStatusCode(statusCode int)
- func (a *AmbiguousIdentifierError) String() string
- func (a *AmbiguousIdentifierError) UnmarshalJSON(data []byte) error
- type BadGatewayError
- type BadRequestError
- type CanonicalSportsEvent
- func (c *CanonicalSportsEvent) GetEventID() string
- func (c *CanonicalSportsEvent) GetExtraProperties() map[string]interface{}
- func (c *CanonicalSportsEvent) GetLeague() *string
- func (c *CanonicalSportsEvent) GetParticipants() []*CanonicalSportsParticipant
- func (c *CanonicalSportsEvent) GetSport() *string
- func (c *CanonicalSportsEvent) GetSubmarkets() []*CanonicalSportsSubmarket
- func (c *CanonicalSportsEvent) GetTitle() string
- func (c *CanonicalSportsEvent) MarshalJSON() ([]byte, error)
- func (c *CanonicalSportsEvent) SetEventID(eventID string)
- func (c *CanonicalSportsEvent) SetLeague(league *string)
- func (c *CanonicalSportsEvent) SetParticipants(participants []*CanonicalSportsParticipant)
- func (c *CanonicalSportsEvent) SetSport(sport *string)
- func (c *CanonicalSportsEvent) SetSubmarkets(submarkets []*CanonicalSportsSubmarket)
- func (c *CanonicalSportsEvent) SetTitle(title string)
- func (c *CanonicalSportsEvent) String() string
- func (c *CanonicalSportsEvent) UnmarshalJSON(data []byte) error
- type CanonicalSportsOutcome
- func (c *CanonicalSportsOutcome) GetExtraProperties() map[string]interface{}
- func (c *CanonicalSportsOutcome) GetKey() string
- func (c *CanonicalSportsOutcome) GetLabel() string
- func (c *CanonicalSportsOutcome) GetSide() *string
- func (c *CanonicalSportsOutcome) GetType() *string
- func (c *CanonicalSportsOutcome) MarshalJSON() ([]byte, error)
- func (c *CanonicalSportsOutcome) SetKey(key string)
- func (c *CanonicalSportsOutcome) SetLabel(label string)
- func (c *CanonicalSportsOutcome) SetSide(side *string)
- func (c *CanonicalSportsOutcome) SetType(type_ *string)
- func (c *CanonicalSportsOutcome) String() string
- func (c *CanonicalSportsOutcome) UnmarshalJSON(data []byte) error
- type CanonicalSportsParticipant
- func (c *CanonicalSportsParticipant) GetExtraProperties() map[string]interface{}
- func (c *CanonicalSportsParticipant) GetKey() string
- func (c *CanonicalSportsParticipant) GetName() *string
- func (c *CanonicalSportsParticipant) GetRole() *string
- func (c *CanonicalSportsParticipant) MarshalJSON() ([]byte, error)
- func (c *CanonicalSportsParticipant) SetKey(key string)
- func (c *CanonicalSportsParticipant) SetName(name *string)
- func (c *CanonicalSportsParticipant) SetRole(role *string)
- func (c *CanonicalSportsParticipant) String() string
- func (c *CanonicalSportsParticipant) UnmarshalJSON(data []byte) error
- type CanonicalSportsRules
- func (c *CanonicalSportsRules) GetExtraProperties() map[string]interface{}
- func (c *CanonicalSportsRules) GetSettlement() *string
- func (c *CanonicalSportsRules) MarshalJSON() ([]byte, error)
- func (c *CanonicalSportsRules) SetSettlement(settlement *string)
- func (c *CanonicalSportsRules) String() string
- func (c *CanonicalSportsRules) UnmarshalJSON(data []byte) error
- type CanonicalSportsSourceMarket
- func (c *CanonicalSportsSourceMarket) GetExtraProperties() map[string]interface{}
- func (c *CanonicalSportsSourceMarket) GetMarketID() string
- func (c *CanonicalSportsSourceMarket) GetMarketName() *string
- func (c *CanonicalSportsSourceMarket) GetMarketSlug() *string
- func (c *CanonicalSportsSourceMarket) GetOutcomes() []*CanonicalSportsSourceOutcome
- func (c *CanonicalSportsSourceMarket) GetProvider() CanonicalSportsSourceMarketProvider
- func (c *CanonicalSportsSourceMarket) MarshalJSON() ([]byte, error)
- func (c *CanonicalSportsSourceMarket) SetMarketID(marketID string)
- func (c *CanonicalSportsSourceMarket) SetMarketName(marketName *string)
- func (c *CanonicalSportsSourceMarket) SetMarketSlug(marketSlug *string)
- func (c *CanonicalSportsSourceMarket) SetOutcomes(outcomes []*CanonicalSportsSourceOutcome)
- func (c *CanonicalSportsSourceMarket) SetProvider(provider CanonicalSportsSourceMarketProvider)
- func (c *CanonicalSportsSourceMarket) String() string
- func (c *CanonicalSportsSourceMarket) UnmarshalJSON(data []byte) error
- type CanonicalSportsSourceMarketProvider
- type CanonicalSportsSourceOutcome
- func (c *CanonicalSportsSourceOutcome) GetCanonicalOutcomeKey() string
- func (c *CanonicalSportsSourceOutcome) GetExtraProperties() map[string]interface{}
- func (c *CanonicalSportsSourceOutcome) GetLabel() *string
- func (c *CanonicalSportsSourceOutcome) GetOutcomeID() *string
- func (c *CanonicalSportsSourceOutcome) GetSide() *string
- func (c *CanonicalSportsSourceOutcome) MarshalJSON() ([]byte, error)
- func (c *CanonicalSportsSourceOutcome) SetCanonicalOutcomeKey(canonicalOutcomeKey string)
- func (c *CanonicalSportsSourceOutcome) SetLabel(label *string)
- func (c *CanonicalSportsSourceOutcome) SetOutcomeID(outcomeID *string)
- func (c *CanonicalSportsSourceOutcome) SetSide(side *string)
- func (c *CanonicalSportsSourceOutcome) String() string
- func (c *CanonicalSportsSourceOutcome) UnmarshalJSON(data []byte) error
- type CanonicalSportsSubject
- func (c *CanonicalSportsSubject) GetExtraProperties() map[string]interface{}
- func (c *CanonicalSportsSubject) GetKey() string
- func (c *CanonicalSportsSubject) GetName() *string
- func (c *CanonicalSportsSubject) GetTeam() *string
- func (c *CanonicalSportsSubject) GetType() string
- func (c *CanonicalSportsSubject) MarshalJSON() ([]byte, error)
- func (c *CanonicalSportsSubject) SetKey(key string)
- func (c *CanonicalSportsSubject) SetName(name *string)
- func (c *CanonicalSportsSubject) SetTeam(team *string)
- func (c *CanonicalSportsSubject) SetType(type_ string)
- func (c *CanonicalSportsSubject) String() string
- func (c *CanonicalSportsSubject) UnmarshalJSON(data []byte) error
- type CanonicalSportsSubmarket
- func (c *CanonicalSportsSubmarket) GetDisplayName() *string
- func (c *CanonicalSportsSubmarket) GetExtraProperties() map[string]interface{}
- func (c *CanonicalSportsSubmarket) GetKey() string
- func (c *CanonicalSportsSubmarket) GetLine() *float64
- func (c *CanonicalSportsSubmarket) GetMarketType() string
- func (c *CanonicalSportsSubmarket) GetMetric() *string
- func (c *CanonicalSportsSubmarket) GetOutcomes() []*CanonicalSportsOutcome
- func (c *CanonicalSportsSubmarket) GetRuleComparisons() []*PlayerPropRuleComparison
- func (c *CanonicalSportsSubmarket) GetRules() *CanonicalSportsRules
- func (c *CanonicalSportsSubmarket) GetSegment() string
- func (c *CanonicalSportsSubmarket) GetSettlementEquivalence() *CanonicalSportsSubmarketSettlementEquivalence
- func (c *CanonicalSportsSubmarket) GetSourceMarkets() []*CanonicalSportsSourceMarket
- func (c *CanonicalSportsSubmarket) GetSubject() *CanonicalSportsSubject
- func (c *CanonicalSportsSubmarket) MarshalJSON() ([]byte, error)
- func (c *CanonicalSportsSubmarket) SetDisplayName(displayName *string)
- func (c *CanonicalSportsSubmarket) SetKey(key string)
- func (c *CanonicalSportsSubmarket) SetLine(line *float64)
- func (c *CanonicalSportsSubmarket) SetMarketType(marketType string)
- func (c *CanonicalSportsSubmarket) SetMetric(metric *string)
- func (c *CanonicalSportsSubmarket) SetOutcomes(outcomes []*CanonicalSportsOutcome)
- func (c *CanonicalSportsSubmarket) SetRuleComparisons(ruleComparisons []*PlayerPropRuleComparison)
- func (c *CanonicalSportsSubmarket) SetRules(rules *CanonicalSportsRules)
- func (c *CanonicalSportsSubmarket) SetSegment(segment string)
- func (c *CanonicalSportsSubmarket) SetSettlementEquivalence(settlementEquivalence *CanonicalSportsSubmarketSettlementEquivalence)
- func (c *CanonicalSportsSubmarket) SetSourceMarkets(sourceMarkets []*CanonicalSportsSourceMarket)
- func (c *CanonicalSportsSubmarket) SetSubject(subject *CanonicalSportsSubject)
- func (c *CanonicalSportsSubmarket) String() string
- func (c *CanonicalSportsSubmarket) UnmarshalJSON(data []byte) error
- type CanonicalSportsSubmarketSettlementEquivalence
- type CategoriesResponse
- func (c *CategoriesResponse) GetData() []*CategoryInfo
- func (c *CategoriesResponse) GetExtraProperties() map[string]interface{}
- func (c *CategoriesResponse) MarshalJSON() ([]byte, error)
- func (c *CategoriesResponse) SetData(data []*CategoryInfo)
- func (c *CategoriesResponse) String() string
- func (c *CategoriesResponse) UnmarshalJSON(data []byte) error
- type CategoryInfo
- func (c *CategoryInfo) GetDescription() string
- func (c *CategoryInfo) GetExtraProperties() map[string]interface{}
- func (c *CategoryInfo) GetID() MarketCategory
- func (c *CategoryInfo) GetName() string
- func (c *CategoryInfo) MarshalJSON() ([]byte, error)
- func (c *CategoryInfo) SetDescription(description string)
- func (c *CategoryInfo) SetID(id MarketCategory)
- func (c *CategoryInfo) SetName(name string)
- func (c *CategoryInfo) String() string
- func (c *CategoryInfo) UnmarshalJSON(data []byte) error
- type ConflictError
- type CryptoPriceItem
- func (c *CryptoPriceItem) GetExtraProperties() map[string]interface{}
- func (c *CryptoPriceItem) GetSymbol() string
- func (c *CryptoPriceItem) GetTimestamp() int64
- func (c *CryptoPriceItem) GetValue() float64
- func (c *CryptoPriceItem) MarshalJSON() ([]byte, error)
- func (c *CryptoPriceItem) SetSymbol(symbol string)
- func (c *CryptoPriceItem) SetTimestamp(timestamp int64)
- func (c *CryptoPriceItem) SetValue(value float64)
- func (c *CryptoPriceItem) String() string
- func (c *CryptoPriceItem) UnmarshalJSON(data []byte) error
- type CryptoPricesResponse
- func (c *CryptoPricesResponse) GetExtraProperties() map[string]interface{}
- func (c *CryptoPricesResponse) GetPaginationKey() *string
- func (c *CryptoPricesResponse) GetPrices() []*CryptoPriceItem
- func (c *CryptoPricesResponse) GetTotal() *int
- func (c *CryptoPricesResponse) MarshalJSON() ([]byte, error)
- func (c *CryptoPricesResponse) SetPaginationKey(paginationKey *string)
- func (c *CryptoPricesResponse) SetPrices(prices []*CryptoPriceItem)
- func (c *CryptoPricesResponse) SetTotal(total *int)
- func (c *CryptoPricesResponse) String() string
- func (c *CryptoPricesResponse) UnmarshalJSON(data []byte) error
- type ErrorResponse
- func (e *ErrorResponse) GetError() string
- func (e *ErrorResponse) GetExtraProperties() map[string]interface{}
- func (e *ErrorResponse) GetMessage() *string
- func (e *ErrorResponse) GetStatusCode() int
- func (e *ErrorResponse) MarshalJSON() ([]byte, error)
- func (e *ErrorResponse) SetError(error_ string)
- func (e *ErrorResponse) SetMessage(message *string)
- func (e *ErrorResponse) SetStatusCode(statusCode int)
- func (e *ErrorResponse) String() string
- func (e *ErrorResponse) UnmarshalJSON(data []byte) error
- type EventFanout
- func (e *EventFanout) GetExtraProperties() map[string]interface{}
- func (e *EventFanout) GetSiblingsAttempted() []string
- func (e *EventFanout) GetSiblingsMissing() []string
- func (e *EventFanout) GetSiblingsReturned() []string
- func (e *EventFanout) MarshalJSON() ([]byte, error)
- func (e *EventFanout) SetSiblingsAttempted(siblingsAttempted []string)
- func (e *EventFanout) SetSiblingsMissing(siblingsMissing []string)
- func (e *EventFanout) SetSiblingsReturned(siblingsReturned []string)
- func (e *EventFanout) String() string
- func (e *EventFanout) UnmarshalJSON(data []byte) error
- type EventMarket
- func (e *EventMarket) GetExtraProperties() map[string]interface{}
- func (e *EventMarket) GetMarketID() string
- func (e *EventMarket) GetTitle() string
- func (e *EventMarket) MarshalJSON() ([]byte, error)
- func (e *EventMarket) SetMarketID(marketID string)
- func (e *EventMarket) SetTitle(title string)
- func (e *EventMarket) String() string
- func (e *EventMarket) UnmarshalJSON(data []byte) error
- type EventResponse
- func (e *EventResponse) GetEventID() string
- func (e *EventResponse) GetExtraProperties() map[string]interface{}
- func (e *EventResponse) GetFanout() *EventFanout
- func (e *EventResponse) GetMarkets() []*EventMarket
- func (e *EventResponse) GetPlatform() EventResponsePlatform
- func (e *EventResponse) GetTitle() string
- func (e *EventResponse) MarshalJSON() ([]byte, error)
- func (e *EventResponse) SetEventID(eventID string)
- func (e *EventResponse) SetFanout(fanout *EventFanout)
- func (e *EventResponse) SetMarkets(markets []*EventMarket)
- func (e *EventResponse) SetPlatform(platform EventResponsePlatform)
- func (e *EventResponse) SetTitle(title string)
- func (e *EventResponse) String() string
- func (e *EventResponse) UnmarshalJSON(data []byte) error
- type EventResponsePlatform
- type FileParam
- type FileParamOption
- type ForbiddenError
- type GetBinanceCryptoPricesRequest
- func (g *GetBinanceCryptoPricesRequest) SetCurrency(currency string)
- func (g *GetBinanceCryptoPricesRequest) SetEndTime(endTime *int64)
- func (g *GetBinanceCryptoPricesRequest) SetLimit(limit *int)
- func (g *GetBinanceCryptoPricesRequest) SetPaginationKey(paginationKey *string)
- func (g *GetBinanceCryptoPricesRequest) SetStartTime(startTime *int64)
- type GetEventRequest
- type GetEventRequestPlatform
- type GetMarketRequest
- type GetMarketRequestPlatform
- type GetMarketsRequest
- type GetMarketsRequestProvider
- type GetPolymarketWalletRequest
- type GetSportsMatchingMarketsRequest
- func (g *GetSportsMatchingMarketsRequest) SetAlphaArcadeMarketID(alphaArcadeMarketID []*string)
- func (g *GetSportsMatchingMarketsRequest) SetCursor(cursor *string)
- func (g *GetSportsMatchingMarketsRequest) SetEventID(eventID []*string)
- func (g *GetSportsMatchingMarketsRequest) SetIncludeSettled(includeSettled *bool)
- func (g *GetSportsMatchingMarketsRequest) SetIncludeSubmarkets(includeSubmarkets *bool)
- func (g *GetSportsMatchingMarketsRequest) SetKalshiEventTicker(kalshiEventTicker []*string)
- func (g *GetSportsMatchingMarketsRequest) SetLimit(limit *int)
- func (g *GetSportsMatchingMarketsRequest) SetPlayerPropMatch(playerPropMatch *GetSportsMatchingMarketsRequestPlayerPropMatch)
- func (g *GetSportsMatchingMarketsRequest) SetPolymarketMarketSlug(polymarketMarketSlug []*string)
- func (g *GetSportsMatchingMarketsRequest) SetPredictMarketID(predictMarketID []*string)
- func (g *GetSportsMatchingMarketsRequest) SetProphetxEventID(prophetxEventID []*string)
- func (g *GetSportsMatchingMarketsRequest) SetProphetxMarketID(prophetxMarketID []*string)
- func (g *GetSportsMatchingMarketsRequest) SetSxbetMarketID(sxbetMarketID []*string)
- type GetSportsMatchingMarketsRequestPlayerPropMatch
- type ListPolymarketWalletPositionsRequest
- type MarketCategory
- type MarketDetailFeeLeg
- func (m *MarketDetailFeeLeg) GetExponent() *float64
- func (m *MarketDetailFeeLeg) GetExtraProperties() map[string]interface{}
- func (m *MarketDetailFeeLeg) GetModel() MarketDetailFeeLegModel
- func (m *MarketDetailFeeLeg) GetRate() *float64
- func (m *MarketDetailFeeLeg) GetRounding() *MarketDetailFeeRounding
- func (m *MarketDetailFeeLeg) MarshalJSON() ([]byte, error)
- func (m *MarketDetailFeeLeg) SetExponent(exponent *float64)
- func (m *MarketDetailFeeLeg) SetModel(model MarketDetailFeeLegModel)
- func (m *MarketDetailFeeLeg) SetRate(rate *float64)
- func (m *MarketDetailFeeLeg) SetRounding(rounding *MarketDetailFeeRounding)
- func (m *MarketDetailFeeLeg) String() string
- func (m *MarketDetailFeeLeg) UnmarshalJSON(data []byte) error
- type MarketDetailFeeLegModel
- type MarketDetailFeeRounding
- func (m *MarketDetailFeeRounding) GetDirection() MarketDetailFeeRoundingDirection
- func (m *MarketDetailFeeRounding) GetExtraProperties() map[string]interface{}
- func (m *MarketDetailFeeRounding) GetIncrement() float64
- func (m *MarketDetailFeeRounding) MarshalJSON() ([]byte, error)
- func (m *MarketDetailFeeRounding) SetDirection(direction MarketDetailFeeRoundingDirection)
- func (m *MarketDetailFeeRounding) SetIncrement(increment float64)
- func (m *MarketDetailFeeRounding) String() string
- func (m *MarketDetailFeeRounding) UnmarshalJSON(data []byte) error
- type MarketDetailFeeRoundingDirection
- type MarketDetailOutcome
- func (m *MarketDetailOutcome) GetAsk() *float64
- func (m *MarketDetailOutcome) GetAskSize() *float64
- func (m *MarketDetailOutcome) GetBid() *float64
- func (m *MarketDetailOutcome) GetBidSize() *float64
- func (m *MarketDetailOutcome) GetExtraProperties() map[string]interface{}
- func (m *MarketDetailOutcome) GetLast() *float64
- func (m *MarketDetailOutcome) GetName() string
- func (m *MarketDetailOutcome) GetOutcomeID() *string
- func (m *MarketDetailOutcome) GetPrice() *float64
- func (m *MarketDetailOutcome) MarshalJSON() ([]byte, error)
- func (m *MarketDetailOutcome) SetAsk(ask *float64)
- func (m *MarketDetailOutcome) SetAskSize(askSize *float64)
- func (m *MarketDetailOutcome) SetBid(bid *float64)
- func (m *MarketDetailOutcome) SetBidSize(bidSize *float64)
- func (m *MarketDetailOutcome) SetLast(last *float64)
- func (m *MarketDetailOutcome) SetName(name string)
- func (m *MarketDetailOutcome) SetOutcomeID(outcomeID *string)
- func (m *MarketDetailOutcome) SetPrice(price *float64)
- func (m *MarketDetailOutcome) String() string
- func (m *MarketDetailOutcome) UnmarshalJSON(data []byte) error
- type MarketDetailPricing
- func (m *MarketDetailPricing) GetAsOf() *time.Time
- func (m *MarketDetailPricing) GetAsOfKind() MarketDetailPricingAsOfKind
- func (m *MarketDetailPricing) GetAvailability() MarketDetailPricingAvailability
- func (m *MarketDetailPricing) GetExtraProperties() map[string]interface{}
- func (m *MarketDetailPricing) GetNegRisk() *bool
- func (m *MarketDetailPricing) GetObservedAt() *time.Time
- func (m *MarketDetailPricing) GetScale() MarketDetailPricingScale
- func (m *MarketDetailPricing) GetSource() MarketDetailPricingSource
- func (m *MarketDetailPricing) MarshalJSON() ([]byte, error)
- func (m *MarketDetailPricing) SetAsOf(asOf *time.Time)
- func (m *MarketDetailPricing) SetAsOfKind(asOfKind MarketDetailPricingAsOfKind)
- func (m *MarketDetailPricing) SetAvailability(availability MarketDetailPricingAvailability)
- func (m *MarketDetailPricing) SetNegRisk(negRisk *bool)
- func (m *MarketDetailPricing) SetObservedAt(observedAt *time.Time)
- func (m *MarketDetailPricing) SetScale(scale MarketDetailPricingScale)
- func (m *MarketDetailPricing) SetSource(source MarketDetailPricingSource)
- func (m *MarketDetailPricing) String() string
- func (m *MarketDetailPricing) UnmarshalJSON(data []byte) error
- type MarketDetailPricingAsOfKind
- type MarketDetailPricingAvailability
- type MarketDetailPricingScale
- type MarketDetailPricingSource
- type MarketDetailResponse
- func (m *MarketDetailResponse) GetExtraProperties() map[string]interface{}
- func (m *MarketDetailResponse) GetID() string
- func (m *MarketDetailResponse) GetLiquidityUsd() *float64
- func (m *MarketDetailResponse) GetOpenInterest() *float64
- func (m *MarketDetailResponse) GetOutcomes() []*MarketDetailOutcome
- func (m *MarketDetailResponse) GetPricing() *MarketDetailPricing
- func (m *MarketDetailResponse) GetProvider() MarketDetailResponseProvider
- func (m *MarketDetailResponse) GetProviderID() string
- func (m *MarketDetailResponse) GetStatus() MarketDetailResponseStatus
- func (m *MarketDetailResponse) GetTitle() string
- func (m *MarketDetailResponse) GetTradingFees() *MarketDetailTradingFees
- func (m *MarketDetailResponse) GetVolume24HContracts() *float64
- func (m *MarketDetailResponse) GetVolume24HUsd() *float64
- func (m *MarketDetailResponse) GetVolumeTotalContracts() *float64
- func (m *MarketDetailResponse) GetVolumeTotalUsd() *float64
- func (m *MarketDetailResponse) MarshalJSON() ([]byte, error)
- func (m *MarketDetailResponse) SetID(id string)
- func (m *MarketDetailResponse) SetLiquidityUsd(liquidityUsd *float64)
- func (m *MarketDetailResponse) SetOpenInterest(openInterest *float64)
- func (m *MarketDetailResponse) SetOutcomes(outcomes []*MarketDetailOutcome)
- func (m *MarketDetailResponse) SetPricing(pricing *MarketDetailPricing)
- func (m *MarketDetailResponse) SetProvider(provider MarketDetailResponseProvider)
- func (m *MarketDetailResponse) SetProviderID(providerID string)
- func (m *MarketDetailResponse) SetStatus(status MarketDetailResponseStatus)
- func (m *MarketDetailResponse) SetTitle(title string)
- func (m *MarketDetailResponse) SetTradingFees(tradingFees *MarketDetailTradingFees)
- func (m *MarketDetailResponse) SetVolume24HContracts(volume24HContracts *float64)
- func (m *MarketDetailResponse) SetVolume24HUsd(volume24HUsd *float64)
- func (m *MarketDetailResponse) SetVolumeTotalContracts(volumeTotalContracts *float64)
- func (m *MarketDetailResponse) SetVolumeTotalUsd(volumeTotalUsd *float64)
- func (m *MarketDetailResponse) String() string
- func (m *MarketDetailResponse) UnmarshalJSON(data []byte) error
- type MarketDetailResponseProvider
- type MarketDetailResponseStatus
- type MarketDetailScheduledFeeChange
- func (m *MarketDetailScheduledFeeChange) GetEffectiveAt() time.Time
- func (m *MarketDetailScheduledFeeChange) GetExtraProperties() map[string]interface{}
- func (m *MarketDetailScheduledFeeChange) GetMaker() *MarketDetailFeeLeg
- func (m *MarketDetailScheduledFeeChange) GetTaker() *MarketDetailFeeLeg
- func (m *MarketDetailScheduledFeeChange) MarshalJSON() ([]byte, error)
- func (m *MarketDetailScheduledFeeChange) SetEffectiveAt(effectiveAt time.Time)
- func (m *MarketDetailScheduledFeeChange) SetMaker(maker *MarketDetailFeeLeg)
- func (m *MarketDetailScheduledFeeChange) SetTaker(taker *MarketDetailFeeLeg)
- func (m *MarketDetailScheduledFeeChange) String() string
- func (m *MarketDetailScheduledFeeChange) UnmarshalJSON(data []byte) error
- type MarketDetailTradingFees
- func (m *MarketDetailTradingFees) GetAvailability() MarketDetailTradingFeesAvailability
- func (m *MarketDetailTradingFees) GetChargeBasis() *MarketDetailTradingFeesChargeBasis
- func (m *MarketDetailTradingFees) GetExtraProperties() map[string]interface{}
- func (m *MarketDetailTradingFees) GetMaker() *MarketDetailFeeLeg
- func (m *MarketDetailTradingFees) GetObservedAt() *time.Time
- func (m *MarketDetailTradingFees) GetScheduledChange() *MarketDetailScheduledFeeChange
- func (m *MarketDetailTradingFees) GetSource() MarketDetailTradingFeesSource
- func (m *MarketDetailTradingFees) GetTaker() *MarketDetailFeeLeg
- func (m *MarketDetailTradingFees) MarshalJSON() ([]byte, error)
- func (m *MarketDetailTradingFees) SetAvailability(availability MarketDetailTradingFeesAvailability)
- func (m *MarketDetailTradingFees) SetChargeBasis(chargeBasis *MarketDetailTradingFeesChargeBasis)
- func (m *MarketDetailTradingFees) SetMaker(maker *MarketDetailFeeLeg)
- func (m *MarketDetailTradingFees) SetObservedAt(observedAt *time.Time)
- func (m *MarketDetailTradingFees) SetScheduledChange(scheduledChange *MarketDetailScheduledFeeChange)
- func (m *MarketDetailTradingFees) SetSource(source MarketDetailTradingFeesSource)
- func (m *MarketDetailTradingFees) SetTaker(taker *MarketDetailFeeLeg)
- func (m *MarketDetailTradingFees) String() string
- func (m *MarketDetailTradingFees) UnmarshalJSON(data []byte) error
- type MarketDetailTradingFeesAvailability
- type MarketDetailTradingFeesChargeBasis
- type MarketDetailTradingFeesSource
- type MarketsListResponse
- func (m *MarketsListResponse) GetData() []*UnifiedMarket
- func (m *MarketsListResponse) GetExtraProperties() map[string]interface{}
- func (m *MarketsListResponse) GetPagination() *PaginationBlock
- func (m *MarketsListResponse) GetSnapshot() *MarketsSnapshot
- func (m *MarketsListResponse) MarshalJSON() ([]byte, error)
- func (m *MarketsListResponse) SetData(data []*UnifiedMarket)
- func (m *MarketsListResponse) SetPagination(pagination *PaginationBlock)
- func (m *MarketsListResponse) SetSnapshot(snapshot *MarketsSnapshot)
- func (m *MarketsListResponse) String() string
- func (m *MarketsListResponse) UnmarshalJSON(data []byte) error
- type MarketsSnapshot
- func (m *MarketsSnapshot) GetExtraProperties() map[string]interface{}
- func (m *MarketsSnapshot) GetObservedAt() *time.Time
- func (m *MarketsSnapshot) MarshalJSON() ([]byte, error)
- func (m *MarketsSnapshot) SetObservedAt(observedAt *time.Time)
- func (m *MarketsSnapshot) String() string
- func (m *MarketsSnapshot) UnmarshalJSON(data []byte) error
- type NotFoundError
- type PaginationBlock
- func (p *PaginationBlock) GetExtraProperties() map[string]interface{}
- func (p *PaginationBlock) GetHasMore() bool
- func (p *PaginationBlock) GetLimit() int
- func (p *PaginationBlock) GetNextCursor() *string
- func (p *PaginationBlock) GetTotal() int
- func (p *PaginationBlock) MarshalJSON() ([]byte, error)
- func (p *PaginationBlock) SetHasMore(hasMore bool)
- func (p *PaginationBlock) SetLimit(limit int)
- func (p *PaginationBlock) SetNextCursor(nextCursor *string)
- func (p *PaginationBlock) SetTotal(total int)
- func (p *PaginationBlock) String() string
- func (p *PaginationBlock) UnmarshalJSON(data []byte) error
- type PaymentRequiredError
- type PaymentRequiredErrorAction
- type PaymentRequiredErrorBody
- func (p *PaymentRequiredErrorBody) GetAction() PaymentRequiredErrorAction
- func (p *PaymentRequiredErrorBody) GetCurrentPeriodRequests() *int64
- func (p *PaymentRequiredErrorBody) GetCurrentTier() string
- func (p *PaymentRequiredErrorBody) GetError() string
- func (p *PaymentRequiredErrorBody) GetExtraProperties() map[string]interface{}
- func (p *PaymentRequiredErrorBody) GetIncludedRequestsPerMonth() *int64
- func (p *PaymentRequiredErrorBody) GetMessage() *string
- func (p *PaymentRequiredErrorBody) GetRequiredTier() string
- func (p *PaymentRequiredErrorBody) GetStatusCode() int
- func (p *PaymentRequiredErrorBody) MarshalJSON() ([]byte, error)
- func (p *PaymentRequiredErrorBody) SetAction(action PaymentRequiredErrorAction)
- func (p *PaymentRequiredErrorBody) SetCurrentPeriodRequests(currentPeriodRequests *int64)
- func (p *PaymentRequiredErrorBody) SetCurrentTier(currentTier string)
- func (p *PaymentRequiredErrorBody) SetError(error_ string)
- func (p *PaymentRequiredErrorBody) SetIncludedRequestsPerMonth(includedRequestsPerMonth *int64)
- func (p *PaymentRequiredErrorBody) SetMessage(message *string)
- func (p *PaymentRequiredErrorBody) SetRequiredTier(requiredTier string)
- func (p *PaymentRequiredErrorBody) SetStatusCode(statusCode int)
- func (p *PaymentRequiredErrorBody) String() string
- func (p *PaymentRequiredErrorBody) UnmarshalJSON(data []byte) error
- type Plan
- func (p *Plan) GetBillingTier() string
- func (p *Plan) GetContactSales() bool
- func (p *Plan) GetCtaLabel() string
- func (p *Plan) GetExtraProperties() map[string]interface{}
- func (p *Plan) GetFeatures() []string
- func (p *Plan) GetHighlighted() bool
- func (p *Plan) GetIncludedRequestsPerMonth() int64
- func (p *Plan) GetKey() string
- func (p *Plan) GetMaxKeys() int
- func (p *Plan) GetMonthlyPriceCents() int64
- func (p *Plan) GetName() string
- func (p *Plan) GetOverageCentsPer1K() int64
- func (p *Plan) GetRateLimitPerMin() int
- func (p *Plan) GetTagline() string
- func (p *Plan) GetTrialDays() int
- func (p *Plan) MarshalJSON() ([]byte, error)
- func (p *Plan) SetBillingTier(billingTier string)
- func (p *Plan) SetContactSales(contactSales bool)
- func (p *Plan) SetCtaLabel(ctaLabel string)
- func (p *Plan) SetFeatures(features []string)
- func (p *Plan) SetHighlighted(highlighted bool)
- func (p *Plan) SetIncludedRequestsPerMonth(includedRequestsPerMonth int64)
- func (p *Plan) SetKey(key string)
- func (p *Plan) SetMaxKeys(maxKeys int)
- func (p *Plan) SetMonthlyPriceCents(monthlyPriceCents int64)
- func (p *Plan) SetName(name string)
- func (p *Plan) SetOverageCentsPer1K(overageCentsPer1K int64)
- func (p *Plan) SetRateLimitPerMin(rateLimitPerMin int)
- func (p *Plan) SetTagline(tagline string)
- func (p *Plan) SetTrialDays(trialDays int)
- func (p *Plan) String() string
- func (p *Plan) UnmarshalJSON(data []byte) error
- type PlansResponse
- func (p *PlansResponse) GetData() []*Plan
- func (p *PlansResponse) GetExtraProperties() map[string]interface{}
- func (p *PlansResponse) MarshalJSON() ([]byte, error)
- func (p *PlansResponse) SetData(data []*Plan)
- func (p *PlansResponse) String() string
- func (p *PlansResponse) UnmarshalJSON(data []byte) error
- type PlatformMarket
- func (p *PlatformMarket) GetEventID() *string
- func (p *PlatformMarket) GetEventTicker() *string
- func (p *PlatformMarket) GetExtraProperties() map[string]interface{}
- func (p *PlatformMarket) GetMarketID() *string
- func (p *PlatformMarket) GetMarketSlug() *string
- func (p *PlatformMarket) GetMarketTickers() []string
- func (p *PlatformMarket) GetOutcomeIDs() []string
- func (p *PlatformMarket) GetPlatform() PlatformMarketPlatform
- func (p *PlatformMarket) GetTokenIDs() []string
- func (p *PlatformMarket) MarshalJSON() ([]byte, error)
- func (p *PlatformMarket) SetEventID(eventID *string)
- func (p *PlatformMarket) SetEventTicker(eventTicker *string)
- func (p *PlatformMarket) SetMarketID(marketID *string)
- func (p *PlatformMarket) SetMarketSlug(marketSlug *string)
- func (p *PlatformMarket) SetMarketTickers(marketTickers []string)
- func (p *PlatformMarket) SetOutcomeIDs(outcomeIDs []string)
- func (p *PlatformMarket) SetPlatform(platform PlatformMarketPlatform)
- func (p *PlatformMarket) SetTokenIDs(tokenIDs []string)
- func (p *PlatformMarket) String() string
- func (p *PlatformMarket) UnmarshalJSON(data []byte) error
- type PlatformMarketPlatform
- type PlayerPropRuleComparison
- func (p *PlayerPropRuleComparison) GetComparison() PlayerPropRuleComparisonComparison
- func (p *PlayerPropRuleComparison) GetExtraProperties() map[string]interface{}
- func (p *PlayerPropRuleComparison) GetLabel() string
- func (p *PlayerPropRuleComparison) GetRule() PlayerPropRuleComparisonRule
- func (p *PlayerPropRuleComparison) GetSourceValues() []*PlayerPropRuleSourceValue
- func (p *PlayerPropRuleComparison) MarshalJSON() ([]byte, error)
- func (p *PlayerPropRuleComparison) SetComparison(comparison PlayerPropRuleComparisonComparison)
- func (p *PlayerPropRuleComparison) SetLabel(label string)
- func (p *PlayerPropRuleComparison) SetRule(rule PlayerPropRuleComparisonRule)
- func (p *PlayerPropRuleComparison) SetSourceValues(sourceValues []*PlayerPropRuleSourceValue)
- func (p *PlayerPropRuleComparison) String() string
- func (p *PlayerPropRuleComparison) UnmarshalJSON(data []byte) error
- type PlayerPropRuleComparisonComparison
- type PlayerPropRuleComparisonRule
- type PlayerPropRuleSourceValue
- func (p *PlayerPropRuleSourceValue) GetDescription() string
- func (p *PlayerPropRuleSourceValue) GetEvidenceURL() *string
- func (p *PlayerPropRuleSourceValue) GetExtraProperties() map[string]interface{}
- func (p *PlayerPropRuleSourceValue) GetMarketID() string
- func (p *PlayerPropRuleSourceValue) GetProvider() string
- func (p *PlayerPropRuleSourceValue) GetValue() string
- func (p *PlayerPropRuleSourceValue) MarshalJSON() ([]byte, error)
- func (p *PlayerPropRuleSourceValue) SetDescription(description string)
- func (p *PlayerPropRuleSourceValue) SetEvidenceURL(evidenceURL *string)
- func (p *PlayerPropRuleSourceValue) SetMarketID(marketID string)
- func (p *PlayerPropRuleSourceValue) SetProvider(provider string)
- func (p *PlayerPropRuleSourceValue) SetValue(value string)
- func (p *PlayerPropRuleSourceValue) String() string
- func (p *PlayerPropRuleSourceValue) UnmarshalJSON(data []byte) error
- type PolymarketPosition
- func (p *PolymarketPosition) GetConditionID() string
- func (p *PolymarketPosition) GetExtraProperties() map[string]interface{}
- func (p *PolymarketPosition) GetOutcome() string
- func (p *PolymarketPosition) GetShares() float64
- func (p *PolymarketPosition) MarshalJSON() ([]byte, error)
- func (p *PolymarketPosition) SetConditionID(conditionID string)
- func (p *PolymarketPosition) SetOutcome(outcome string)
- func (p *PolymarketPosition) SetShares(shares float64)
- func (p *PolymarketPosition) String() string
- func (p *PolymarketPosition) UnmarshalJSON(data []byte) error
- type PolymarketPositionsResponse
- func (p *PolymarketPositionsResponse) GetAddress() string
- func (p *PolymarketPositionsResponse) GetData() []*PolymarketPosition
- func (p *PolymarketPositionsResponse) GetExtraProperties() map[string]interface{}
- func (p *PolymarketPositionsResponse) GetPagination() *PaginationBlock
- func (p *PolymarketPositionsResponse) MarshalJSON() ([]byte, error)
- func (p *PolymarketPositionsResponse) SetAddress(address string)
- func (p *PolymarketPositionsResponse) SetData(data []*PolymarketPosition)
- func (p *PolymarketPositionsResponse) SetPagination(pagination *PaginationBlock)
- func (p *PolymarketPositionsResponse) String() string
- func (p *PolymarketPositionsResponse) UnmarshalJSON(data []byte) error
- type PolymarketWalletResponse
- func (p *PolymarketWalletResponse) GetAddress() string
- func (p *PolymarketWalletResponse) GetDisplayName() *string
- func (p *PolymarketWalletResponse) GetExtraProperties() map[string]interface{}
- func (p *PolymarketWalletResponse) GetProfileImage() *string
- func (p *PolymarketWalletResponse) GetSigner() *string
- func (p *PolymarketWalletResponse) MarshalJSON() ([]byte, error)
- func (p *PolymarketWalletResponse) SetAddress(address string)
- func (p *PolymarketWalletResponse) SetDisplayName(displayName *string)
- func (p *PolymarketWalletResponse) SetProfileImage(profileImage *string)
- func (p *PolymarketWalletResponse) SetSigner(signer *string)
- func (p *PolymarketWalletResponse) String() string
- func (p *PolymarketWalletResponse) UnmarshalJSON(data []byte) error
- type ServiceUnavailableError
- type SportsMatchingResponse
- func (s *SportsMatchingResponse) GetCanonicalEvents() map[string]*CanonicalSportsEvent
- func (s *SportsMatchingResponse) GetExtraProperties() map[string]interface{}
- func (s *SportsMatchingResponse) GetMarkets() map[string][]*PlatformMarket
- func (s *SportsMatchingResponse) GetPagination() *PaginationBlock
- func (s *SportsMatchingResponse) MarshalJSON() ([]byte, error)
- func (s *SportsMatchingResponse) SetCanonicalEvents(canonicalEvents map[string]*CanonicalSportsEvent)
- func (s *SportsMatchingResponse) SetMarkets(markets map[string][]*PlatformMarket)
- func (s *SportsMatchingResponse) SetPagination(pagination *PaginationBlock)
- func (s *SportsMatchingResponse) String() string
- func (s *SportsMatchingResponse) UnmarshalJSON(data []byte) error
- type TooManyRequestsError
- type UnauthorizedError
- type UnifiedMarket
- func (u *UnifiedMarket) GetCategory() MarketCategory
- func (u *UnifiedMarket) GetExtraProperties() map[string]interface{}
- func (u *UnifiedMarket) GetID() string
- func (u *UnifiedMarket) GetProvider() UnifiedMarketProvider
- func (u *UnifiedMarket) GetTitle() string
- func (u *UnifiedMarket) MarshalJSON() ([]byte, error)
- func (u *UnifiedMarket) SetCategory(category MarketCategory)
- func (u *UnifiedMarket) SetID(id string)
- func (u *UnifiedMarket) SetProvider(provider UnifiedMarketProvider)
- func (u *UnifiedMarket) SetTitle(title string)
- func (u *UnifiedMarket) String() string
- func (u *UnifiedMarket) UnmarshalJSON(data []byte) error
- type UnifiedMarketProvider
Constants ¶
This section is empty.
Variables ¶
var Environments = struct { Production string }{ Production: "https://api.predictorsdk.com", }
Environments defines all of the API environments. These values can be used with the WithBaseURL RequestOption to override the client's default environment, if any.
var ErrorCodes internal.ErrorCodes = internal.ErrorCodes{ 503: func(apiError *core.APIError) error { return &ServiceUnavailableError{ APIError: apiError, } }, 400: func(apiError *core.APIError) error { return &BadRequestError{ APIError: apiError, } }, 401: func(apiError *core.APIError) error { return &UnauthorizedError{ APIError: apiError, } }, 402: func(apiError *core.APIError) error { return &PaymentRequiredError{ APIError: apiError, } }, 403: func(apiError *core.APIError) error { return &ForbiddenError{ APIError: apiError, } }, 429: func(apiError *core.APIError) error { return &TooManyRequestsError{ APIError: apiError, } }, 502: func(apiError *core.APIError) error { return &BadGatewayError{ APIError: apiError, } }, 404: func(apiError *core.APIError) error { return &NotFoundError{ APIError: apiError, } }, 409: func(apiError *core.APIError) error { return &ConflictError{ APIError: apiError, } }, }
Functions ¶
func Complex128 ¶
func Complex128(c complex128) *complex128
Complex128 returns a pointer to the given complex128 value.
func MustParseDate ¶
MustParseDate attempts to parse the given string as a date time.Time, and panics upon failure.
func MustParseDateTime ¶
MustParseDateTime attempts to parse the given string as a datetime time.Time, and panics upon failure.
Types ¶
type AmbiguousIdentifierError ¶ added in v0.15.0
type AmbiguousIdentifierError struct {
// Short machine-stable reason, e.g. `ambiguous market_id`.
Error string `json:"error" url:"error"`
// Human-readable detail naming the identifier, the platforms it resolved on, and how to disambiguate.
Message *string `json:"message,omitempty" url:"message,omitempty"`
// The platforms this identifier resolved on. Each value is accepted verbatim by the `platform` query parameter.
Candidates []string `json:"candidates" url:"candidates"`
StatusCode int `json:"status_code" url:"status_code"`
// contains filtered or unexported fields
}
func (*AmbiguousIdentifierError) GetCandidates ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) GetCandidates() []string
func (*AmbiguousIdentifierError) GetError ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) GetError() string
func (*AmbiguousIdentifierError) GetExtraProperties ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) GetExtraProperties() map[string]interface{}
func (*AmbiguousIdentifierError) GetMessage ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) GetMessage() *string
func (*AmbiguousIdentifierError) GetStatusCode ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) GetStatusCode() int
func (*AmbiguousIdentifierError) MarshalJSON ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) MarshalJSON() ([]byte, error)
func (*AmbiguousIdentifierError) SetCandidates ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) SetCandidates(candidates []string)
SetCandidates sets the Candidates field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*AmbiguousIdentifierError) SetError ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) SetError(error_ string)
SetError sets the Error field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*AmbiguousIdentifierError) SetMessage ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) SetMessage(message *string)
SetMessage sets the Message field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*AmbiguousIdentifierError) SetStatusCode ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) SetStatusCode(statusCode int)
SetStatusCode sets the StatusCode field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*AmbiguousIdentifierError) String ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) String() string
func (*AmbiguousIdentifierError) UnmarshalJSON ¶ added in v0.15.0
func (a *AmbiguousIdentifierError) UnmarshalJSON(data []byte) error
type BadGatewayError ¶ added in v0.2.0
type BadGatewayError struct {
*core.APIError
Body *ErrorResponse
}
Upstream provider or API-key authorization dependency failed.
func (*BadGatewayError) MarshalJSON ¶ added in v0.2.0
func (b *BadGatewayError) MarshalJSON() ([]byte, error)
func (*BadGatewayError) UnmarshalJSON ¶ added in v0.2.0
func (b *BadGatewayError) UnmarshalJSON(data []byte) error
func (*BadGatewayError) Unwrap ¶ added in v0.2.0
func (b *BadGatewayError) Unwrap() error
type BadRequestError ¶
type BadRequestError struct {
*core.APIError
Body *ErrorResponse
}
Invalid query parameters (e.g. combining filter types or providing more than 100 unique lookup identifiers)
func (*BadRequestError) MarshalJSON ¶
func (b *BadRequestError) MarshalJSON() ([]byte, error)
func (*BadRequestError) UnmarshalJSON ¶
func (b *BadRequestError) UnmarshalJSON(data []byte) error
func (*BadRequestError) Unwrap ¶
func (b *BadRequestError) Unwrap() error
type CanonicalSportsEvent ¶ added in v0.10.0
type CanonicalSportsEvent struct {
// Stable canonical event key.
EventID string `json:"event_id" url:"event_id"`
// Canonical sport slug. `basketball`, `hockey`, `baseball`, or `football` today.
Sport *string `json:"sport,omitempty" url:"sport,omitempty"`
// Canonical league slug. Cross-platform matching covers `nba`, `wnba`, `nhl`, `mlb`, and `nfl` today. The value is the first segment of `event_id`, so `nba-okc-sas-2026-10-20` is an NBA game. Treat this as an open set — leagues are added without a breaking change.
League *string `json:"league,omitempty" url:"league,omitempty"`
Title string `json:"title" url:"title"`
Participants []*CanonicalSportsParticipant `json:"participants,omitempty" url:"participants,omitempty"`
Submarkets []*CanonicalSportsSubmarket `json:"submarkets" url:"submarkets"`
// contains filtered or unexported fields
}
func (*CanonicalSportsEvent) GetEventID ¶ added in v0.10.0
func (c *CanonicalSportsEvent) GetEventID() string
func (*CanonicalSportsEvent) GetExtraProperties ¶ added in v0.10.0
func (c *CanonicalSportsEvent) GetExtraProperties() map[string]interface{}
func (*CanonicalSportsEvent) GetLeague ¶ added in v0.10.0
func (c *CanonicalSportsEvent) GetLeague() *string
func (*CanonicalSportsEvent) GetParticipants ¶ added in v0.10.0
func (c *CanonicalSportsEvent) GetParticipants() []*CanonicalSportsParticipant
func (*CanonicalSportsEvent) GetSport ¶ added in v0.10.0
func (c *CanonicalSportsEvent) GetSport() *string
func (*CanonicalSportsEvent) GetSubmarkets ¶ added in v0.10.0
func (c *CanonicalSportsEvent) GetSubmarkets() []*CanonicalSportsSubmarket
func (*CanonicalSportsEvent) GetTitle ¶ added in v0.10.0
func (c *CanonicalSportsEvent) GetTitle() string
func (*CanonicalSportsEvent) MarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsEvent) MarshalJSON() ([]byte, error)
func (*CanonicalSportsEvent) SetEventID ¶ added in v0.10.0
func (c *CanonicalSportsEvent) SetEventID(eventID string)
SetEventID sets the EventID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsEvent) SetLeague ¶ added in v0.10.0
func (c *CanonicalSportsEvent) SetLeague(league *string)
SetLeague sets the League field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsEvent) SetParticipants ¶ added in v0.10.0
func (c *CanonicalSportsEvent) SetParticipants(participants []*CanonicalSportsParticipant)
SetParticipants sets the Participants field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsEvent) SetSport ¶ added in v0.10.0
func (c *CanonicalSportsEvent) SetSport(sport *string)
SetSport sets the Sport field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsEvent) SetSubmarkets ¶ added in v0.10.0
func (c *CanonicalSportsEvent) SetSubmarkets(submarkets []*CanonicalSportsSubmarket)
SetSubmarkets sets the Submarkets field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsEvent) SetTitle ¶ added in v0.10.0
func (c *CanonicalSportsEvent) SetTitle(title string)
SetTitle sets the Title field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsEvent) String ¶ added in v0.10.0
func (c *CanonicalSportsEvent) String() string
func (*CanonicalSportsEvent) UnmarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsEvent) UnmarshalJSON(data []byte) error
type CanonicalSportsOutcome ¶ added in v0.10.0
type CanonicalSportsOutcome struct {
Key string `json:"key" url:"key"`
Label string `json:"label" url:"label"`
Type *string `json:"type,omitempty" url:"type,omitempty"`
Side *string `json:"side,omitempty" url:"side,omitempty"`
// contains filtered or unexported fields
}
func (*CanonicalSportsOutcome) GetExtraProperties ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) GetExtraProperties() map[string]interface{}
func (*CanonicalSportsOutcome) GetKey ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) GetKey() string
func (*CanonicalSportsOutcome) GetLabel ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) GetLabel() string
func (*CanonicalSportsOutcome) GetSide ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) GetSide() *string
func (*CanonicalSportsOutcome) GetType ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) GetType() *string
func (*CanonicalSportsOutcome) MarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) MarshalJSON() ([]byte, error)
func (*CanonicalSportsOutcome) SetKey ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) SetKey(key string)
SetKey sets the Key field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsOutcome) SetLabel ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) SetLabel(label string)
SetLabel sets the Label field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsOutcome) SetSide ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) SetSide(side *string)
SetSide sets the Side field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsOutcome) SetType ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) SetType(type_ *string)
SetType sets the Type field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsOutcome) String ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) String() string
func (*CanonicalSportsOutcome) UnmarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsOutcome) UnmarshalJSON(data []byte) error
type CanonicalSportsParticipant ¶ added in v0.10.0
type CanonicalSportsParticipant struct {
Key string `json:"key" url:"key"`
Name *string `json:"name,omitempty" url:"name,omitempty"`
Role *string `json:"role,omitempty" url:"role,omitempty"`
// contains filtered or unexported fields
}
func (*CanonicalSportsParticipant) GetExtraProperties ¶ added in v0.10.0
func (c *CanonicalSportsParticipant) GetExtraProperties() map[string]interface{}
func (*CanonicalSportsParticipant) GetKey ¶ added in v0.10.0
func (c *CanonicalSportsParticipant) GetKey() string
func (*CanonicalSportsParticipant) GetName ¶ added in v0.10.0
func (c *CanonicalSportsParticipant) GetName() *string
func (*CanonicalSportsParticipant) GetRole ¶ added in v0.10.0
func (c *CanonicalSportsParticipant) GetRole() *string
func (*CanonicalSportsParticipant) MarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsParticipant) MarshalJSON() ([]byte, error)
func (*CanonicalSportsParticipant) SetKey ¶ added in v0.10.0
func (c *CanonicalSportsParticipant) SetKey(key string)
SetKey sets the Key field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsParticipant) SetName ¶ added in v0.10.0
func (c *CanonicalSportsParticipant) SetName(name *string)
SetName sets the Name field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsParticipant) SetRole ¶ added in v0.10.0
func (c *CanonicalSportsParticipant) SetRole(role *string)
SetRole sets the Role field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsParticipant) String ¶ added in v0.10.0
func (c *CanonicalSportsParticipant) String() string
func (*CanonicalSportsParticipant) UnmarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsParticipant) UnmarshalJSON(data []byte) error
type CanonicalSportsRules ¶ added in v0.10.0
type CanonicalSportsRules struct {
Settlement *string `json:"settlement,omitempty" url:"settlement,omitempty"`
// contains filtered or unexported fields
}
func (*CanonicalSportsRules) GetExtraProperties ¶ added in v0.10.0
func (c *CanonicalSportsRules) GetExtraProperties() map[string]interface{}
func (*CanonicalSportsRules) GetSettlement ¶ added in v0.10.0
func (c *CanonicalSportsRules) GetSettlement() *string
func (*CanonicalSportsRules) MarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsRules) MarshalJSON() ([]byte, error)
func (*CanonicalSportsRules) SetSettlement ¶ added in v0.10.0
func (c *CanonicalSportsRules) SetSettlement(settlement *string)
SetSettlement sets the Settlement field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsRules) String ¶ added in v0.10.0
func (c *CanonicalSportsRules) String() string
func (*CanonicalSportsRules) UnmarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsRules) UnmarshalJSON(data []byte) error
type CanonicalSportsSourceMarket ¶ added in v0.10.0
type CanonicalSportsSourceMarket struct {
Provider CanonicalSportsSourceMarketProvider `json:"provider" url:"provider"`
// Exact provider-native market identifier. It resolves on `GET /v1/markets/{market_id}`, either as-is or prefixed with this row's `provider` in the composite form `{provider}:{market_id}`.
//
// One provider can contribute MORE THAN ONE entry to the same submarket, because a provider is free to model one canonical market as several native ones. Kalshi does exactly that for a game moneyline: it lists one binary market per team ("Arizona wins", "San Francisco wins"), so a Kalshi moneyline row appears twice, once per team ticker, each with its own `yes`/`no` outcomes. Group by `provider` if you need one row per venue; do not assume the list has at most one entry per provider.
MarketID string `json:"market_id" url:"market_id"`
MarketName *string `json:"market_name,omitempty" url:"market_name,omitempty"`
MarketSlug *string `json:"market_slug,omitempty" url:"market_slug,omitempty"`
Outcomes []*CanonicalSportsSourceOutcome `json:"outcomes" url:"outcomes"`
// contains filtered or unexported fields
}
func (*CanonicalSportsSourceMarket) GetExtraProperties ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) GetExtraProperties() map[string]interface{}
func (*CanonicalSportsSourceMarket) GetMarketID ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) GetMarketID() string
func (*CanonicalSportsSourceMarket) GetMarketName ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) GetMarketName() *string
func (*CanonicalSportsSourceMarket) GetMarketSlug ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) GetMarketSlug() *string
func (*CanonicalSportsSourceMarket) GetOutcomes ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) GetOutcomes() []*CanonicalSportsSourceOutcome
func (*CanonicalSportsSourceMarket) GetProvider ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) GetProvider() CanonicalSportsSourceMarketProvider
func (*CanonicalSportsSourceMarket) MarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) MarshalJSON() ([]byte, error)
func (*CanonicalSportsSourceMarket) SetMarketID ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) SetMarketID(marketID string)
SetMarketID sets the MarketID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSourceMarket) SetMarketName ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) SetMarketName(marketName *string)
SetMarketName sets the MarketName field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSourceMarket) SetMarketSlug ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) SetMarketSlug(marketSlug *string)
SetMarketSlug sets the MarketSlug field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSourceMarket) SetOutcomes ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) SetOutcomes(outcomes []*CanonicalSportsSourceOutcome)
SetOutcomes sets the Outcomes field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSourceMarket) SetProvider ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) SetProvider(provider CanonicalSportsSourceMarketProvider)
SetProvider sets the Provider field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSourceMarket) String ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) String() string
func (*CanonicalSportsSourceMarket) UnmarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsSourceMarket) UnmarshalJSON(data []byte) error
type CanonicalSportsSourceMarketProvider ¶ added in v0.10.0
type CanonicalSportsSourceMarketProvider string
const ( CanonicalSportsSourceMarketProviderKalshi CanonicalSportsSourceMarketProvider = "kalshi" CanonicalSportsSourceMarketProviderPolymarket CanonicalSportsSourceMarketProvider = "polymarket" CanonicalSportsSourceMarketProviderPredict CanonicalSportsSourceMarketProvider = "predict" CanonicalSportsSourceMarketProviderSxbet CanonicalSportsSourceMarketProvider = "sxbet" CanonicalSportsSourceMarketProviderAlphaArcade CanonicalSportsSourceMarketProvider = "alpha-arcade" CanonicalSportsSourceMarketProviderProphetx CanonicalSportsSourceMarketProvider = "prophetx" )
func NewCanonicalSportsSourceMarketProviderFromString ¶ added in v0.10.0
func NewCanonicalSportsSourceMarketProviderFromString(s string) (CanonicalSportsSourceMarketProvider, error)
type CanonicalSportsSourceOutcome ¶ added in v0.10.0
type CanonicalSportsSourceOutcome struct {
// Canonical outcome this source-native selection represents.
CanonicalOutcomeKey string `json:"canonical_outcome_key" url:"canonical_outcome_key"`
Label *string `json:"label,omitempty" url:"label,omitempty"`
// Exact provider-native outcome identifier. It is never a universal cross-provider outcome ID.
//
// On every provider this is the same value `GET /v1/markets/{market_id}` returns as `outcomes[].outcome_id` for the market named by this row's `market_id`, so the two surfaces join directly.
//
// `polymarket`, `predict` and `alpha-arcade` publish a globally unique per-outcome token (Polymarket CLOB token id, Predict on-chain id, AlphaArcade CLOB token id). `sxbet` and `kalshi` publish no per-outcome token at all, so their references are market-scoped and must be read together with `market_id`: an SX Bet market has one hash and two named positions (`outcomeOne` / `outcomeTwo`), and a Kalshi market is binary (`yes` / `no`). Both are the spelling the venue itself uses to address a side — SX Bet keys its order-book snapshot by `outcomeOne`/`outcomeTwo`, and Kalshi keys its book by `yes`/`no` and reports a trade's `taker_side` the same way. `prophetx` publishes small market-scoped integer outcome ids (e.g. `4`, `5`) that join to the same market's detail row, like SX Bet's positions.
OutcomeID *string `json:"outcome_id,omitempty" url:"outcome_id,omitempty"`
// Optional source-native side such as `yes` or `no`.
Side *string `json:"side,omitempty" url:"side,omitempty"`
// contains filtered or unexported fields
}
func (*CanonicalSportsSourceOutcome) GetCanonicalOutcomeKey ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) GetCanonicalOutcomeKey() string
func (*CanonicalSportsSourceOutcome) GetExtraProperties ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) GetExtraProperties() map[string]interface{}
func (*CanonicalSportsSourceOutcome) GetLabel ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) GetLabel() *string
func (*CanonicalSportsSourceOutcome) GetOutcomeID ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) GetOutcomeID() *string
func (*CanonicalSportsSourceOutcome) GetSide ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) GetSide() *string
func (*CanonicalSportsSourceOutcome) MarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) MarshalJSON() ([]byte, error)
func (*CanonicalSportsSourceOutcome) SetCanonicalOutcomeKey ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) SetCanonicalOutcomeKey(canonicalOutcomeKey string)
SetCanonicalOutcomeKey sets the CanonicalOutcomeKey field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSourceOutcome) SetLabel ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) SetLabel(label *string)
SetLabel sets the Label field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSourceOutcome) SetOutcomeID ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) SetOutcomeID(outcomeID *string)
SetOutcomeID sets the OutcomeID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSourceOutcome) SetSide ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) SetSide(side *string)
SetSide sets the Side field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSourceOutcome) String ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) String() string
func (*CanonicalSportsSourceOutcome) UnmarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsSourceOutcome) UnmarshalJSON(data []byte) error
type CanonicalSportsSubject ¶ added in v0.10.0
type CanonicalSportsSubject struct {
// Canonical subject kind, such as `participant` or `player`.
Type string `json:"type" url:"type"`
// Stable subject key within the canonical sports namespace.
Key string `json:"key" url:"key"`
// Human-readable subject name.
Name *string `json:"name,omitempty" url:"name,omitempty"`
// Canonical team key when the subject is a player.
Team *string `json:"team,omitempty" url:"team,omitempty"`
// contains filtered or unexported fields
}
func (*CanonicalSportsSubject) GetExtraProperties ¶ added in v0.10.0
func (c *CanonicalSportsSubject) GetExtraProperties() map[string]interface{}
func (*CanonicalSportsSubject) GetKey ¶ added in v0.10.0
func (c *CanonicalSportsSubject) GetKey() string
func (*CanonicalSportsSubject) GetName ¶ added in v0.10.0
func (c *CanonicalSportsSubject) GetName() *string
func (*CanonicalSportsSubject) GetTeam ¶ added in v0.10.0
func (c *CanonicalSportsSubject) GetTeam() *string
func (*CanonicalSportsSubject) GetType ¶ added in v0.10.0
func (c *CanonicalSportsSubject) GetType() string
func (*CanonicalSportsSubject) MarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsSubject) MarshalJSON() ([]byte, error)
func (*CanonicalSportsSubject) SetKey ¶ added in v0.10.0
func (c *CanonicalSportsSubject) SetKey(key string)
SetKey sets the Key field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubject) SetName ¶ added in v0.10.0
func (c *CanonicalSportsSubject) SetName(name *string)
SetName sets the Name field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubject) SetTeam ¶ added in v0.10.0
func (c *CanonicalSportsSubject) SetTeam(team *string)
SetTeam sets the Team field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubject) SetType ¶ added in v0.10.0
func (c *CanonicalSportsSubject) SetType(type_ string)
SetType sets the Type field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubject) String ¶ added in v0.10.0
func (c *CanonicalSportsSubject) String() string
func (*CanonicalSportsSubject) UnmarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsSubject) UnmarshalJSON(data []byte) error
type CanonicalSportsSubmarket ¶ added in v0.10.0
type CanonicalSportsSubmarket struct {
// Player props only. `equivalent` requires a complete reviewed profile for every source contract; `different` means at least one known payout-rule difference, even if other rules are unknown; `unverified` means equivalence has not been established and no known difference was found. Absence on game lines makes no claim about their full settlement equivalence.
SettlementEquivalence *CanonicalSportsSubmarketSettlementEquivalence `json:"settlement_equivalence,omitempty" url:"settlement_equivalence,omitempty"`
// Player props only. A deterministic matrix covering all nine settlement dimensions. Filter rows with `comparison=different` for known differences and `comparison=unverified` for gaps. Row-level agreement is not a complete contract review. Source values reference individual native market IDs, not venue-wide defaults. Evidence describes captured source clauses; additional unreviewed terms can apply. No prices or payout estimates.
RuleComparisons []*PlayerPropRuleComparison `json:"rule_comparisons,omitempty" url:"rule_comparisons,omitempty"`
// Stable canonical submarket key within the event.
Key string `json:"key" url:"key"`
MarketType string `json:"market_type" url:"market_type"`
Segment string `json:"segment" url:"segment"`
DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"`
Metric *string `json:"metric,omitempty" url:"metric,omitempty"`
// Unsigned threshold for totals and player props; signed handicap for spreads. Omitted for moneyline markets.
Line *float64 `json:"line,omitempty" url:"line,omitempty"`
// Participant or player whose line is represented. Present for subject-owned markets such as spreads and player props; omitted for event-owned moneylines and totals.
Subject *CanonicalSportsSubject `json:"subject,omitempty" url:"subject,omitempty"`
Rules *CanonicalSportsRules `json:"rules,omitempty" url:"rules,omitempty"`
Outcomes []*CanonicalSportsOutcome `json:"outcomes" url:"outcomes"`
SourceMarkets []*CanonicalSportsSourceMarket `json:"source_markets" url:"source_markets"`
// contains filtered or unexported fields
}
func (*CanonicalSportsSubmarket) GetDisplayName ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetDisplayName() *string
func (*CanonicalSportsSubmarket) GetExtraProperties ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetExtraProperties() map[string]interface{}
func (*CanonicalSportsSubmarket) GetKey ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetKey() string
func (*CanonicalSportsSubmarket) GetLine ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetLine() *float64
func (*CanonicalSportsSubmarket) GetMarketType ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetMarketType() string
func (*CanonicalSportsSubmarket) GetMetric ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetMetric() *string
func (*CanonicalSportsSubmarket) GetOutcomes ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetOutcomes() []*CanonicalSportsOutcome
func (*CanonicalSportsSubmarket) GetRuleComparisons ¶ added in v0.16.0
func (c *CanonicalSportsSubmarket) GetRuleComparisons() []*PlayerPropRuleComparison
func (*CanonicalSportsSubmarket) GetRules ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetRules() *CanonicalSportsRules
func (*CanonicalSportsSubmarket) GetSegment ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetSegment() string
func (*CanonicalSportsSubmarket) GetSettlementEquivalence ¶ added in v0.16.0
func (c *CanonicalSportsSubmarket) GetSettlementEquivalence() *CanonicalSportsSubmarketSettlementEquivalence
func (*CanonicalSportsSubmarket) GetSourceMarkets ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetSourceMarkets() []*CanonicalSportsSourceMarket
func (*CanonicalSportsSubmarket) GetSubject ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) GetSubject() *CanonicalSportsSubject
func (*CanonicalSportsSubmarket) MarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) MarshalJSON() ([]byte, error)
func (*CanonicalSportsSubmarket) SetDisplayName ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) SetDisplayName(displayName *string)
SetDisplayName sets the DisplayName field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetKey ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) SetKey(key string)
SetKey sets the Key field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetLine ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) SetLine(line *float64)
SetLine sets the Line field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetMarketType ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) SetMarketType(marketType string)
SetMarketType sets the MarketType field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetMetric ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) SetMetric(metric *string)
SetMetric sets the Metric field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetOutcomes ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) SetOutcomes(outcomes []*CanonicalSportsOutcome)
SetOutcomes sets the Outcomes field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetRuleComparisons ¶ added in v0.16.0
func (c *CanonicalSportsSubmarket) SetRuleComparisons(ruleComparisons []*PlayerPropRuleComparison)
SetRuleComparisons sets the RuleComparisons field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetRules ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) SetRules(rules *CanonicalSportsRules)
SetRules sets the Rules field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetSegment ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) SetSegment(segment string)
SetSegment sets the Segment field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetSettlementEquivalence ¶ added in v0.16.0
func (c *CanonicalSportsSubmarket) SetSettlementEquivalence(settlementEquivalence *CanonicalSportsSubmarketSettlementEquivalence)
SetSettlementEquivalence sets the SettlementEquivalence field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetSourceMarkets ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) SetSourceMarkets(sourceMarkets []*CanonicalSportsSourceMarket)
SetSourceMarkets sets the SourceMarkets field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) SetSubject ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) SetSubject(subject *CanonicalSportsSubject)
SetSubject sets the Subject field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CanonicalSportsSubmarket) String ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) String() string
func (*CanonicalSportsSubmarket) UnmarshalJSON ¶ added in v0.10.0
func (c *CanonicalSportsSubmarket) UnmarshalJSON(data []byte) error
type CanonicalSportsSubmarketSettlementEquivalence ¶ added in v0.16.0
type CanonicalSportsSubmarketSettlementEquivalence string
Player props only. `equivalent` requires a complete reviewed profile for every source contract; `different` means at least one known payout-rule difference, even if other rules are unknown; `unverified` means equivalence has not been established and no known difference was found. Absence on game lines makes no claim about their full settlement equivalence.
const ( CanonicalSportsSubmarketSettlementEquivalenceEquivalent CanonicalSportsSubmarketSettlementEquivalence = "equivalent" CanonicalSportsSubmarketSettlementEquivalenceDifferent CanonicalSportsSubmarketSettlementEquivalence = "different" CanonicalSportsSubmarketSettlementEquivalenceUnverified CanonicalSportsSubmarketSettlementEquivalence = "unverified" )
func NewCanonicalSportsSubmarketSettlementEquivalenceFromString ¶ added in v0.16.0
func NewCanonicalSportsSubmarketSettlementEquivalenceFromString(s string) (CanonicalSportsSubmarketSettlementEquivalence, error)
type CategoriesResponse ¶ added in v0.9.0
type CategoriesResponse struct {
Data []*CategoryInfo `json:"data" url:"data"`
// contains filtered or unexported fields
}
func (*CategoriesResponse) GetData ¶ added in v0.9.0
func (c *CategoriesResponse) GetData() []*CategoryInfo
func (*CategoriesResponse) GetExtraProperties ¶ added in v0.9.0
func (c *CategoriesResponse) GetExtraProperties() map[string]interface{}
func (*CategoriesResponse) MarshalJSON ¶ added in v0.9.0
func (c *CategoriesResponse) MarshalJSON() ([]byte, error)
func (*CategoriesResponse) SetData ¶ added in v0.9.0
func (c *CategoriesResponse) SetData(data []*CategoryInfo)
SetData sets the Data field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CategoriesResponse) String ¶ added in v0.9.0
func (c *CategoriesResponse) String() string
func (*CategoriesResponse) UnmarshalJSON ¶ added in v0.9.0
func (c *CategoriesResponse) UnmarshalJSON(data []byte) error
type CategoryInfo ¶ added in v0.9.0
type CategoryInfo struct {
ID MarketCategory `json:"id" url:"id"`
// Human-readable category label.
Name string `json:"name" url:"name"`
// Short description of the category's intended scope.
Description string `json:"description" url:"description"`
// contains filtered or unexported fields
}
func (*CategoryInfo) GetDescription ¶ added in v0.9.0
func (c *CategoryInfo) GetDescription() string
func (*CategoryInfo) GetExtraProperties ¶ added in v0.9.0
func (c *CategoryInfo) GetExtraProperties() map[string]interface{}
func (*CategoryInfo) GetID ¶ added in v0.9.0
func (c *CategoryInfo) GetID() MarketCategory
func (*CategoryInfo) GetName ¶ added in v0.9.0
func (c *CategoryInfo) GetName() string
func (*CategoryInfo) MarshalJSON ¶ added in v0.9.0
func (c *CategoryInfo) MarshalJSON() ([]byte, error)
func (*CategoryInfo) SetDescription ¶ added in v0.9.0
func (c *CategoryInfo) SetDescription(description string)
SetDescription sets the Description field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CategoryInfo) SetID ¶ added in v0.9.0
func (c *CategoryInfo) SetID(id MarketCategory)
SetID sets the ID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CategoryInfo) SetName ¶ added in v0.9.0
func (c *CategoryInfo) SetName(name string)
SetName sets the Name field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CategoryInfo) String ¶ added in v0.9.0
func (c *CategoryInfo) String() string
func (*CategoryInfo) UnmarshalJSON ¶ added in v0.9.0
func (c *CategoryInfo) UnmarshalJSON(data []byte) error
type ConflictError ¶ added in v0.15.0
type ConflictError struct {
*core.APIError
Body *AmbiguousIdentifierError
}
`market_id` is ambiguous: it resolves to a different real market on more than one platform, so no single market can honestly be returned. Retry with `?platform=` naming one of the `candidates`, or use the composite `{platform}:{id}` form. Only bare identifiers whose shape is shared between Polymarket and Predict (numeric ids, kebab-case slugs) can produce this; composite ids, explicit `?platform=`, Kalshi tickers and SX Bet hashes never do.
func (*ConflictError) MarshalJSON ¶ added in v0.15.0
func (c *ConflictError) MarshalJSON() ([]byte, error)
func (*ConflictError) UnmarshalJSON ¶ added in v0.15.0
func (c *ConflictError) UnmarshalJSON(data []byte) error
func (*ConflictError) Unwrap ¶ added in v0.15.0
func (c *ConflictError) Unwrap() error
type CryptoPriceItem ¶ added in v0.2.0
type CryptoPriceItem struct {
// Trading pair in lowercase (e.g. `btcusdt`).
Symbol string `json:"symbol" url:"symbol"`
// Close price for the 1-second interval.
Value float64 `json:"value" url:"value"`
// Unix timestamp in milliseconds for the start of the 1-second interval.
Timestamp int64 `json:"timestamp" url:"timestamp"`
// contains filtered or unexported fields
}
func (*CryptoPriceItem) GetExtraProperties ¶ added in v0.2.0
func (c *CryptoPriceItem) GetExtraProperties() map[string]interface{}
func (*CryptoPriceItem) GetSymbol ¶ added in v0.2.0
func (c *CryptoPriceItem) GetSymbol() string
func (*CryptoPriceItem) GetTimestamp ¶ added in v0.2.0
func (c *CryptoPriceItem) GetTimestamp() int64
func (*CryptoPriceItem) GetValue ¶ added in v0.2.0
func (c *CryptoPriceItem) GetValue() float64
func (*CryptoPriceItem) MarshalJSON ¶ added in v0.2.0
func (c *CryptoPriceItem) MarshalJSON() ([]byte, error)
func (*CryptoPriceItem) SetSymbol ¶ added in v0.2.0
func (c *CryptoPriceItem) SetSymbol(symbol string)
SetSymbol sets the Symbol field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CryptoPriceItem) SetTimestamp ¶ added in v0.2.0
func (c *CryptoPriceItem) SetTimestamp(timestamp int64)
SetTimestamp sets the Timestamp field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CryptoPriceItem) SetValue ¶ added in v0.2.0
func (c *CryptoPriceItem) SetValue(value float64)
SetValue sets the Value field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CryptoPriceItem) String ¶ added in v0.2.0
func (c *CryptoPriceItem) String() string
func (*CryptoPriceItem) UnmarshalJSON ¶ added in v0.2.0
func (c *CryptoPriceItem) UnmarshalJSON(data []byte) error
type CryptoPricesResponse ¶ added in v0.2.0
type CryptoPricesResponse struct {
Prices []*CryptoPriceItem `json:"prices" url:"prices"`
// Base64-encoded cursor for fetching the next page. Absent when there are no more results.
PaginationKey *string `json:"pagination_key,omitempty" url:"pagination_key,omitempty"`
// Number of prices in this response page. Omitted on empty responses for unknown symbols.
Total *int `json:"total,omitempty" url:"total,omitempty"`
// contains filtered or unexported fields
}
func (*CryptoPricesResponse) GetExtraProperties ¶ added in v0.2.0
func (c *CryptoPricesResponse) GetExtraProperties() map[string]interface{}
func (*CryptoPricesResponse) GetPaginationKey ¶ added in v0.2.0
func (c *CryptoPricesResponse) GetPaginationKey() *string
func (*CryptoPricesResponse) GetPrices ¶ added in v0.2.0
func (c *CryptoPricesResponse) GetPrices() []*CryptoPriceItem
func (*CryptoPricesResponse) GetTotal ¶ added in v0.2.0
func (c *CryptoPricesResponse) GetTotal() *int
func (*CryptoPricesResponse) MarshalJSON ¶ added in v0.2.0
func (c *CryptoPricesResponse) MarshalJSON() ([]byte, error)
func (*CryptoPricesResponse) SetPaginationKey ¶ added in v0.2.0
func (c *CryptoPricesResponse) SetPaginationKey(paginationKey *string)
SetPaginationKey sets the PaginationKey field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CryptoPricesResponse) SetPrices ¶ added in v0.2.0
func (c *CryptoPricesResponse) SetPrices(prices []*CryptoPriceItem)
SetPrices sets the Prices field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CryptoPricesResponse) SetTotal ¶ added in v0.2.0
func (c *CryptoPricesResponse) SetTotal(total *int)
SetTotal sets the Total field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*CryptoPricesResponse) String ¶ added in v0.2.0
func (c *CryptoPricesResponse) String() string
func (*CryptoPricesResponse) UnmarshalJSON ¶ added in v0.2.0
func (c *CryptoPricesResponse) UnmarshalJSON(data []byte) error
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error" url:"error"`
// Additional detail about the error. May be present, including on some validation errors.
Message *string `json:"message,omitempty" url:"message,omitempty"`
StatusCode int `json:"status_code" url:"status_code"`
// contains filtered or unexported fields
}
func (*ErrorResponse) GetError ¶
func (e *ErrorResponse) GetError() string
func (*ErrorResponse) GetExtraProperties ¶
func (e *ErrorResponse) GetExtraProperties() map[string]interface{}
func (*ErrorResponse) GetMessage ¶ added in v0.2.0
func (e *ErrorResponse) GetMessage() *string
func (*ErrorResponse) GetStatusCode ¶
func (e *ErrorResponse) GetStatusCode() int
func (*ErrorResponse) MarshalJSON ¶
func (e *ErrorResponse) MarshalJSON() ([]byte, error)
func (*ErrorResponse) SetError ¶
func (e *ErrorResponse) SetError(error_ string)
SetError sets the Error field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ErrorResponse) SetMessage ¶ added in v0.2.0
func (e *ErrorResponse) SetMessage(message *string)
SetMessage sets the Message field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ErrorResponse) SetStatusCode ¶
func (e *ErrorResponse) SetStatusCode(statusCode int)
SetStatusCode sets the StatusCode field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ErrorResponse) String ¶
func (e *ErrorResponse) String() string
func (*ErrorResponse) UnmarshalJSON ¶
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
type EventFanout ¶ added in v0.5.0
type EventFanout struct {
// Sibling event tickers the server attempted to fetch alongside the primary event. Determined by the Kalshi sibling registry for the primary event's series.
SiblingsAttempted []string `json:"siblings_attempted" url:"siblings_attempted"`
// Sibling event tickers that returned successfully and contributed markets to the merged response.
SiblingsReturned []string `json:"siblings_returned" url:"siblings_returned"`
// Sibling event tickers that did not exist upstream (404) or errored. The primary event still returned 200 — these are reported for observability, not as request failures.
SiblingsMissing []string `json:"siblings_missing" url:"siblings_missing"`
// contains filtered or unexported fields
}
func (*EventFanout) GetExtraProperties ¶ added in v0.5.0
func (e *EventFanout) GetExtraProperties() map[string]interface{}
func (*EventFanout) GetSiblingsAttempted ¶ added in v0.5.0
func (e *EventFanout) GetSiblingsAttempted() []string
func (*EventFanout) GetSiblingsMissing ¶ added in v0.5.0
func (e *EventFanout) GetSiblingsMissing() []string
func (*EventFanout) GetSiblingsReturned ¶ added in v0.5.0
func (e *EventFanout) GetSiblingsReturned() []string
func (*EventFanout) MarshalJSON ¶ added in v0.5.0
func (e *EventFanout) MarshalJSON() ([]byte, error)
func (*EventFanout) SetSiblingsAttempted ¶ added in v0.5.0
func (e *EventFanout) SetSiblingsAttempted(siblingsAttempted []string)
SetSiblingsAttempted sets the SiblingsAttempted field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*EventFanout) SetSiblingsMissing ¶ added in v0.5.0
func (e *EventFanout) SetSiblingsMissing(siblingsMissing []string)
SetSiblingsMissing sets the SiblingsMissing field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*EventFanout) SetSiblingsReturned ¶ added in v0.5.0
func (e *EventFanout) SetSiblingsReturned(siblingsReturned []string)
SetSiblingsReturned sets the SiblingsReturned field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*EventFanout) String ¶ added in v0.5.0
func (e *EventFanout) String() string
func (*EventFanout) UnmarshalJSON ¶ added in v0.5.0
func (e *EventFanout) UnmarshalJSON(data []byte) error
type EventMarket ¶ added in v0.5.0
type EventMarket struct {
// Platform-native market identifier. Kalshi ticker (`KXMLBGAME-26AUG272145AZSF-AZ`), Polymarket numeric market id, SX Bet `marketHash`, Predict market id, Hyperliquid outcome id, AlphaArcade market ULID, or ProphetX `<event_id>:<market_id>`.
MarketID string `json:"market_id" url:"market_id"`
// Human-readable market title/question.
Title string `json:"title" url:"title"`
// contains filtered or unexported fields
}
func (*EventMarket) GetExtraProperties ¶ added in v0.5.0
func (e *EventMarket) GetExtraProperties() map[string]interface{}
func (*EventMarket) GetMarketID ¶ added in v0.5.0
func (e *EventMarket) GetMarketID() string
func (*EventMarket) GetTitle ¶ added in v0.5.0
func (e *EventMarket) GetTitle() string
func (*EventMarket) MarshalJSON ¶ added in v0.5.0
func (e *EventMarket) MarshalJSON() ([]byte, error)
func (*EventMarket) SetMarketID ¶ added in v0.5.0
func (e *EventMarket) SetMarketID(marketID string)
SetMarketID sets the MarketID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*EventMarket) SetTitle ¶ added in v0.5.0
func (e *EventMarket) SetTitle(title string)
SetTitle sets the Title field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*EventMarket) String ¶ added in v0.5.0
func (e *EventMarket) String() string
func (*EventMarket) UnmarshalJSON ¶ added in v0.5.0
func (e *EventMarket) UnmarshalJSON(data []byte) error
type EventResponse ¶ added in v0.5.0
type EventResponse struct {
// Echo of the platform-native event identifier supplied in the request path.
EventID string `json:"event_id" url:"event_id"`
// The platform the event_id was resolved against, either inferred from the ID format or supplied via `?platform=`.
Platform EventResponsePlatform `json:"platform" url:"platform"`
// Human-readable event title from the platform.
Title string `json:"title" url:"title"`
// Markets nested under this event. Order is platform-native for the primary event, followed by markets from fanout siblings (Kalshi sports) in registry order.
Markets []*EventMarket `json:"markets" url:"markets"`
// Present when the response was assembled from multiple upstream events (Kalshi sports sibling fanout). Lists which sibling event tickers were attempted, which contributed markets, and which failed or didn't exist. Absent for non-Kalshi platforms and for Kalshi events whose series is not in the sibling registry.
Fanout *EventFanout `json:"fanout,omitempty" url:"fanout,omitempty"`
// contains filtered or unexported fields
}
func (*EventResponse) GetEventID ¶ added in v0.5.0
func (e *EventResponse) GetEventID() string
func (*EventResponse) GetExtraProperties ¶ added in v0.5.0
func (e *EventResponse) GetExtraProperties() map[string]interface{}
func (*EventResponse) GetFanout ¶ added in v0.5.0
func (e *EventResponse) GetFanout() *EventFanout
func (*EventResponse) GetMarkets ¶ added in v0.5.0
func (e *EventResponse) GetMarkets() []*EventMarket
func (*EventResponse) GetPlatform ¶ added in v0.5.0
func (e *EventResponse) GetPlatform() EventResponsePlatform
func (*EventResponse) GetTitle ¶ added in v0.5.0
func (e *EventResponse) GetTitle() string
func (*EventResponse) MarshalJSON ¶ added in v0.5.0
func (e *EventResponse) MarshalJSON() ([]byte, error)
func (*EventResponse) SetEventID ¶ added in v0.5.0
func (e *EventResponse) SetEventID(eventID string)
SetEventID sets the EventID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*EventResponse) SetFanout ¶ added in v0.5.0
func (e *EventResponse) SetFanout(fanout *EventFanout)
SetFanout sets the Fanout field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*EventResponse) SetMarkets ¶ added in v0.5.0
func (e *EventResponse) SetMarkets(markets []*EventMarket)
SetMarkets sets the Markets field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*EventResponse) SetPlatform ¶ added in v0.5.0
func (e *EventResponse) SetPlatform(platform EventResponsePlatform)
SetPlatform sets the Platform field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*EventResponse) SetTitle ¶ added in v0.5.0
func (e *EventResponse) SetTitle(title string)
SetTitle sets the Title field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*EventResponse) String ¶ added in v0.5.0
func (e *EventResponse) String() string
func (*EventResponse) UnmarshalJSON ¶ added in v0.5.0
func (e *EventResponse) UnmarshalJSON(data []byte) error
type EventResponsePlatform ¶ added in v0.5.0
type EventResponsePlatform string
The platform the event_id was resolved against, either inferred from the ID format or supplied via `?platform=`.
const ( EventResponsePlatformKalshi EventResponsePlatform = "kalshi" EventResponsePlatformPolymarket EventResponsePlatform = "polymarket" EventResponsePlatformPredict EventResponsePlatform = "predict" EventResponsePlatformSxbet EventResponsePlatform = "sxbet" EventResponsePlatformHyperliquid EventResponsePlatform = "hyperliquid" EventResponsePlatformAlphaArcade EventResponsePlatform = "alpha-arcade" EventResponsePlatformProphetx EventResponsePlatform = "prophetx" EventResponsePlatformLimitless EventResponsePlatform = "limitless" )
func NewEventResponsePlatformFromString ¶ added in v0.5.0
func NewEventResponsePlatformFromString(s string) (EventResponsePlatform, error)
func (EventResponsePlatform) Ptr ¶ added in v0.5.0
func (e EventResponsePlatform) Ptr() *EventResponsePlatform
type FileParam ¶
FileParam is a file type suitable for multipart/form-data uploads.
func NewFileParam ¶
func NewFileParam( reader io.Reader, filename string, contentType string, opts ...FileParamOption, ) *FileParam
NewFileParam returns a *FileParam type suitable for multipart/form-data uploads. All file upload endpoints accept a simple io.Reader, which is usually created by opening a file via os.Open.
However, some endpoints require additional metadata about the file such as a specific Content-Type or custom filename. FileParam makes it easier to create the correct type signature for these endpoints.
func (*FileParam) ContentType ¶
type FileParamOption ¶
type FileParamOption interface {
// contains filtered or unexported methods
}
FileParamOption adapts the behavior of the FileParam. No options are implemented yet, but this interface allows for future extensibility.
type ForbiddenError ¶
type ForbiddenError struct {
*core.APIError
Body *ErrorResponse
}
API key lacks the required permission
func (*ForbiddenError) MarshalJSON ¶
func (f *ForbiddenError) MarshalJSON() ([]byte, error)
func (*ForbiddenError) UnmarshalJSON ¶
func (f *ForbiddenError) UnmarshalJSON(data []byte) error
func (*ForbiddenError) Unwrap ¶
func (f *ForbiddenError) Unwrap() error
type GetBinanceCryptoPricesRequest ¶ added in v0.2.0
type GetBinanceCryptoPricesRequest struct {
// Binance trading pair (e.g. `btcusdt`, `ethusdt`, `solusdt`). Must contain only alphanumeric characters (no hyphens, underscores, or other separators). Uppercase is accepted and automatically lowercased (e.g. `BTCUSDT` → `btcusdt`). Must be a valid Binance symbol; unknown symbols return `200` with an empty `prices` array.
Currency string `json:"-" url:"currency"`
// Start of the time range as a Unix timestamp in milliseconds (inclusive). Negative values are clamped to 0.
StartTime *int64 `json:"-" url:"start_time,omitempty"`
// End of the time range as a Unix timestamp in milliseconds (inclusive). Negative values are clamped to 0.
EndTime *int64 `json:"-" url:"end_time,omitempty"`
// Maximum number of prices to return. Defaults to 100 when a time range is present. Values above 100 are silently clamped to 100. Without a time range, this parameter is ignored — the endpoint always returns the single latest price.
Limit *int `json:"-" url:"limit,omitempty"`
// Base64-encoded cursor from a previous response to fetch the next page of results.
PaginationKey *string `json:"-" url:"pagination_key,omitempty"`
// contains filtered or unexported fields
}
func (*GetBinanceCryptoPricesRequest) SetCurrency ¶ added in v0.2.0
func (g *GetBinanceCryptoPricesRequest) SetCurrency(currency string)
SetCurrency sets the Currency field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetBinanceCryptoPricesRequest) SetEndTime ¶ added in v0.2.0
func (g *GetBinanceCryptoPricesRequest) SetEndTime(endTime *int64)
SetEndTime sets the EndTime field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetBinanceCryptoPricesRequest) SetLimit ¶ added in v0.2.0
func (g *GetBinanceCryptoPricesRequest) SetLimit(limit *int)
SetLimit sets the Limit field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetBinanceCryptoPricesRequest) SetPaginationKey ¶ added in v0.2.0
func (g *GetBinanceCryptoPricesRequest) SetPaginationKey(paginationKey *string)
SetPaginationKey sets the PaginationKey field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetBinanceCryptoPricesRequest) SetStartTime ¶ added in v0.2.0
func (g *GetBinanceCryptoPricesRequest) SetStartTime(startTime *int64)
SetStartTime sets the StartTime field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
type GetEventRequest ¶ added in v0.5.0
type GetEventRequest struct {
// Platform-native event identifier. Examples per platform: Kalshi event ticker (`KXNBAGAME-26OCT20OKCSAS`), Polymarket event slug (`nfl-pit-ne-2026-09-20`), SX Bet event id (`L19766755`), Predict market id (`1607914`), Hyperliquid question or outcome integer id (requires `?platform=hyperliquid` since integer ids aren't inferred). The composite `{provider}:{native_id}` form (e.g. `predict:1607914`) is accepted here too and dispatches without probing.
//
// **A bare numeric id or slug is not unique across platforms.** Polymarket and Predict both use these shapes and their id spaces overlap, so sending one without a platform can fail with `409` (see that response). Pass `?platform=` — every row of `GET /v1/matching-markets/sports` carries the `platform` that goes with its `event_id`.
//
// **Sports identifiers expire.** Game tickers and slugs are delisted once an event settles, and Hyperliquid ids roll over daily. Take current ones from `GET /v1/matching-markets/sports` (every platform row carries its provider-native `event_id`) rather than copying one out of this reference.
EventID string `json:"-" url:"-"`
// Optional platform override. When omitted, inferred from the `event_id` format: `KX…` → Kalshi, `L\d+` → SX Bet. Numeric IDs and kebab-case slugs are shared shape between Polymarket and Predict; in that case the service probes both and returns `409` rather than guessing if the identifier resolves on both. Hyperliquid question/outcome integer ids collide with these numerics and are not inferred — pass `?platform=hyperliquid` (alias `hl`). Passing `platform` explicitly skips the probe entirely and is the recommended call whenever you know it. Supplying a value that contradicts a composite `{provider}:` prefix is a `400`.
Platform *GetEventRequestPlatform `json:"-" url:"platform,omitempty"`
// contains filtered or unexported fields
}
func (*GetEventRequest) SetEventID ¶ added in v0.5.0
func (g *GetEventRequest) SetEventID(eventID string)
SetEventID sets the EventID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetEventRequest) SetPlatform ¶ added in v0.5.0
func (g *GetEventRequest) SetPlatform(platform *GetEventRequestPlatform)
SetPlatform sets the Platform field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
type GetEventRequestPlatform ¶ added in v0.5.0
type GetEventRequestPlatform string
const ( GetEventRequestPlatformKalshi GetEventRequestPlatform = "kalshi" GetEventRequestPlatformPolymarket GetEventRequestPlatform = "polymarket" GetEventRequestPlatformPredict GetEventRequestPlatform = "predict" GetEventRequestPlatformSxbet GetEventRequestPlatform = "sxbet" GetEventRequestPlatformHyperliquid GetEventRequestPlatform = "hyperliquid" GetEventRequestPlatformAlphaArcade GetEventRequestPlatform = "alpha-arcade" GetEventRequestPlatformProphetx GetEventRequestPlatform = "prophetx" GetEventRequestPlatformLimitless GetEventRequestPlatform = "limitless" )
func NewGetEventRequestPlatformFromString ¶ added in v0.5.0
func NewGetEventRequestPlatformFromString(s string) (GetEventRequestPlatform, error)
func (GetEventRequestPlatform) Ptr ¶ added in v0.5.0
func (g GetEventRequestPlatform) Ptr() *GetEventRequestPlatform
type GetMarketRequest ¶ added in v0.6.0
type GetMarketRequest struct {
// Composite (`{provider}:{native_id}`) or platform-native market identifier. Examples per platform: Kalshi market ticker (`KXNBA-27-SAS`), Polymarket numeric id or slug (`540817` or `nfl-pit-ne-2026-09-20`), Predict market id (`356635`), SX Bet `marketHash` (`0x…64hex`), Hyperliquid outcome id (use the composite `hyperliquid:<outcome-id>` or `?platform=hyperliquid` — bare integer ids aren't inferred).
//
// **A bare numeric id or slug is not unique across platforms.** Polymarket and Predict both use these shapes and their id spaces overlap, so sending one without a platform can fail with `409` (see that response). Prefer the composite form — it is what `GET /v1/markets` returns in `data[].id` — or pass `?platform=`.
//
// **Sports identifiers expire.** Kalshi game tickers, Polymarket game slugs, and Hyperliquid outcome ids are recycled or delisted as events settle — Hyperliquid's live catalog is a handful of daily-recurring outcomes, so any specific integer id there is valid for roughly a day. Take current ids from `GET /v1/markets` or `GET /v1/matching-markets/sports` rather than copying one out of this reference. Long-dated markets (Kalshi season futures, multi-year AlphaArcade questions) and settled Polymarket/Predict/SX Bet ids stay resolvable.
MarketID string `json:"-" url:"-"`
// Optional platform override. When omitted, inferred from the composite prefix or from the native ID format (`KX…` → Kalshi, `0x…64hex` → SX Bet). Numeric IDs and kebab-case slugs are shared shape between Polymarket and Predict; in that case the service probes both and returns `409` rather than guessing if the identifier resolves on both. Hyperliquid integer ids collide with these numerics and are not inferred — use the composite `hyperliquid:<id>` or `?platform=hyperliquid` (alias `hl`). AlphaArcade ULIDs and Limitless slugs are not inferred either — use the composite form (`alpha-arcade:<ulid>`, `limitless:<slug>`) or the matching `?platform=` value. Passing `platform` explicitly skips the probe entirely and is the recommended call whenever you know it. When the override contradicts a composite prefix (e.g. `kalshi:X` with `?platform=polymarket`), the request returns 400.
Platform *GetMarketRequestPlatform `json:"-" url:"platform,omitempty"`
// contains filtered or unexported fields
}
func (*GetMarketRequest) SetMarketID ¶ added in v0.6.0
func (g *GetMarketRequest) SetMarketID(marketID string)
SetMarketID sets the MarketID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetMarketRequest) SetPlatform ¶ added in v0.6.0
func (g *GetMarketRequest) SetPlatform(platform *GetMarketRequestPlatform)
SetPlatform sets the Platform field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
type GetMarketRequestPlatform ¶ added in v0.6.0
type GetMarketRequestPlatform string
const ( GetMarketRequestPlatformKalshi GetMarketRequestPlatform = "kalshi" GetMarketRequestPlatformPolymarket GetMarketRequestPlatform = "polymarket" GetMarketRequestPlatformPredict GetMarketRequestPlatform = "predict" GetMarketRequestPlatformSxbet GetMarketRequestPlatform = "sxbet" GetMarketRequestPlatformHyperliquid GetMarketRequestPlatform = "hyperliquid" GetMarketRequestPlatformAlphaArcade GetMarketRequestPlatform = "alpha-arcade" GetMarketRequestPlatformProphetx GetMarketRequestPlatform = "prophetx" GetMarketRequestPlatformLimitless GetMarketRequestPlatform = "limitless" )
func NewGetMarketRequestPlatformFromString ¶ added in v0.6.0
func NewGetMarketRequestPlatformFromString(s string) (GetMarketRequestPlatform, error)
func (GetMarketRequestPlatform) Ptr ¶ added in v0.6.0
func (g GetMarketRequestPlatform) Ptr() *GetMarketRequestPlatform
type GetMarketsRequest ¶ added in v0.3.0
type GetMarketsRequest struct {
// Maximum number of markets to return per page. Range 1–100, default 25.
Limit *int `json:"-" url:"limit,omitempty"`
// Opaque cursor from a previous response's `pagination.nextCursor` in the SDKs (raw JSON: `pagination.next_cursor`). Market cursors stay bound to the immutable catalog snapshot that issued them. Replaced snapshots normally remain available for up to 8 hours, but storage pressure can evict a retained snapshot sooner; retry from the first page after a stale-cursor `400`.
Cursor *string `json:"-" url:"cursor,omitempty"`
// Canonical top-level category filter. This is PredictorSDK's normalized category, not a provider-native tag. Cursors are bound to the category filter used to create them.
Category *MarketCategory `json:"-" url:"category,omitempty"`
// Restrict the page to one provider, matched against each row's own `provider` value. Without it, providers are walked in the order below and a caller wanting a later one has to paginate through every earlier provider's rows first.
//
// Only the canonical provider IDs are accepted, case-insensitively. Any other value returns `400` listing the legal ones — an unrecognized filter is never ignored, because a silently dropped filter returns a full unfiltered page that looks filtered.
//
// `pagination.total` counts only the selected provider's rows, and cursors are bound to the filter that created them: replay a `next_cursor` with the same `provider` value, or start again from the first page.
//
// This is a catalog membership filter, and it is spelled `provider` because that is the field it selects on. It is unrelated to the `platform` override on `GET /v1/markets/{market_id}` and `GET /v1/events/{event_id}`, which names the venue an identifier should be resolved against rather than filtering a list.
Provider *GetMarketsRequestProvider `json:"-" url:"provider,omitempty"`
// contains filtered or unexported fields
}
func (*GetMarketsRequest) SetCategory ¶ added in v0.9.0
func (g *GetMarketsRequest) SetCategory(category *MarketCategory)
SetCategory sets the Category field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetMarketsRequest) SetCursor ¶ added in v0.3.0
func (g *GetMarketsRequest) SetCursor(cursor *string)
SetCursor sets the Cursor field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetMarketsRequest) SetLimit ¶ added in v0.3.0
func (g *GetMarketsRequest) SetLimit(limit *int)
SetLimit sets the Limit field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetMarketsRequest) SetProvider ¶ added in v0.15.0
func (g *GetMarketsRequest) SetProvider(provider *GetMarketsRequestProvider)
SetProvider sets the Provider field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
type GetMarketsRequestProvider ¶ added in v0.15.0
type GetMarketsRequestProvider string
const ( GetMarketsRequestProviderKalshi GetMarketsRequestProvider = "kalshi" GetMarketsRequestProviderPolymarket GetMarketsRequestProvider = "polymarket" GetMarketsRequestProviderPredict GetMarketsRequestProvider = "predict" GetMarketsRequestProviderSxbet GetMarketsRequestProvider = "sxbet" GetMarketsRequestProviderHyperliquid GetMarketsRequestProvider = "hyperliquid" GetMarketsRequestProviderAlphaArcade GetMarketsRequestProvider = "alpha-arcade" GetMarketsRequestProviderProphetx GetMarketsRequestProvider = "prophetx" GetMarketsRequestProviderLimitless GetMarketsRequestProvider = "limitless" )
func NewGetMarketsRequestProviderFromString ¶ added in v0.15.0
func NewGetMarketsRequestProviderFromString(s string) (GetMarketsRequestProvider, error)
func (GetMarketsRequestProvider) Ptr ¶ added in v0.15.0
func (g GetMarketsRequestProvider) Ptr() *GetMarketsRequestProvider
type GetPolymarketWalletRequest ¶ added in v0.4.0
type GetPolymarketWalletRequest struct {
// Wallet address to look up. May be a Polymarket proxy address or the underlying signer EOA — the endpoint resolves either form. Must match `^0x[a-fA-F0-9]{40}$`. Mixed-case input is accepted and lowercased in the response. Mutually exclusive with `username`; exactly one of the two is required.
Address *string `json:"-" url:"address,omitempty"`
// Polymarket display name to look up. Match is case-insensitive and exact against the user's stored `name` (so `Car`, `car`, and `CAR` all resolve, but `Theo` does not match `Theo47`). A leading `@` is accepted and stripped before the lookup. Mutually exclusive with `address`; exactly one of the two is required. Example: `Car`.
Username *string `json:"-" url:"username,omitempty"`
// contains filtered or unexported fields
}
func (*GetPolymarketWalletRequest) SetAddress ¶ added in v0.4.0
func (g *GetPolymarketWalletRequest) SetAddress(address *string)
SetAddress sets the Address field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetPolymarketWalletRequest) SetUsername ¶ added in v0.4.0
func (g *GetPolymarketWalletRequest) SetUsername(username *string)
SetUsername sets the Username field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
type GetSportsMatchingMarketsRequest ¶
type GetSportsMatchingMarketsRequest struct {
// Maximum number of matched events to return per page. Range 1–100, default 25. Ignored when a platform-ID filter is supplied.
Limit *int `json:"-" url:"limit,omitempty"`
// Opaque cursor from a previous response's `pagination.nextCursor` in the SDKs (raw JSON: `pagination.next_cursor`). Must be used with the same filter set — a cursor from `include_settled=true` cannot be replayed against `include_settled=false` and will return `400`.
Cursor *string `json:"-" url:"cursor,omitempty"`
// Selects which events this request draws from, in list mode and in lookup mode alike. Defaults to `false`: only events whose scheduled start has not certainly passed — today's games, plus a one-day grace so a late start that runs past midnight Eastern is never dropped mid-play. Set it to `true` to also get events whose game date is further in the past, including ones a venue still lists as open.
//
// A venue can keep quoting a market for months after the game (a 94-day-old row was still `status: open` with a live two-sided book when this was written), so the endpoint filters on the game date it already holds — the trailing date of the canonical `event_id` — rather than on an upstream status it cannot verify. Nothing is reported as settled that the venue has not settled; these events are simply not *current*, which is what the default page is for.
//
// Because it selects the population, a lookup (`?event_id=`, `?polymarket_market_slug=`, `?alpha_arcade_market_id=`, …) for a past-dated event answers `200` with an empty `markets` object unless this is `true`.
IncludeSettled *bool `json:"-" url:"include_settled,omitempty"`
// Player-prop admission policy. Explicit use requires `include_submarkets=true`; otherwise returns 400. `strict` (the default) includes only groups of at least two distinct providers with verified player/game/stat/threshold/side identity and a completely reviewed equivalent settlement profile. `same_prop` retains exact prop identity but also admits different or unverified settlement rules, identified by `settlement_equivalence` and `rule_comparisons`. Unknown rules never prove equivalence. Applies in list and lookup mode, including `include_settled`; cursors cannot be reused between policies. Does not change game-line matching or the compact moneyline bridge. Historical snapshots without verified player identity do not expose props.
PlayerPropMatch *GetSportsMatchingMarketsRequestPlayerPropMatch `json:"-" url:"player_prop_match,omitempty"`
// When `true`, add `canonical_events` with normalized event, submarket, line, segment, outcome, and exact source market/outcome identity. This is an identity mapping only; fetch current status, quotes, and liquidity from the referenced market resources. Defaults to `false` so the compact Dome-compatible response is unchanged. Explicit `player_prop_match` requires this to be `true`.
IncludeSubmarkets *bool `json:"-" url:"include_submarkets,omitempty"`
// Canonical event key(s) to look up directly (for example, `nba-okc-sas-2026-10-20`). Provide the parameter multiple times for multiple events, up to 100 unique keys. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored.
EventID []*string `json:"-" url:"event_id,omitempty"`
// Kalshi event ticker(s) to find matching markets for (e.g. `KXNBAGAME-26OCT20OKCSAS`). Provide the parameter multiple times for multiple tickers, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored.
KalshiEventTicker []*string `json:"-" url:"kalshi_event_ticker,omitempty"`
// Polymarket market slug(s) to find matching markets for (e.g. `nfl-pit-ne-2026-09-20`). Provide the parameter multiple times for multiple slugs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored.
PolymarketMarketSlug []*string `json:"-" url:"polymarket_market_slug,omitempty"`
// Predict market ID(s) to find matching markets for (e.g. `1607914`). Provide the parameter multiple times for multiple IDs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored.
PredictMarketID []*string `json:"-" url:"predict_market_id,omitempty"`
// SX Bet market ID(s) to find matching markets for (e.g. `0xb4d047a709aae881e5ccad9d123592967644ee1df1f17078c762b388e41b81c5`). Provide the parameter multiple times for multiple IDs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored.
SxbetMarketID []*string `json:"-" url:"sxbet_market_id,omitempty"`
// AlphaArcade market ULID(s) to find matching markets for. Use `market_id` from an `ALPHA-ARCADE` row in a current matching list response; game-scoped IDs can disappear when the venue delists the game. Provide the parameter multiple times for multiple IDs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored.
AlphaArcadeMarketID []*string `json:"-" url:"alpha_arcade_market_id,omitempty"`
// ProphetX event ID(s) to find matching markets for (e.g. `1700008782`). Provide the parameter multiple times for multiple IDs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored.
ProphetxEventID []*string `json:"-" url:"prophetx_event_id,omitempty"`
// ProphetX market ID(s) to find matching markets for (e.g. `1700008782:219`, resolving the favourite primary-line strike). Accepts a market ID or an event ID (mirroring how `kalshi_event_ticker` accepts market tickers). Provide the parameter multiple times for multiple IDs, up to 100 unique values. Only one filter type may be used per request. Lookup mode — pagination parameters are ignored.
ProphetxMarketID []*string `json:"-" url:"prophetx_market_id,omitempty"`
// contains filtered or unexported fields
}
func (*GetSportsMatchingMarketsRequest) SetAlphaArcadeMarketID ¶ added in v0.16.0
func (g *GetSportsMatchingMarketsRequest) SetAlphaArcadeMarketID(alphaArcadeMarketID []*string)
SetAlphaArcadeMarketID sets the AlphaArcadeMarketID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetCursor ¶ added in v0.3.0
func (g *GetSportsMatchingMarketsRequest) SetCursor(cursor *string)
SetCursor sets the Cursor field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetEventID ¶ added in v0.10.0
func (g *GetSportsMatchingMarketsRequest) SetEventID(eventID []*string)
SetEventID sets the EventID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetIncludeSettled ¶ added in v0.3.0
func (g *GetSportsMatchingMarketsRequest) SetIncludeSettled(includeSettled *bool)
SetIncludeSettled sets the IncludeSettled field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetIncludeSubmarkets ¶ added in v0.10.0
func (g *GetSportsMatchingMarketsRequest) SetIncludeSubmarkets(includeSubmarkets *bool)
SetIncludeSubmarkets sets the IncludeSubmarkets field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetKalshiEventTicker ¶
func (g *GetSportsMatchingMarketsRequest) SetKalshiEventTicker(kalshiEventTicker []*string)
SetKalshiEventTicker sets the KalshiEventTicker field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetLimit ¶ added in v0.3.0
func (g *GetSportsMatchingMarketsRequest) SetLimit(limit *int)
SetLimit sets the Limit field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetPlayerPropMatch ¶ added in v0.16.0
func (g *GetSportsMatchingMarketsRequest) SetPlayerPropMatch(playerPropMatch *GetSportsMatchingMarketsRequestPlayerPropMatch)
SetPlayerPropMatch sets the PlayerPropMatch field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetPolymarketMarketSlug ¶
func (g *GetSportsMatchingMarketsRequest) SetPolymarketMarketSlug(polymarketMarketSlug []*string)
SetPolymarketMarketSlug sets the PolymarketMarketSlug field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetPredictMarketID ¶
func (g *GetSportsMatchingMarketsRequest) SetPredictMarketID(predictMarketID []*string)
SetPredictMarketID sets the PredictMarketID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetProphetxEventID ¶ added in v0.16.0
func (g *GetSportsMatchingMarketsRequest) SetProphetxEventID(prophetxEventID []*string)
SetProphetxEventID sets the ProphetxEventID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetProphetxMarketID ¶ added in v0.16.0
func (g *GetSportsMatchingMarketsRequest) SetProphetxMarketID(prophetxMarketID []*string)
SetProphetxMarketID sets the ProphetxMarketID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*GetSportsMatchingMarketsRequest) SetSxbetMarketID ¶
func (g *GetSportsMatchingMarketsRequest) SetSxbetMarketID(sxbetMarketID []*string)
SetSxbetMarketID sets the SxbetMarketID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
type GetSportsMatchingMarketsRequestPlayerPropMatch ¶ added in v0.16.0
type GetSportsMatchingMarketsRequestPlayerPropMatch string
const ( GetSportsMatchingMarketsRequestPlayerPropMatchStrict GetSportsMatchingMarketsRequestPlayerPropMatch = "strict" GetSportsMatchingMarketsRequestPlayerPropMatchSameProp GetSportsMatchingMarketsRequestPlayerPropMatch = "same_prop" )
func NewGetSportsMatchingMarketsRequestPlayerPropMatchFromString ¶ added in v0.16.0
func NewGetSportsMatchingMarketsRequestPlayerPropMatchFromString(s string) (GetSportsMatchingMarketsRequestPlayerPropMatch, error)
type ListPolymarketWalletPositionsRequest ¶ added in v0.5.0
type ListPolymarketWalletPositionsRequest struct {
// Polymarket proxy wallet address. Must match `^0x[a-fA-F0-9]{40}$`. Mixed-case input is accepted and lowercased in the response. Mutually exclusive with `username`; exactly one of the two is required.
Address *string `json:"-" url:"address,omitempty"`
// Polymarket display name to resolve to a proxy wallet. Match is case-insensitive and exact against the user's stored `name`. A leading `@` is accepted and stripped. Mutually exclusive with `address`.
Username *string `json:"-" url:"username,omitempty"`
// Number of items per page. Defaults to 50.
Limit *int `json:"-" url:"limit,omitempty"`
// Opaque cursor from a previous response's `pagination.next_cursor`. Bound to the resolved wallet address — replaying a cursor against a different identifier returns `400`.
Cursor *string `json:"-" url:"cursor,omitempty"`
// contains filtered or unexported fields
}
func (*ListPolymarketWalletPositionsRequest) SetAddress ¶ added in v0.5.0
func (l *ListPolymarketWalletPositionsRequest) SetAddress(address *string)
SetAddress sets the Address field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListPolymarketWalletPositionsRequest) SetCursor ¶ added in v0.5.0
func (l *ListPolymarketWalletPositionsRequest) SetCursor(cursor *string)
SetCursor sets the Cursor field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListPolymarketWalletPositionsRequest) SetLimit ¶ added in v0.5.0
func (l *ListPolymarketWalletPositionsRequest) SetLimit(limit *int)
SetLimit sets the Limit field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*ListPolymarketWalletPositionsRequest) SetUsername ¶ added in v0.5.0
func (l *ListPolymarketWalletPositionsRequest) SetUsername(username *string)
SetUsername sets the Username field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
type MarketCategory ¶ added in v0.9.0
type MarketCategory string
PredictorSDK-normalized top-level category. This is intentionally broad and stable across providers; provider-native tags are not exposed as canonical categories.
const ( MarketCategorySports MarketCategory = "sports" MarketCategoryPolitics MarketCategory = "politics" MarketCategoryCrypto MarketCategory = "crypto" MarketCategoryFinance MarketCategory = "finance" MarketCategoryEconomics MarketCategory = "economics" MarketCategoryWeather MarketCategory = "weather" MarketCategoryCulture MarketCategory = "culture" MarketCategoryTechnology MarketCategory = "technology" MarketCategoryEntertainment MarketCategory = "entertainment" MarketCategoryOther MarketCategory = "other" MarketCategoryUnknown MarketCategory = "unknown" )
func NewMarketCategoryFromString ¶ added in v0.9.0
func NewMarketCategoryFromString(s string) (MarketCategory, error)
func (MarketCategory) Ptr ¶ added in v0.9.0
func (m MarketCategory) Ptr() *MarketCategory
type MarketDetailFeeLeg ¶ added in v0.14.0
type MarketDetailFeeLeg struct {
// The price term of the per-share fee.
//
// `quadratic` — `rate × (price × (1 − price)) ^ exponent`. Kalshi (`roundup(0.07 × C × P × (1−P))`, exponent 1 by published formula), Polymarket (`fee = C × feeRate × p × (1 − p)`, exponent read per market), AlphaArcade (`feeBase × quantity × price × (1 − price)`).
//
// `min_price` — `rate × min(price, 1 − price)`. Predict (`Base Fee % × min(Price, 1 − Price) × Shares`). A TENT, not a parabola: the effective rate on notional is flat at `rate` for every price at or below 0.5 and only declines above it. Do not collapse this into `quadratic`; it would overstate the fee at every price below 0.5.
//
// `notional` — `rate × price`, i.e. a flat fraction of traded notional with no price curve at all.
//
// `none` — zero, asserted.
Model MarketDetailFeeLegModel `json:"model" url:"model"`
// A DECIMAL FRACTION, never basis points — matching each venue's own published unit. `0.07` is 7% of the price term, not 7 bps. Null means the shape is known but the value is not (Hyperliquid, where the effective rate is account-tiered). `0` means zero, asserted.
Rate *float64 `json:"rate,omitempty" url:"rate,omitempty"`
// Only meaningful for `model: "quadratic"`; null otherwise. Read per market from Polymarket's `feeSchedule.exponent`; `1` on Kalshi and AlphaArcade, whose published formulas are exponent-1 by construction. Never defaulted when unknown — a quadratic leg with an unreadable exponent makes the whole descriptor `partial`, because the exponent moves the fee by roughly 4x and can flip which venue is cheaper.
Exponent *float64 `json:"exponent,omitempty" url:"exponent,omitempty"`
Rounding *MarketDetailFeeRounding `json:"rounding,omitempty" url:"rounding,omitempty"`
// contains filtered or unexported fields
}
func (*MarketDetailFeeLeg) GetExponent ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) GetExponent() *float64
func (*MarketDetailFeeLeg) GetExtraProperties ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) GetExtraProperties() map[string]interface{}
func (*MarketDetailFeeLeg) GetModel ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) GetModel() MarketDetailFeeLegModel
func (*MarketDetailFeeLeg) GetRate ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) GetRate() *float64
func (*MarketDetailFeeLeg) GetRounding ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) GetRounding() *MarketDetailFeeRounding
func (*MarketDetailFeeLeg) MarshalJSON ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) MarshalJSON() ([]byte, error)
func (*MarketDetailFeeLeg) SetExponent ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) SetExponent(exponent *float64)
SetExponent sets the Exponent field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailFeeLeg) SetModel ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) SetModel(model MarketDetailFeeLegModel)
SetModel sets the Model field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailFeeLeg) SetRate ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) SetRate(rate *float64)
SetRate sets the Rate field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailFeeLeg) SetRounding ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) SetRounding(rounding *MarketDetailFeeRounding)
SetRounding sets the Rounding field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailFeeLeg) String ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) String() string
func (*MarketDetailFeeLeg) UnmarshalJSON ¶ added in v0.14.0
func (m *MarketDetailFeeLeg) UnmarshalJSON(data []byte) error
type MarketDetailFeeLegModel ¶ added in v0.14.0
type MarketDetailFeeLegModel string
The price term of the per-share fee.
`quadratic` — `rate × (price × (1 − price)) ^ exponent`. Kalshi (`roundup(0.07 × C × P × (1−P))`, exponent 1 by published formula), Polymarket (`fee = C × feeRate × p × (1 − p)`, exponent read per market), AlphaArcade (`feeBase × quantity × price × (1 − price)`).
`min_price` — `rate × min(price, 1 − price)`. Predict (`Base Fee % × min(Price, 1 − Price) × Shares`). A TENT, not a parabola: the effective rate on notional is flat at `rate` for every price at or below 0.5 and only declines above it. Do not collapse this into `quadratic`; it would overstate the fee at every price below 0.5.
`notional` — `rate × price`, i.e. a flat fraction of traded notional with no price curve at all.
`none` — zero, asserted.
const ( MarketDetailFeeLegModelQuadratic MarketDetailFeeLegModel = "quadratic" MarketDetailFeeLegModelMinPrice MarketDetailFeeLegModel = "min_price" MarketDetailFeeLegModelNotional MarketDetailFeeLegModel = "notional" MarketDetailFeeLegModelNone MarketDetailFeeLegModel = "none" )
func NewMarketDetailFeeLegModelFromString ¶ added in v0.14.0
func NewMarketDetailFeeLegModelFromString(s string) (MarketDetailFeeLegModel, error)
func (MarketDetailFeeLegModel) Ptr ¶ added in v0.14.0
func (m MarketDetailFeeLegModel) Ptr() *MarketDetailFeeLegModel
type MarketDetailFeeRounding ¶ added in v0.14.0
type MarketDetailFeeRounding struct {
// `up` — the venue rounds the fee UP to the next increment (Kalshi ceils to $0.0001; AlphaArcade ceils to 1e-6 USDC). `nearest` — the venue rounds to the nearest increment (Polymarket rounds to 5 decimal places, with 0.00001 USDC the smallest fee charged).
Direction MarketDetailFeeRoundingDirection `json:"direction" url:"direction"`
// The rounding increment in the market's quote currency.
Increment float64 `json:"increment" url:"increment"`
// contains filtered or unexported fields
}
func (*MarketDetailFeeRounding) GetDirection ¶ added in v0.14.0
func (m *MarketDetailFeeRounding) GetDirection() MarketDetailFeeRoundingDirection
func (*MarketDetailFeeRounding) GetExtraProperties ¶ added in v0.14.0
func (m *MarketDetailFeeRounding) GetExtraProperties() map[string]interface{}
func (*MarketDetailFeeRounding) GetIncrement ¶ added in v0.14.0
func (m *MarketDetailFeeRounding) GetIncrement() float64
func (*MarketDetailFeeRounding) MarshalJSON ¶ added in v0.14.0
func (m *MarketDetailFeeRounding) MarshalJSON() ([]byte, error)
func (*MarketDetailFeeRounding) SetDirection ¶ added in v0.14.0
func (m *MarketDetailFeeRounding) SetDirection(direction MarketDetailFeeRoundingDirection)
SetDirection sets the Direction field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailFeeRounding) SetIncrement ¶ added in v0.14.0
func (m *MarketDetailFeeRounding) SetIncrement(increment float64)
SetIncrement sets the Increment field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailFeeRounding) String ¶ added in v0.14.0
func (m *MarketDetailFeeRounding) String() string
func (*MarketDetailFeeRounding) UnmarshalJSON ¶ added in v0.14.0
func (m *MarketDetailFeeRounding) UnmarshalJSON(data []byte) error
type MarketDetailFeeRoundingDirection ¶ added in v0.14.0
type MarketDetailFeeRoundingDirection string
`up` — the venue rounds the fee UP to the next increment (Kalshi ceils to $0.0001; AlphaArcade ceils to 1e-6 USDC). `nearest` — the venue rounds to the nearest increment (Polymarket rounds to 5 decimal places, with 0.00001 USDC the smallest fee charged).
const ( MarketDetailFeeRoundingDirectionUp MarketDetailFeeRoundingDirection = "up" MarketDetailFeeRoundingDirectionNearest MarketDetailFeeRoundingDirection = "nearest" )
func NewMarketDetailFeeRoundingDirectionFromString ¶ added in v0.14.0
func NewMarketDetailFeeRoundingDirectionFromString(s string) (MarketDetailFeeRoundingDirection, error)
func (MarketDetailFeeRoundingDirection) Ptr ¶ added in v0.14.0
func (m MarketDetailFeeRoundingDirection) Ptr() *MarketDetailFeeRoundingDirection
type MarketDetailOutcome ¶ added in v0.6.0
type MarketDetailOutcome struct {
// Outcome label as the platform reports it. Kalshi binary markets normalize to `Yes`/`No`; Polymarket parses the stringified outcomes array (also typically `Yes`/`No`); Predict reports per-outcome names; SX Bet uses outcome-one/outcome-two names (e.g. team labels with spreads applied); Hyperliquid uses the outcome `sideSpecs` names.
Name string `json:"name" url:"name"`
// Stable per-platform key for this outcome: Kalshi `yes`/`no`, Polymarket CLOB token id, Predict on-chain id, SX Bet `outcomeOne`/`outcomeTwo`, Hyperliquid coin encoding (`#<10*outcome+side>`). The join key for future per-outcome sub-resources (order-book depth).
OutcomeID *string `json:"outcome_id,omitempty" url:"outcome_id,omitempty"`
// Current implied probability of this outcome in 0–1 — the headline field, equal to the implied probability on every supported platform. Derivation cascade: mid of bid/ask when two-sided → the single available side → last trade → platform mark (Polymarket `outcomePrices`, which preserves 0/1 resolution marks on settled markets; AlphaArcade's catalog midpoint). Because the cascade differs by what each platform exposes, `price` is a DISPLAY number — when comparing across platforms or sizing trades, prefer `bid`/`ask` directly where present. Null when no quote of any kind exists.
//
// **A non-null `price` does not mean a tradeable price.** The last two rungs of the cascade produce a number with no book behind it, and the mid of a 0.01 / 0.99 book produces a confident-looking 0.5 that no one will fill. Read `pricing.availability` first: `live` says at least one outcome has a book the venue treats as quoted; `indicative` says every price here is a mark, a lone side, or a book the venue's own spread threshold rejects.
//
// GUARANTEE: when `pricing.availability` is `live` or `indicative`, `price` is non-null on every outcome. Values are rounded to at most 6 decimal places.
Price *float64 `json:"price,omitempty" url:"price,omitempty"`
// Best bid for this outcome in 0–1 probability. Null when that book side is empty or the platform doesn't publish per-outcome quotes on the record (Polymarket non-primary outcomes). Hyperliquid's second side is derived from the merged book complement (`1 − first-side ask`), matching the platform's order-book structure; no other platform synthesizes bid from `1 − ask`.
Bid *float64 `json:"bid,omitempty" url:"bid,omitempty"`
// Best ask (price to take this outcome) in 0–1 probability. For SX Bet this is derived from the opposite side's best maker quote (`1 − bid(other)`), which is that book's actual taker price. For Hyperliquid's second side this is derived from the merged book complement (`1 − first-side bid`).
Ask *float64 `json:"ask,omitempty" url:"ask,omitempty"`
// Last traded price for this outcome in 0–1 probability. Null where the platform exposes no last-trade on the record (Predict, SX Bet, Hyperliquid).
Last *float64 `json:"last,omitempty" url:"last,omitempty"`
// Resting size at the best bid in native contract/share units (NOT USD). Omitted where the platform publishes no per-side size — Kalshi publishes YES-side sizes only; Hyperliquid publishes top-of-book sizes from `l2Book`; Polymarket and SX Bet publish none on this path.
BidSize *float64 `json:"bid_size,omitempty" url:"bid_size,omitempty"`
// Resting size at the best ask in native contract/share units. Same availability as `bid_size`.
AskSize *float64 `json:"ask_size,omitempty" url:"ask_size,omitempty"`
// contains filtered or unexported fields
}
func (*MarketDetailOutcome) GetAsk ¶ added in v0.7.0
func (m *MarketDetailOutcome) GetAsk() *float64
func (*MarketDetailOutcome) GetAskSize ¶ added in v0.7.0
func (m *MarketDetailOutcome) GetAskSize() *float64
func (*MarketDetailOutcome) GetBid ¶ added in v0.7.0
func (m *MarketDetailOutcome) GetBid() *float64
func (*MarketDetailOutcome) GetBidSize ¶ added in v0.7.0
func (m *MarketDetailOutcome) GetBidSize() *float64
func (*MarketDetailOutcome) GetExtraProperties ¶ added in v0.6.0
func (m *MarketDetailOutcome) GetExtraProperties() map[string]interface{}
func (*MarketDetailOutcome) GetLast ¶ added in v0.7.0
func (m *MarketDetailOutcome) GetLast() *float64
func (*MarketDetailOutcome) GetName ¶ added in v0.6.0
func (m *MarketDetailOutcome) GetName() string
func (*MarketDetailOutcome) GetOutcomeID ¶ added in v0.7.0
func (m *MarketDetailOutcome) GetOutcomeID() *string
func (*MarketDetailOutcome) GetPrice ¶ added in v0.7.0
func (m *MarketDetailOutcome) GetPrice() *float64
func (*MarketDetailOutcome) MarshalJSON ¶ added in v0.6.0
func (m *MarketDetailOutcome) MarshalJSON() ([]byte, error)
func (*MarketDetailOutcome) SetAsk ¶ added in v0.7.0
func (m *MarketDetailOutcome) SetAsk(ask *float64)
SetAsk sets the Ask field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailOutcome) SetAskSize ¶ added in v0.7.0
func (m *MarketDetailOutcome) SetAskSize(askSize *float64)
SetAskSize sets the AskSize field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailOutcome) SetBid ¶ added in v0.7.0
func (m *MarketDetailOutcome) SetBid(bid *float64)
SetBid sets the Bid field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailOutcome) SetBidSize ¶ added in v0.7.0
func (m *MarketDetailOutcome) SetBidSize(bidSize *float64)
SetBidSize sets the BidSize field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailOutcome) SetLast ¶ added in v0.7.0
func (m *MarketDetailOutcome) SetLast(last *float64)
SetLast sets the Last field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailOutcome) SetName ¶ added in v0.6.0
func (m *MarketDetailOutcome) SetName(name string)
SetName sets the Name field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailOutcome) SetOutcomeID ¶ added in v0.7.0
func (m *MarketDetailOutcome) SetOutcomeID(outcomeID *string)
SetOutcomeID sets the OutcomeID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailOutcome) SetPrice ¶ added in v0.7.0
func (m *MarketDetailOutcome) SetPrice(price *float64)
SetPrice sets the Price field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailOutcome) String ¶ added in v0.6.0
func (m *MarketDetailOutcome) String() string
func (*MarketDetailOutcome) UnmarshalJSON ¶ added in v0.6.0
func (m *MarketDetailOutcome) UnmarshalJSON(data []byte) error
type MarketDetailPricing ¶ added in v0.7.0
type MarketDetailPricing struct {
// How completely — and how honestly — the pricing tier hydrated. It answers two questions in this precedence order: did every outcome get a price, and is any of those prices backed by a book you could actually cross.
//
// `live` — every outcome carries a price AND at least one outcome has a two-sided book the venue itself treats as quoted. **This is the only value that licenses reading `price` as a tradeable level.**
//
// `indicative` — every outcome carries a price, but no outcome has such a book behind it. The prices are marks, one side of a book with nothing facing it, or a two-sided book wider than the venue's own published spread threshold for that market. Concretely: an AlphaArcade market whose order book is empty, where the catalog midpoint is the only price left standing; a Predict market quoted 0.01 / 0.99, whose 0.5 midpoint is arithmetic rather than a market (Predict publishes a per-market `spreadThreshold` and this server honours it); a settled Polymarket market whose 1/0 `outcomePrices` are resolution marks; or a book with one resting order and nothing on the other side. `price` is still populated and still the venue's own number — treat it as roughly where the market is thought to be, never as a level you can trade or arbitrage against. **Filter or flag `indicative` before computing cross-venue edges**: an `indicative` 0.5 next to a `live` 0.735 elsewhere is not a 23¢ opportunity, it is one venue with no book.
//
// `partial` — some but not all outcomes priced. Incompleteness is reported ahead of quote quality because it is the louder warning, so a `partial` market says nothing about the book behind the prices it does carry.
//
// `no_quotes` — the pricing read succeeded and there is nothing at all: no book and no mark (SX Bet or Hyperliquid with no resting orders; Kalshi provisional/multivariate markets whose quotes are empty-book placeholders; AlphaArcade markets that have never traded). An empty book truthfully read is still an observation, so `observed_at` is populated.
//
// `unavailable` — the pricing enrichment fetch failed or timed out (SX Bet/Hyperliquid); identity fields are still served and `observed_at` is null.
Availability MarketDetailPricingAvailability `json:"availability" url:"availability"`
// Self-describing unit declaration for all price fields. Single canonical scale today; new values would be added alongside (never replacing) this one.
Scale MarketDetailPricingScale `json:"scale" url:"scale"`
// Where the quotes came from. `market_record` — embedded in the same single-market record as the identity fetch (Kalshi, Polymarket, Predict). `orderbook` — required one bounded second fetch against the platform's order-book surface (SX Bet `/orderbook-v3/snapshot`, Hyperliquid `l2Book`).
Source MarketDetailPricingSource `json:"source" url:"source"`
// The upstream timestamp on this platform's own clock, as RFC3339. When the two sides carry independent stamps this is the OLDER of them — a conservative floor that never over-claims freshness. Null when the record carries no timestamp at all (Predict, AlphaArcade, and SX Bet).
//
// **This field is NOT a uniform freshness bound. Read `as_of_kind` first.** What it measures differs per platform: on Hyperliquid it is the order book's server time and moves with the book, while on Kalshi it is a record write that does not move while the market is quoted. Measured live on 2026-08-24 over two runs — 100 open markets read twice 7.5 minutes apart, and 96 open markets read twice 11 minutes apart:
//
// * `kalshi` — **15 hours to 137 days old** on markets reporting `status: open` and `availability: live` with a real two-sided book. The age tracks how long ago the record was last written, so it depends entirely on the market: same-day game markets ran a median of ~23 h in one sample and ~43 h in another, while a broad sample of the market list ran a median of ~101 days (`CHINAUSGDP-30`, `status: open`, quoted 0.15 / 0.19, was stamped 2026-04-09). Advanced on 0 of 39 and 0 of 42 markets across the two runs, including five whose prices moved inside the window. **Not boundable at any threshold — do not infer one from these numbers.**
// * `polymarket` — 45 s to 405 s old; advanced on 60 of 60 and 25 of 25 markets, while only 1 of those 25 prices changed. Values recur identically across dozens of unrelated markets (one batch write, not one quote). Bounds record age in minutes, not quote age in seconds.
// * `sxbet` — a real per-side quote stamp on the V2 best-odds path, but it marks when the resting top-of-book order was posted, so on a thin book it is legitimately old: measured 39 s to 2.5 h, median ~24 min. It advances when the quote advances, which is what makes it a quote stamp — but size the bound to the venue's liquidity, not in seconds. Null from the 2026-08-25 V3 cutover onward.
// * `hyperliquid` — the `l2Book` server timestamp, a real quote stamp and the one field here that genuinely supports a seconds-scale bound: polled directly it tracks wall clock to the second.
// * `limitless` — the market record's `updatedAt`: a record write stamp in the same family as Polymarket's, advancing on the venue's own rewrite cadence rather than with the quote. Bounds record age in minutes, not quote age in seconds. The order book itself carries no wall-clock stamp.
// * `predict`, `alpha-arcade` — always null.
//
// These ranges are observed behaviour, not a contract: they are published so a consumer can pick a threshold from measured data rather than guessing, and they can change whenever a venue changes how it writes its records. Server ingest time is never substituted into this field — that would masquerade as an upstream stamp. Use `observed_at` for the read time.
AsOf *time.Time `json:"as_of,omitempty" url:"as_of,omitempty"`
// What `as_of` MEASURES on this provider, so one consumer code path can bound freshness tightly where the value is a quote time and refuse to pretend where it is not. Always present; `unknown` whenever `as_of` is null, never an empty string.
//
// `quote` — the stamp advances when the quote advances, so an age bound on it is meaningful. Hyperliquid (`l2Book` server time) and SX Bet's V2 best-odds path. How TIGHT that bound can be still depends on the venue: Hyperliquid's tracks wall clock to the second, while SX Bet's marks when the resting top-of-book order was posted and is legitimately tens of minutes old on a thin book. Size the threshold to the venue's liquidity; a blanket seconds-scale bound rejects most of SX Bet.
//
// `record_refresh` — the stamp advances on a periodic rewrite of the provider's record, independent of whether the quote moved. Bounds RECORD age (minutes), not quote age. Polymarket.
//
// `record_static` — the stamp does not advance while the market is actively quoted, so it bounds nothing at any threshold. Kalshi. Treat quote freshness as unknown here and do not gate on `as_of`; bound `observed_at` instead and take executable price from the venue's own book.
//
// `unknown` — `as_of` is null: the record carries no timestamp of any kind (Predict, AlphaArcade, SX Bet V3). Kept distinct from `record_static` because the underlying fact differs even though the consumer's action does not.
AsOfKind MarketDetailPricingAsOfKind `json:"as_of_kind" url:"as_of_kind"`
// When PREDICTORSDK read these quotes, as RFC3339 — an observation timestamp, not an upstream one. Named `observed_at` rather than `as_of` for the same reason `trading_fees.observed_at` is: `as_of` is the provider's own stamp, and reusing the name for a differently-defined value would bake that confusion into a second field.
//
// This is the one timestamp on the response whose definition does not vary by platform, which makes it the field to bound when you need a single threshold that behaves identically everywhere. It bounds the age of the READ, not the age of the quote: on a `record_static` provider a fresh `observed_at` beside a 23-hour `as_of` is the honest description of what the venue served. `/v1/markets/{market_id}` reads the venue live on every request and caches nothing, so this stamp is the request time.
//
// Taken BEFORE the upstream call, so it is never newer than the moment the quotes were actually observed and `now - observed_at` never understates their age. Null only when `availability` is `unavailable` — no quotes were observed, so there is nothing to stamp. Populated for `no_quotes`, where an empty book is a successful observation.
ObservedAt *time.Time `json:"observed_at,omitempty" url:"observed_at,omitempty"`
// True when this market belongs to a negative-risk multi-outcome event (Polymarket `negRisk`, Predict `isNegRisk`). On a multi-outcome record, outcome prices intentionally need not sum to 1 — do not "normalize" the book. Note that for the BINARY member markets these platforms serve today the flag signals event-level structure (this market is one leg of a mutually-exclusive set); the binary pair itself still sums to ~1. Omitted when false.
NegRisk *bool `json:"neg_risk,omitempty" url:"neg_risk,omitempty"`
// contains filtered or unexported fields
}
func (*MarketDetailPricing) GetAsOf ¶ added in v0.7.0
func (m *MarketDetailPricing) GetAsOf() *time.Time
func (*MarketDetailPricing) GetAsOfKind ¶ added in v0.15.0
func (m *MarketDetailPricing) GetAsOfKind() MarketDetailPricingAsOfKind
func (*MarketDetailPricing) GetAvailability ¶ added in v0.7.0
func (m *MarketDetailPricing) GetAvailability() MarketDetailPricingAvailability
func (*MarketDetailPricing) GetExtraProperties ¶ added in v0.7.0
func (m *MarketDetailPricing) GetExtraProperties() map[string]interface{}
func (*MarketDetailPricing) GetNegRisk ¶ added in v0.7.0
func (m *MarketDetailPricing) GetNegRisk() *bool
func (*MarketDetailPricing) GetObservedAt ¶ added in v0.15.0
func (m *MarketDetailPricing) GetObservedAt() *time.Time
func (*MarketDetailPricing) GetScale ¶ added in v0.7.0
func (m *MarketDetailPricing) GetScale() MarketDetailPricingScale
func (*MarketDetailPricing) GetSource ¶ added in v0.7.0
func (m *MarketDetailPricing) GetSource() MarketDetailPricingSource
func (*MarketDetailPricing) MarshalJSON ¶ added in v0.7.0
func (m *MarketDetailPricing) MarshalJSON() ([]byte, error)
func (*MarketDetailPricing) SetAsOf ¶ added in v0.7.0
func (m *MarketDetailPricing) SetAsOf(asOf *time.Time)
SetAsOf sets the AsOf field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailPricing) SetAsOfKind ¶ added in v0.15.0
func (m *MarketDetailPricing) SetAsOfKind(asOfKind MarketDetailPricingAsOfKind)
SetAsOfKind sets the AsOfKind field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailPricing) SetAvailability ¶ added in v0.7.0
func (m *MarketDetailPricing) SetAvailability(availability MarketDetailPricingAvailability)
SetAvailability sets the Availability field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailPricing) SetNegRisk ¶ added in v0.7.0
func (m *MarketDetailPricing) SetNegRisk(negRisk *bool)
SetNegRisk sets the NegRisk field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailPricing) SetObservedAt ¶ added in v0.15.0
func (m *MarketDetailPricing) SetObservedAt(observedAt *time.Time)
SetObservedAt sets the ObservedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailPricing) SetScale ¶ added in v0.7.0
func (m *MarketDetailPricing) SetScale(scale MarketDetailPricingScale)
SetScale sets the Scale field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailPricing) SetSource ¶ added in v0.7.0
func (m *MarketDetailPricing) SetSource(source MarketDetailPricingSource)
SetSource sets the Source field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailPricing) String ¶ added in v0.7.0
func (m *MarketDetailPricing) String() string
func (*MarketDetailPricing) UnmarshalJSON ¶ added in v0.7.0
func (m *MarketDetailPricing) UnmarshalJSON(data []byte) error
type MarketDetailPricingAsOfKind ¶ added in v0.15.0
type MarketDetailPricingAsOfKind string
What `as_of` MEASURES on this provider, so one consumer code path can bound freshness tightly where the value is a quote time and refuse to pretend where it is not. Always present; `unknown` whenever `as_of` is null, never an empty string.
`quote` — the stamp advances when the quote advances, so an age bound on it is meaningful. Hyperliquid (`l2Book` server time) and SX Bet's V2 best-odds path. How TIGHT that bound can be still depends on the venue: Hyperliquid's tracks wall clock to the second, while SX Bet's marks when the resting top-of-book order was posted and is legitimately tens of minutes old on a thin book. Size the threshold to the venue's liquidity; a blanket seconds-scale bound rejects most of SX Bet.
`record_refresh` — the stamp advances on a periodic rewrite of the provider's record, independent of whether the quote moved. Bounds RECORD age (minutes), not quote age. Polymarket.
`record_static` — the stamp does not advance while the market is actively quoted, so it bounds nothing at any threshold. Kalshi. Treat quote freshness as unknown here and do not gate on `as_of`; bound `observed_at` instead and take executable price from the venue's own book.
`unknown` — `as_of` is null: the record carries no timestamp of any kind (Predict, AlphaArcade, SX Bet V3). Kept distinct from `record_static` because the underlying fact differs even though the consumer's action does not.
const ( MarketDetailPricingAsOfKindQuote MarketDetailPricingAsOfKind = "quote" MarketDetailPricingAsOfKindRecordRefresh MarketDetailPricingAsOfKind = "record_refresh" MarketDetailPricingAsOfKindRecordStatic MarketDetailPricingAsOfKind = "record_static" MarketDetailPricingAsOfKindUnknown MarketDetailPricingAsOfKind = "unknown" )
func NewMarketDetailPricingAsOfKindFromString ¶ added in v0.15.0
func NewMarketDetailPricingAsOfKindFromString(s string) (MarketDetailPricingAsOfKind, error)
func (MarketDetailPricingAsOfKind) Ptr ¶ added in v0.15.0
func (m MarketDetailPricingAsOfKind) Ptr() *MarketDetailPricingAsOfKind
type MarketDetailPricingAvailability ¶ added in v0.7.0
type MarketDetailPricingAvailability string
How completely — and how honestly — the pricing tier hydrated. It answers two questions in this precedence order: did every outcome get a price, and is any of those prices backed by a book you could actually cross.
`live` — every outcome carries a price AND at least one outcome has a two-sided book the venue itself treats as quoted. **This is the only value that licenses reading `price` as a tradeable level.**
`indicative` — every outcome carries a price, but no outcome has such a book behind it. The prices are marks, one side of a book with nothing facing it, or a two-sided book wider than the venue's own published spread threshold for that market. Concretely: an AlphaArcade market whose order book is empty, where the catalog midpoint is the only price left standing; a Predict market quoted 0.01 / 0.99, whose 0.5 midpoint is arithmetic rather than a market (Predict publishes a per-market `spreadThreshold` and this server honours it); a settled Polymarket market whose 1/0 `outcomePrices` are resolution marks; or a book with one resting order and nothing on the other side. `price` is still populated and still the venue's own number — treat it as roughly where the market is thought to be, never as a level you can trade or arbitrage against. **Filter or flag `indicative` before computing cross-venue edges**: an `indicative` 0.5 next to a `live` 0.735 elsewhere is not a 23¢ opportunity, it is one venue with no book.
`partial` — some but not all outcomes priced. Incompleteness is reported ahead of quote quality because it is the louder warning, so a `partial` market says nothing about the book behind the prices it does carry.
`no_quotes` — the pricing read succeeded and there is nothing at all: no book and no mark (SX Bet or Hyperliquid with no resting orders; Kalshi provisional/multivariate markets whose quotes are empty-book placeholders; AlphaArcade markets that have never traded). An empty book truthfully read is still an observation, so `observed_at` is populated.
`unavailable` — the pricing enrichment fetch failed or timed out (SX Bet/Hyperliquid); identity fields are still served and `observed_at` is null.
const ( MarketDetailPricingAvailabilityLive MarketDetailPricingAvailability = "live" MarketDetailPricingAvailabilityIndicative MarketDetailPricingAvailability = "indicative" MarketDetailPricingAvailabilityPartial MarketDetailPricingAvailability = "partial" MarketDetailPricingAvailabilityNoQuotes MarketDetailPricingAvailability = "no_quotes" )
func NewMarketDetailPricingAvailabilityFromString ¶ added in v0.7.0
func NewMarketDetailPricingAvailabilityFromString(s string) (MarketDetailPricingAvailability, error)
func (MarketDetailPricingAvailability) Ptr ¶ added in v0.7.0
func (m MarketDetailPricingAvailability) Ptr() *MarketDetailPricingAvailability
type MarketDetailPricingScale ¶ added in v0.7.0
type MarketDetailPricingScale string
Self-describing unit declaration for all price fields. Single canonical scale today; new values would be added alongside (never replacing) this one.
const (
MarketDetailPricingScaleProbability01 MarketDetailPricingScale = "probability_0_1"
)
func NewMarketDetailPricingScaleFromString ¶ added in v0.7.0
func NewMarketDetailPricingScaleFromString(s string) (MarketDetailPricingScale, error)
func (MarketDetailPricingScale) Ptr ¶ added in v0.7.0
func (m MarketDetailPricingScale) Ptr() *MarketDetailPricingScale
type MarketDetailPricingSource ¶ added in v0.7.0
type MarketDetailPricingSource string
Where the quotes came from. `market_record` — embedded in the same single-market record as the identity fetch (Kalshi, Polymarket, Predict). `orderbook` — required one bounded second fetch against the platform's order-book surface (SX Bet `/orderbook-v3/snapshot`, Hyperliquid `l2Book`).
const ( MarketDetailPricingSourceMarketRecord MarketDetailPricingSource = "market_record" MarketDetailPricingSourceOrderbook MarketDetailPricingSource = "orderbook" )
func NewMarketDetailPricingSourceFromString ¶ added in v0.7.0
func NewMarketDetailPricingSourceFromString(s string) (MarketDetailPricingSource, error)
func (MarketDetailPricingSource) Ptr ¶ added in v0.7.0
func (m MarketDetailPricingSource) Ptr() *MarketDetailPricingSource
type MarketDetailResponse ¶ added in v0.6.0
type MarketDetailResponse struct {
// Composite market identifier in the format `{provider}:{provider_id}`. Matches the `id` field returned by `GET /v1/markets` so list output flows into detail lookups without preprocessing.
ID string `json:"id" url:"id"`
// Prediction market provider the market_id resolved against.
Provider MarketDetailResponseProvider `json:"provider" url:"provider"`
// Platform-native market identifier. Kalshi ticker, Polymarket numeric id, Predict numeric id, SX Bet `marketHash`, Hyperliquid outcome id, AlphaArcade market ULID, ProphetX `<event_id>:<market_id>` (resolving the favourite primary-line strike), or Limitless slug. For Polymarket markets resolved by slug, this is normalized to the numeric id. Hyperliquid integer ids collide with Polymarket/Predict numeric ids, so look them up via the composite id (`hyperliquid:<id>`, as returned by `/v1/markets`) or `?platform=hyperliquid`. Limitless slugs collide with Polymarket/Predict slugs, so look them up via the composite id (`limitless:<slug>`) or `?platform=limitless`.
ProviderID string `json:"provider_id" url:"provider_id"`
// Human-readable market title. Each platform exposes a slightly different field — Kalshi `title`, Polymarket `question`, Predict `title`, SX Bet composed from outcome labels (team-pair fallback) so a game's moneyline, spread, and total markets stay distinguishable, and Hyperliquid composed from outcome/question metadata.
Title string `json:"title" url:"title"`
// Normalized lifecycle status. Mapping per platform: Kalshi `active` → open · `closed`/`determined` → closed · `settled`/`finalized` → settled. Polymarket `archived` → settled · `closed && !archived` → closed · otherwise → open. Predict `tradingStatus=OPEN` → open · `CLOSED && !RESOLVED` → closed · `status=RESOLVED` → settled. SX Bet `ACTIVE` → open · otherwise closed. Hyperliquid named outcomes listed in `settledNamedOutcomes` → settled · otherwise open. Unknown upstream values default to closed.
Status MarketDetailResponseStatus `json:"status" url:"status"`
// Outcomes with per-outcome quotes. ORDERING GUARANTEE: `outcomes[0]` is the platform's primary/headline outcome — Kalshi `Yes`, Polymarket's first outcome token (its `bestBid`/`bestAsk` side), Predict `indexSet=1`, SX Bet `outcomeOne`, Hyperliquid's first `sideSpec`. Render `outcomes[0].price` as the headline probability; do NOT search for an outcome named "Yes" (names are free-text on Predict/SX Bet/Hyperliquid). Every supported platform models per-market outcomes as a 2-element list in practice (multi-outcome events are modeled as multiple binary markets nested under one event/category); the per-outcome quote shape handles binary and any future multi-outcome record identically with no special-casing.
Outcomes []*MarketDetailOutcome `json:"outcomes" url:"outcomes"`
Pricing *MarketDetailPricing `json:"pricing" url:"pricing"`
TradingFees *MarketDetailTradingFees `json:"trading_fees" url:"trading_fees"`
// Resting order-book depth valued in USD — strictly CLOB book depth, never an AMM pool size or a synthetic score. Polymarket exposes it natively (`liquidityNum`); null for Kalshi (its upstream `liquidity_dollars` is deprecated and always zero), Predict (stats is null on the record), and SX Bet/Hyperliquid (no scalar without summing the raw order book).
LiquidityUsd *float64 `json:"liquidity_usd,omitempty" url:"liquidity_usd,omitempty"`
// Trailing-24h traded volume in USD notional. Null where the platform doesn't denominate volume in USD — notably Kalshi (contracts; see `volume_24h_contracts`) — or doesn't expose a volume aggregate at all (SX Bet, Hyperliquid, Predict's record).
Volume24HUsd *float64 `json:"volume_24h_usd,omitempty" url:"volume_24h_usd,omitempty"`
// Lifetime traded volume in USD notional. Same per-platform availability as `volume_24h_usd`. Never fabricated by converting contract counts through a price.
VolumeTotalUsd *float64 `json:"volume_total_usd,omitempty" url:"volume_total_usd,omitempty"`
// Trailing-24h traded volume in contracts (Kalshi `volume_24h_fp`; fractional contracts supported). Omitted for platforms that denominate volume in USD.
Volume24HContracts *float64 `json:"volume_24h_contracts,omitempty" url:"volume_24h_contracts,omitempty"`
// Lifetime traded volume in contracts (Kalshi `volume_fp`). Omitted for platforms that denominate volume in USD.
VolumeTotalContracts *float64 `json:"volume_total_contracts,omitempty" url:"volume_total_contracts,omitempty"`
// Total outstanding contracts (Kalshi `open_interest_fp`). Contracts, not USD — a positioning gauge kept separate from `liquidity_usd` (depth). Omitted where the platform doesn't expose market-level open interest.
OpenInterest *float64 `json:"open_interest,omitempty" url:"open_interest,omitempty"`
// contains filtered or unexported fields
}
func (*MarketDetailResponse) GetExtraProperties ¶ added in v0.6.0
func (m *MarketDetailResponse) GetExtraProperties() map[string]interface{}
func (*MarketDetailResponse) GetID ¶ added in v0.6.0
func (m *MarketDetailResponse) GetID() string
func (*MarketDetailResponse) GetLiquidityUsd ¶ added in v0.7.0
func (m *MarketDetailResponse) GetLiquidityUsd() *float64
func (*MarketDetailResponse) GetOpenInterest ¶ added in v0.7.0
func (m *MarketDetailResponse) GetOpenInterest() *float64
func (*MarketDetailResponse) GetOutcomes ¶ added in v0.6.0
func (m *MarketDetailResponse) GetOutcomes() []*MarketDetailOutcome
func (*MarketDetailResponse) GetPricing ¶ added in v0.7.0
func (m *MarketDetailResponse) GetPricing() *MarketDetailPricing
func (*MarketDetailResponse) GetProvider ¶ added in v0.6.0
func (m *MarketDetailResponse) GetProvider() MarketDetailResponseProvider
func (*MarketDetailResponse) GetProviderID ¶ added in v0.6.0
func (m *MarketDetailResponse) GetProviderID() string
func (*MarketDetailResponse) GetStatus ¶ added in v0.6.0
func (m *MarketDetailResponse) GetStatus() MarketDetailResponseStatus
func (*MarketDetailResponse) GetTitle ¶ added in v0.6.0
func (m *MarketDetailResponse) GetTitle() string
func (*MarketDetailResponse) GetTradingFees ¶ added in v0.14.0
func (m *MarketDetailResponse) GetTradingFees() *MarketDetailTradingFees
func (*MarketDetailResponse) GetVolume24HContracts ¶ added in v0.7.0
func (m *MarketDetailResponse) GetVolume24HContracts() *float64
func (*MarketDetailResponse) GetVolume24HUsd ¶ added in v0.7.0
func (m *MarketDetailResponse) GetVolume24HUsd() *float64
func (*MarketDetailResponse) GetVolumeTotalContracts ¶ added in v0.7.0
func (m *MarketDetailResponse) GetVolumeTotalContracts() *float64
func (*MarketDetailResponse) GetVolumeTotalUsd ¶ added in v0.7.0
func (m *MarketDetailResponse) GetVolumeTotalUsd() *float64
func (*MarketDetailResponse) MarshalJSON ¶ added in v0.6.0
func (m *MarketDetailResponse) MarshalJSON() ([]byte, error)
func (*MarketDetailResponse) SetID ¶ added in v0.6.0
func (m *MarketDetailResponse) SetID(id string)
SetID sets the ID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetLiquidityUsd ¶ added in v0.7.0
func (m *MarketDetailResponse) SetLiquidityUsd(liquidityUsd *float64)
SetLiquidityUsd sets the LiquidityUsd field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetOpenInterest ¶ added in v0.7.0
func (m *MarketDetailResponse) SetOpenInterest(openInterest *float64)
SetOpenInterest sets the OpenInterest field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetOutcomes ¶ added in v0.6.0
func (m *MarketDetailResponse) SetOutcomes(outcomes []*MarketDetailOutcome)
SetOutcomes sets the Outcomes field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetPricing ¶ added in v0.7.0
func (m *MarketDetailResponse) SetPricing(pricing *MarketDetailPricing)
SetPricing sets the Pricing field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetProvider ¶ added in v0.6.0
func (m *MarketDetailResponse) SetProvider(provider MarketDetailResponseProvider)
SetProvider sets the Provider field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetProviderID ¶ added in v0.6.0
func (m *MarketDetailResponse) SetProviderID(providerID string)
SetProviderID sets the ProviderID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetStatus ¶ added in v0.6.0
func (m *MarketDetailResponse) SetStatus(status MarketDetailResponseStatus)
SetStatus sets the Status field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetTitle ¶ added in v0.6.0
func (m *MarketDetailResponse) SetTitle(title string)
SetTitle sets the Title field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetTradingFees ¶ added in v0.14.0
func (m *MarketDetailResponse) SetTradingFees(tradingFees *MarketDetailTradingFees)
SetTradingFees sets the TradingFees field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetVolume24HContracts ¶ added in v0.7.0
func (m *MarketDetailResponse) SetVolume24HContracts(volume24HContracts *float64)
SetVolume24HContracts sets the Volume24HContracts field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetVolume24HUsd ¶ added in v0.7.0
func (m *MarketDetailResponse) SetVolume24HUsd(volume24HUsd *float64)
SetVolume24HUsd sets the Volume24HUsd field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetVolumeTotalContracts ¶ added in v0.7.0
func (m *MarketDetailResponse) SetVolumeTotalContracts(volumeTotalContracts *float64)
SetVolumeTotalContracts sets the VolumeTotalContracts field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) SetVolumeTotalUsd ¶ added in v0.7.0
func (m *MarketDetailResponse) SetVolumeTotalUsd(volumeTotalUsd *float64)
SetVolumeTotalUsd sets the VolumeTotalUsd field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailResponse) String ¶ added in v0.6.0
func (m *MarketDetailResponse) String() string
func (*MarketDetailResponse) UnmarshalJSON ¶ added in v0.6.0
func (m *MarketDetailResponse) UnmarshalJSON(data []byte) error
type MarketDetailResponseProvider ¶ added in v0.6.0
type MarketDetailResponseProvider string
Prediction market provider the market_id resolved against.
const ( MarketDetailResponseProviderKalshi MarketDetailResponseProvider = "kalshi" MarketDetailResponseProviderPolymarket MarketDetailResponseProvider = "polymarket" MarketDetailResponseProviderPredict MarketDetailResponseProvider = "predict" MarketDetailResponseProviderSxbet MarketDetailResponseProvider = "sxbet" MarketDetailResponseProviderHyperliquid MarketDetailResponseProvider = "hyperliquid" MarketDetailResponseProviderAlphaArcade MarketDetailResponseProvider = "alpha-arcade" MarketDetailResponseProviderProphetx MarketDetailResponseProvider = "prophetx" MarketDetailResponseProviderLimitless MarketDetailResponseProvider = "limitless" )
func NewMarketDetailResponseProviderFromString ¶ added in v0.6.0
func NewMarketDetailResponseProviderFromString(s string) (MarketDetailResponseProvider, error)
func (MarketDetailResponseProvider) Ptr ¶ added in v0.6.0
func (m MarketDetailResponseProvider) Ptr() *MarketDetailResponseProvider
type MarketDetailResponseStatus ¶ added in v0.6.0
type MarketDetailResponseStatus string
Normalized lifecycle status. Mapping per platform: Kalshi `active` → open · `closed`/`determined` → closed · `settled`/`finalized` → settled. Polymarket `archived` → settled · `closed && !archived` → closed · otherwise → open. Predict `tradingStatus=OPEN` → open · `CLOSED && !RESOLVED` → closed · `status=RESOLVED` → settled. SX Bet `ACTIVE` → open · otherwise closed. Hyperliquid named outcomes listed in `settledNamedOutcomes` → settled · otherwise open. Unknown upstream values default to closed.
const ( MarketDetailResponseStatusOpen MarketDetailResponseStatus = "open" MarketDetailResponseStatusClosed MarketDetailResponseStatus = "closed" MarketDetailResponseStatusSettled MarketDetailResponseStatus = "settled" )
func NewMarketDetailResponseStatusFromString ¶ added in v0.6.0
func NewMarketDetailResponseStatusFromString(s string) (MarketDetailResponseStatus, error)
func (MarketDetailResponseStatus) Ptr ¶ added in v0.6.0
func (m MarketDetailResponseStatus) Ptr() *MarketDetailResponseStatus
type MarketDetailScheduledFeeChange ¶ added in v0.14.0
type MarketDetailScheduledFeeChange struct {
// When the new parameters take effect, RFC3339.
EffectiveAt time.Time `json:"effective_at" url:"effective_at"`
Taker *MarketDetailFeeLeg `json:"taker,omitempty" url:"taker,omitempty"`
Maker *MarketDetailFeeLeg `json:"maker,omitempty" url:"maker,omitempty"`
// contains filtered or unexported fields
}
func (*MarketDetailScheduledFeeChange) GetEffectiveAt ¶ added in v0.14.0
func (m *MarketDetailScheduledFeeChange) GetEffectiveAt() time.Time
func (*MarketDetailScheduledFeeChange) GetExtraProperties ¶ added in v0.14.0
func (m *MarketDetailScheduledFeeChange) GetExtraProperties() map[string]interface{}
func (*MarketDetailScheduledFeeChange) GetMaker ¶ added in v0.14.0
func (m *MarketDetailScheduledFeeChange) GetMaker() *MarketDetailFeeLeg
func (*MarketDetailScheduledFeeChange) GetTaker ¶ added in v0.14.0
func (m *MarketDetailScheduledFeeChange) GetTaker() *MarketDetailFeeLeg
func (*MarketDetailScheduledFeeChange) MarshalJSON ¶ added in v0.14.0
func (m *MarketDetailScheduledFeeChange) MarshalJSON() ([]byte, error)
func (*MarketDetailScheduledFeeChange) SetEffectiveAt ¶ added in v0.14.0
func (m *MarketDetailScheduledFeeChange) SetEffectiveAt(effectiveAt time.Time)
SetEffectiveAt sets the EffectiveAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailScheduledFeeChange) SetMaker ¶ added in v0.14.0
func (m *MarketDetailScheduledFeeChange) SetMaker(maker *MarketDetailFeeLeg)
SetMaker sets the Maker field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailScheduledFeeChange) SetTaker ¶ added in v0.14.0
func (m *MarketDetailScheduledFeeChange) SetTaker(taker *MarketDetailFeeLeg)
SetTaker sets the Taker field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailScheduledFeeChange) String ¶ added in v0.14.0
func (m *MarketDetailScheduledFeeChange) String() string
func (*MarketDetailScheduledFeeChange) UnmarshalJSON ¶ added in v0.14.0
func (m *MarketDetailScheduledFeeChange) UnmarshalJSON(data []byte) error
type MarketDetailTradingFees ¶ added in v0.14.0
type MarketDetailTradingFees struct {
// `published` — the full parameter set for this market is known. `partial` — fees may be charged here but a parameter is missing or uninterpretable upstream; the legs carry what is known and null the rest, never a guess. It also covers the case where the parameters in force are known but the venue's pending-change list was unreadable, so an omitted `scheduled_change` means "unknown" rather than "none". `account_specific` — rates exist but are set per trading account and require your own venue credentials (SX Bet's `GET /user/fees-v3`, Hyperliquid's `POST /info {"type":"userFees"}`). `unpublished` — the venue publishes no fee model for this market at all. `unavailable` — our own bounded parameter fetch failed or timed out; identity and pricing are still served. Same contract as `pricing.availability`.
Availability MarketDetailTradingFeesAvailability `json:"availability" url:"availability"`
// When PredictorSDK READ these parameter values — an observation timestamp, not an upstream stamp.
//
// Named `observed_at` rather than `as_of` deliberately: `pricing.as_of` is the provider record's own last-update time, which is a different thing, and reusing the name for a differently-defined timestamp would bake that confusion into a second field. Null when nothing is read at request time (`source: venue_schedule`) or when nothing could be read (`availability: unavailable`).
ObservedAt *time.Time `json:"observed_at,omitempty" url:"observed_at,omitempty"`
// Where the parameters came from, so a latency-sensitive consumer knows which platforms cost extra hops. `market_record` — embedded in the same market record the identity fetch already returned (Polymarket `feeSchedule`, Predict `feeRateBps`, AlphaArcade `feeBasePercent`); zero extra fetches. `series_record` — the parameters live on parent records and cost up to three small, TTL-cached hops (Kalshi: the event record for its series ticker and any fee override in force, the series for the base `fee_type`/`fee_multiplier` that override supersedes, then the event's pending fee changes for `scheduled_change`). `venue_schedule` — the venue exposes no per-market parameter and the answer comes from its published schedule (SX Bet, Hyperliquid).
Source MarketDetailTradingFeesSource `json:"source" url:"source"`
// What the fee is assessed on. `fill` — assessed when the order fills, from the traded share count and the fill price. `settlement_profit` — assessed at settlement, on profit (total return − stake), and only on a position that WON; a loss or a void is never charged.
//
// Read this before comparing rates across venues. SX Bet charges on winning profit at settlement, so its fee is an expected-value haircut rather than an entry cost — a consumer that models it as a percentage of notional is wrong about the shape before it is wrong about the rate. The reported basis is the one that applies to trading: SX Bet's four payout fees. Its separate `refundFee` is charged at fill time on the capital-efficiency refund rather than on profit, and is out of scope here along with its rates.
ChargeBasis *MarketDetailTradingFeesChargeBasis `json:"charge_basis,omitempty" url:"charge_basis,omitempty"`
Taker *MarketDetailFeeLeg `json:"taker,omitempty" url:"taker,omitempty"`
Maker *MarketDetailFeeLeg `json:"maker,omitempty" url:"maker,omitempty"`
ScheduledChange *MarketDetailScheduledFeeChange `json:"scheduled_change,omitempty" url:"scheduled_change,omitempty"`
// contains filtered or unexported fields
}
func (*MarketDetailTradingFees) GetAvailability ¶ added in v0.14.0
func (m *MarketDetailTradingFees) GetAvailability() MarketDetailTradingFeesAvailability
func (*MarketDetailTradingFees) GetChargeBasis ¶ added in v0.14.0
func (m *MarketDetailTradingFees) GetChargeBasis() *MarketDetailTradingFeesChargeBasis
func (*MarketDetailTradingFees) GetExtraProperties ¶ added in v0.14.0
func (m *MarketDetailTradingFees) GetExtraProperties() map[string]interface{}
func (*MarketDetailTradingFees) GetMaker ¶ added in v0.14.0
func (m *MarketDetailTradingFees) GetMaker() *MarketDetailFeeLeg
func (*MarketDetailTradingFees) GetObservedAt ¶ added in v0.14.0
func (m *MarketDetailTradingFees) GetObservedAt() *time.Time
func (*MarketDetailTradingFees) GetScheduledChange ¶ added in v0.14.0
func (m *MarketDetailTradingFees) GetScheduledChange() *MarketDetailScheduledFeeChange
func (*MarketDetailTradingFees) GetSource ¶ added in v0.14.0
func (m *MarketDetailTradingFees) GetSource() MarketDetailTradingFeesSource
func (*MarketDetailTradingFees) GetTaker ¶ added in v0.14.0
func (m *MarketDetailTradingFees) GetTaker() *MarketDetailFeeLeg
func (*MarketDetailTradingFees) MarshalJSON ¶ added in v0.14.0
func (m *MarketDetailTradingFees) MarshalJSON() ([]byte, error)
func (*MarketDetailTradingFees) SetAvailability ¶ added in v0.14.0
func (m *MarketDetailTradingFees) SetAvailability(availability MarketDetailTradingFeesAvailability)
SetAvailability sets the Availability field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailTradingFees) SetChargeBasis ¶ added in v0.14.0
func (m *MarketDetailTradingFees) SetChargeBasis(chargeBasis *MarketDetailTradingFeesChargeBasis)
SetChargeBasis sets the ChargeBasis field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailTradingFees) SetMaker ¶ added in v0.14.0
func (m *MarketDetailTradingFees) SetMaker(maker *MarketDetailFeeLeg)
SetMaker sets the Maker field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailTradingFees) SetObservedAt ¶ added in v0.14.0
func (m *MarketDetailTradingFees) SetObservedAt(observedAt *time.Time)
SetObservedAt sets the ObservedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailTradingFees) SetScheduledChange ¶ added in v0.14.0
func (m *MarketDetailTradingFees) SetScheduledChange(scheduledChange *MarketDetailScheduledFeeChange)
SetScheduledChange sets the ScheduledChange field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailTradingFees) SetSource ¶ added in v0.14.0
func (m *MarketDetailTradingFees) SetSource(source MarketDetailTradingFeesSource)
SetSource sets the Source field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailTradingFees) SetTaker ¶ added in v0.14.0
func (m *MarketDetailTradingFees) SetTaker(taker *MarketDetailFeeLeg)
SetTaker sets the Taker field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketDetailTradingFees) String ¶ added in v0.14.0
func (m *MarketDetailTradingFees) String() string
func (*MarketDetailTradingFees) UnmarshalJSON ¶ added in v0.14.0
func (m *MarketDetailTradingFees) UnmarshalJSON(data []byte) error
type MarketDetailTradingFeesAvailability ¶ added in v0.14.0
type MarketDetailTradingFeesAvailability string
`published` — the full parameter set for this market is known. `partial` — fees may be charged here but a parameter is missing or uninterpretable upstream; the legs carry what is known and null the rest, never a guess. It also covers the case where the parameters in force are known but the venue's pending-change list was unreadable, so an omitted `scheduled_change` means "unknown" rather than "none". `account_specific` — rates exist but are set per trading account and require your own venue credentials (SX Bet's `GET /user/fees-v3`, Hyperliquid's `POST /info {"type":"userFees"}`). `unpublished` — the venue publishes no fee model for this market at all. `unavailable` — our own bounded parameter fetch failed or timed out; identity and pricing are still served. Same contract as `pricing.availability`.
const ( MarketDetailTradingFeesAvailabilityPublished MarketDetailTradingFeesAvailability = "published" MarketDetailTradingFeesAvailabilityPartial MarketDetailTradingFeesAvailability = "partial" MarketDetailTradingFeesAvailabilityAccountSpecific MarketDetailTradingFeesAvailability = "account_specific" MarketDetailTradingFeesAvailabilityUnpublished MarketDetailTradingFeesAvailability = "unpublished" )
func NewMarketDetailTradingFeesAvailabilityFromString ¶ added in v0.14.0
func NewMarketDetailTradingFeesAvailabilityFromString(s string) (MarketDetailTradingFeesAvailability, error)
type MarketDetailTradingFeesChargeBasis ¶ added in v0.14.0
type MarketDetailTradingFeesChargeBasis string
What the fee is assessed on. `fill` — assessed when the order fills, from the traded share count and the fill price. `settlement_profit` — assessed at settlement, on profit (total return − stake), and only on a position that WON; a loss or a void is never charged.
Read this before comparing rates across venues. SX Bet charges on winning profit at settlement, so its fee is an expected-value haircut rather than an entry cost — a consumer that models it as a percentage of notional is wrong about the shape before it is wrong about the rate. The reported basis is the one that applies to trading: SX Bet's four payout fees. Its separate `refundFee` is charged at fill time on the capital-efficiency refund rather than on profit, and is out of scope here along with its rates.
const ( MarketDetailTradingFeesChargeBasisFill MarketDetailTradingFeesChargeBasis = "fill" MarketDetailTradingFeesChargeBasisSettlementProfit MarketDetailTradingFeesChargeBasis = "settlement_profit" )
func NewMarketDetailTradingFeesChargeBasisFromString ¶ added in v0.14.0
func NewMarketDetailTradingFeesChargeBasisFromString(s string) (MarketDetailTradingFeesChargeBasis, error)
func (MarketDetailTradingFeesChargeBasis) Ptr ¶ added in v0.14.0
func (m MarketDetailTradingFeesChargeBasis) Ptr() *MarketDetailTradingFeesChargeBasis
type MarketDetailTradingFeesSource ¶ added in v0.14.0
type MarketDetailTradingFeesSource string
Where the parameters came from, so a latency-sensitive consumer knows which platforms cost extra hops. `market_record` — embedded in the same market record the identity fetch already returned (Polymarket `feeSchedule`, Predict `feeRateBps`, AlphaArcade `feeBasePercent`); zero extra fetches. `series_record` — the parameters live on parent records and cost up to three small, TTL-cached hops (Kalshi: the event record for its series ticker and any fee override in force, the series for the base `fee_type`/`fee_multiplier` that override supersedes, then the event's pending fee changes for `scheduled_change`). `venue_schedule` — the venue exposes no per-market parameter and the answer comes from its published schedule (SX Bet, Hyperliquid).
const ( MarketDetailTradingFeesSourceMarketRecord MarketDetailTradingFeesSource = "market_record" MarketDetailTradingFeesSourceSeriesRecord MarketDetailTradingFeesSource = "series_record" MarketDetailTradingFeesSourceVenueSchedule MarketDetailTradingFeesSource = "venue_schedule" )
func NewMarketDetailTradingFeesSourceFromString ¶ added in v0.14.0
func NewMarketDetailTradingFeesSourceFromString(s string) (MarketDetailTradingFeesSource, error)
func (MarketDetailTradingFeesSource) Ptr ¶ added in v0.14.0
func (m MarketDetailTradingFeesSource) Ptr() *MarketDetailTradingFeesSource
type MarketsListResponse ¶ added in v0.3.0
type MarketsListResponse struct {
// Array of markets for the current page.
Data []*UnifiedMarket `json:"data" url:"data"`
// Freshness of the catalog snapshot this page was served from. Describes the DATA; `pagination` describes the page.
Snapshot *MarketsSnapshot `json:"snapshot" url:"snapshot"`
// Pagination metadata for the current page.
Pagination *PaginationBlock `json:"pagination" url:"pagination"`
// contains filtered or unexported fields
}
func (*MarketsListResponse) GetData ¶ added in v0.3.0
func (m *MarketsListResponse) GetData() []*UnifiedMarket
func (*MarketsListResponse) GetExtraProperties ¶ added in v0.3.0
func (m *MarketsListResponse) GetExtraProperties() map[string]interface{}
func (*MarketsListResponse) GetPagination ¶ added in v0.3.0
func (m *MarketsListResponse) GetPagination() *PaginationBlock
func (*MarketsListResponse) GetSnapshot ¶ added in v0.15.0
func (m *MarketsListResponse) GetSnapshot() *MarketsSnapshot
func (*MarketsListResponse) MarshalJSON ¶ added in v0.3.0
func (m *MarketsListResponse) MarshalJSON() ([]byte, error)
func (*MarketsListResponse) SetData ¶ added in v0.3.0
func (m *MarketsListResponse) SetData(data []*UnifiedMarket)
SetData sets the Data field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketsListResponse) SetPagination ¶ added in v0.3.0
func (m *MarketsListResponse) SetPagination(pagination *PaginationBlock)
SetPagination sets the Pagination field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketsListResponse) SetSnapshot ¶ added in v0.15.0
func (m *MarketsListResponse) SetSnapshot(snapshot *MarketsSnapshot)
SetSnapshot sets the Snapshot field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketsListResponse) String ¶ added in v0.3.0
func (m *MarketsListResponse) String() string
func (*MarketsListResponse) UnmarshalJSON ¶ added in v0.3.0
func (m *MarketsListResponse) UnmarshalJSON(data []byte) error
type MarketsSnapshot ¶ added in v0.15.0
type MarketsSnapshot struct {
// When PredictorSDK finished reading the OLDEST provider catalog contributing rows to this response — a conservative freshness floor for the whole page, in millisecond-precision ISO 8601.
//
// `observed_at` is a PredictorSDK read time, the same meaning it carries on `pricing.observed_at` and `trading_fees.observed_at`. The difference is WHICH read: those two stamp the upstream call this request made, while this one stamps the background ingestion crawl that built the snapshot, so it is normally minutes to hours old rather than milliseconds. It is not `as_of` because no venue published it.
//
// **It is a floor, not a single fact.** Providers are crawled on independent schedules, so the catalog is a merge of snapshots of different ages and one of them is the stalest. Narrow the response with `?provider=` to get that provider's own read time exactly — under a filter this field describes only the selected provider, the same way `pagination.total` does.
//
// Stable for an entire cursor traversal: a cursor stays bound to the snapshot that issued it, so every page of one traversal reports the identical value even while newer snapshots are published.
//
// `null` when the bound snapshot carries no read time. An unstamped provider makes the whole value null rather than being skipped, because reporting a newer floor than the data supports would let stale rows through a correct freshness bound.
ObservedAt *time.Time `json:"observed_at,omitempty" url:"observed_at,omitempty"`
// contains filtered or unexported fields
}
func (*MarketsSnapshot) GetExtraProperties ¶ added in v0.15.0
func (m *MarketsSnapshot) GetExtraProperties() map[string]interface{}
func (*MarketsSnapshot) GetObservedAt ¶ added in v0.15.0
func (m *MarketsSnapshot) GetObservedAt() *time.Time
func (*MarketsSnapshot) MarshalJSON ¶ added in v0.15.0
func (m *MarketsSnapshot) MarshalJSON() ([]byte, error)
func (*MarketsSnapshot) SetObservedAt ¶ added in v0.15.0
func (m *MarketsSnapshot) SetObservedAt(observedAt *time.Time)
SetObservedAt sets the ObservedAt field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*MarketsSnapshot) String ¶ added in v0.15.0
func (m *MarketsSnapshot) String() string
func (*MarketsSnapshot) UnmarshalJSON ¶ added in v0.15.0
func (m *MarketsSnapshot) UnmarshalJSON(data []byte) error
type NotFoundError ¶ added in v0.4.0
type NotFoundError struct {
*core.APIError
Body *ErrorResponse
}
Resource not found.
func (*NotFoundError) MarshalJSON ¶ added in v0.4.0
func (n *NotFoundError) MarshalJSON() ([]byte, error)
func (*NotFoundError) UnmarshalJSON ¶ added in v0.4.0
func (n *NotFoundError) UnmarshalJSON(data []byte) error
func (*NotFoundError) Unwrap ¶ added in v0.4.0
func (n *NotFoundError) Unwrap() error
type PaginationBlock ¶ added in v0.3.0
type PaginationBlock struct {
// Number of items requested per page (echoes the `limit` query param).
Limit int `json:"limit" url:"limit"`
// Total matching items across all pages, when known. Set to `0` for endpoints whose upstream does not expose a total count — clients should rely on `has_more` and `next_cursor` to paginate in that case.
Total int `json:"total" url:"total"`
// Whether additional pages exist beyond this one.
HasMore bool `json:"has_more" url:"has_more"`
// Opaque cursor for fetching the next page. Pass back via the `cursor` query parameter. Omitted when `has_more` is `false`. Clients must preserve the same filter set when re-using a cursor — mismatches return `400`.
NextCursor *string `json:"next_cursor,omitempty" url:"next_cursor,omitempty"`
// contains filtered or unexported fields
}
func (*PaginationBlock) GetExtraProperties ¶ added in v0.3.0
func (p *PaginationBlock) GetExtraProperties() map[string]interface{}
func (*PaginationBlock) GetHasMore ¶ added in v0.3.0
func (p *PaginationBlock) GetHasMore() bool
func (*PaginationBlock) GetLimit ¶ added in v0.3.0
func (p *PaginationBlock) GetLimit() int
func (*PaginationBlock) GetNextCursor ¶ added in v0.3.0
func (p *PaginationBlock) GetNextCursor() *string
func (*PaginationBlock) GetTotal ¶ added in v0.3.0
func (p *PaginationBlock) GetTotal() int
func (*PaginationBlock) MarshalJSON ¶ added in v0.3.0
func (p *PaginationBlock) MarshalJSON() ([]byte, error)
func (*PaginationBlock) SetHasMore ¶ added in v0.3.0
func (p *PaginationBlock) SetHasMore(hasMore bool)
SetHasMore sets the HasMore field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaginationBlock) SetLimit ¶ added in v0.3.0
func (p *PaginationBlock) SetLimit(limit int)
SetLimit sets the Limit field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaginationBlock) SetNextCursor ¶ added in v0.3.0
func (p *PaginationBlock) SetNextCursor(nextCursor *string)
SetNextCursor sets the NextCursor field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaginationBlock) SetTotal ¶ added in v0.3.0
func (p *PaginationBlock) SetTotal(total int)
SetTotal sets the Total field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaginationBlock) String ¶ added in v0.3.0
func (p *PaginationBlock) String() string
func (*PaginationBlock) UnmarshalJSON ¶ added in v0.3.0
func (p *PaginationBlock) UnmarshalJSON(data []byte) error
type PaymentRequiredError ¶ added in v0.3.1
type PaymentRequiredError struct {
*core.APIError
Body *PaymentRequiredErrorBody
}
Free tier monthly request allowance is exhausted, or the caller's paid subscription is in a payment-recovery state. This endpoint is available on every plan, so 402 never indicates a tier mismatch here.
func (*PaymentRequiredError) MarshalJSON ¶ added in v0.3.1
func (p *PaymentRequiredError) MarshalJSON() ([]byte, error)
func (*PaymentRequiredError) UnmarshalJSON ¶ added in v0.3.1
func (p *PaymentRequiredError) UnmarshalJSON(data []byte) error
func (*PaymentRequiredError) Unwrap ¶ added in v0.3.1
func (p *PaymentRequiredError) Unwrap() error
type PaymentRequiredErrorAction ¶ added in v0.3.1
type PaymentRequiredErrorAction string
Recommended client action for an HTTP 402 response.
const ( PaymentRequiredErrorActionUpgradePlan PaymentRequiredErrorAction = "upgrade_plan" PaymentRequiredErrorActionResolvePayment PaymentRequiredErrorAction = "resolve_payment" )
func NewPaymentRequiredErrorActionFromString ¶ added in v0.3.1
func NewPaymentRequiredErrorActionFromString(s string) (PaymentRequiredErrorAction, error)
func (PaymentRequiredErrorAction) Ptr ¶ added in v0.3.1
func (p PaymentRequiredErrorAction) Ptr() *PaymentRequiredErrorAction
type PaymentRequiredErrorBody ¶ added in v0.3.1
type PaymentRequiredErrorBody struct {
Error string `json:"error" url:"error"`
// Additional detail about the error.
Message *string `json:"message,omitempty" url:"message,omitempty"`
StatusCode int `json:"status_code" url:"status_code"`
Action PaymentRequiredErrorAction `json:"action" url:"action"`
// Billing tier that would satisfy the gate (e.g. `starter`, `pro`, `business`, `enterprise`).
RequiredTier string `json:"required_tier" url:"required_tier"`
// Billing tier currently associated with the caller.
CurrentTier string `json:"current_tier" url:"current_tier"`
// Monthly Free-tier allowance. Present only when the 402 is caused by the Free cap.
IncludedRequestsPerMonth *int64 `json:"included_requests_per_month,omitempty" url:"included_requests_per_month,omitempty"`
// Requests the Free caller has made in the current calendar month. Present only when the 402 is caused by the Free cap.
CurrentPeriodRequests *int64 `json:"current_period_requests,omitempty" url:"current_period_requests,omitempty"`
// contains filtered or unexported fields
}
func (*PaymentRequiredErrorBody) GetAction ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) GetAction() PaymentRequiredErrorAction
func (*PaymentRequiredErrorBody) GetCurrentPeriodRequests ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) GetCurrentPeriodRequests() *int64
func (*PaymentRequiredErrorBody) GetCurrentTier ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) GetCurrentTier() string
func (*PaymentRequiredErrorBody) GetError ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) GetError() string
func (*PaymentRequiredErrorBody) GetExtraProperties ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) GetExtraProperties() map[string]interface{}
func (*PaymentRequiredErrorBody) GetIncludedRequestsPerMonth ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) GetIncludedRequestsPerMonth() *int64
func (*PaymentRequiredErrorBody) GetMessage ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) GetMessage() *string
func (*PaymentRequiredErrorBody) GetRequiredTier ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) GetRequiredTier() string
func (*PaymentRequiredErrorBody) GetStatusCode ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) GetStatusCode() int
func (*PaymentRequiredErrorBody) MarshalJSON ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) MarshalJSON() ([]byte, error)
func (*PaymentRequiredErrorBody) SetAction ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) SetAction(action PaymentRequiredErrorAction)
SetAction sets the Action field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaymentRequiredErrorBody) SetCurrentPeriodRequests ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) SetCurrentPeriodRequests(currentPeriodRequests *int64)
SetCurrentPeriodRequests sets the CurrentPeriodRequests field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaymentRequiredErrorBody) SetCurrentTier ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) SetCurrentTier(currentTier string)
SetCurrentTier sets the CurrentTier field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaymentRequiredErrorBody) SetError ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) SetError(error_ string)
SetError sets the Error field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaymentRequiredErrorBody) SetIncludedRequestsPerMonth ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) SetIncludedRequestsPerMonth(includedRequestsPerMonth *int64)
SetIncludedRequestsPerMonth sets the IncludedRequestsPerMonth field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaymentRequiredErrorBody) SetMessage ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) SetMessage(message *string)
SetMessage sets the Message field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaymentRequiredErrorBody) SetRequiredTier ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) SetRequiredTier(requiredTier string)
SetRequiredTier sets the RequiredTier field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaymentRequiredErrorBody) SetStatusCode ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) SetStatusCode(statusCode int)
SetStatusCode sets the StatusCode field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PaymentRequiredErrorBody) String ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) String() string
func (*PaymentRequiredErrorBody) UnmarshalJSON ¶ added in v0.3.1
func (p *PaymentRequiredErrorBody) UnmarshalJSON(data []byte) error
type Plan ¶ added in v0.11.0
type Plan struct {
// Stable public plan key.
Key string `json:"key" url:"key"`
Name string `json:"name" url:"name"`
// Runtime entitlement tier; empty for a manually provisioned contact-sales plan.
BillingTier string `json:"billing_tier" url:"billing_tier"`
TrialDays int `json:"trial_days" url:"trial_days"`
Tagline string `json:"tagline" url:"tagline"`
// Monthly display price in US cents; zero for free or contact-sales plans.
MonthlyPriceCents int64 `json:"monthly_price_cents" url:"monthly_price_cents"`
IncludedRequestsPerMonth int64 `json:"included_requests_per_month" url:"included_requests_per_month"`
OverageCentsPer1K int64 `json:"overage_cents_per_1k" url:"overage_cents_per_1k"`
RateLimitPerMin int `json:"rate_limit_per_min" url:"rate_limit_per_min"`
MaxKeys int `json:"max_keys" url:"max_keys"`
Features []string `json:"features" url:"features"`
CtaLabel string `json:"cta_label" url:"cta_label"`
Highlighted bool `json:"highlighted" url:"highlighted"`
ContactSales bool `json:"contact_sales" url:"contact_sales"`
// contains filtered or unexported fields
}
func (*Plan) GetBillingTier ¶ added in v0.11.0
func (*Plan) GetContactSales ¶ added in v0.11.0
func (*Plan) GetCtaLabel ¶ added in v0.11.0
func (*Plan) GetExtraProperties ¶ added in v0.11.0
func (*Plan) GetFeatures ¶ added in v0.11.0
func (*Plan) GetHighlighted ¶ added in v0.11.0
func (*Plan) GetIncludedRequestsPerMonth ¶ added in v0.11.0
func (*Plan) GetMaxKeys ¶ added in v0.11.0
func (*Plan) GetMonthlyPriceCents ¶ added in v0.11.0
func (*Plan) GetOverageCentsPer1K ¶ added in v0.11.0
func (*Plan) GetRateLimitPerMin ¶ added in v0.11.0
func (*Plan) GetTagline ¶ added in v0.11.0
func (*Plan) GetTrialDays ¶ added in v0.11.0
func (*Plan) MarshalJSON ¶ added in v0.11.0
func (*Plan) SetBillingTier ¶ added in v0.11.0
SetBillingTier sets the BillingTier field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetContactSales ¶ added in v0.11.0
SetContactSales sets the ContactSales field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetCtaLabel ¶ added in v0.11.0
SetCtaLabel sets the CtaLabel field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetFeatures ¶ added in v0.11.0
SetFeatures sets the Features field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetHighlighted ¶ added in v0.11.0
SetHighlighted sets the Highlighted field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetIncludedRequestsPerMonth ¶ added in v0.11.0
SetIncludedRequestsPerMonth sets the IncludedRequestsPerMonth field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetKey ¶ added in v0.11.0
SetKey sets the Key field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetMaxKeys ¶ added in v0.11.0
SetMaxKeys sets the MaxKeys field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetMonthlyPriceCents ¶ added in v0.11.0
SetMonthlyPriceCents sets the MonthlyPriceCents field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetName ¶ added in v0.11.0
SetName sets the Name field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetOverageCentsPer1K ¶ added in v0.11.0
SetOverageCentsPer1K sets the OverageCentsPer1K field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetRateLimitPerMin ¶ added in v0.11.0
SetRateLimitPerMin sets the RateLimitPerMin field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetTagline ¶ added in v0.11.0
SetTagline sets the Tagline field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) SetTrialDays ¶ added in v0.11.0
SetTrialDays sets the TrialDays field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*Plan) UnmarshalJSON ¶ added in v0.11.0
type PlansResponse ¶ added in v0.11.0
type PlansResponse struct {
Data []*Plan `json:"data" url:"data"`
// contains filtered or unexported fields
}
func (*PlansResponse) GetData ¶ added in v0.11.0
func (p *PlansResponse) GetData() []*Plan
func (*PlansResponse) GetExtraProperties ¶ added in v0.11.0
func (p *PlansResponse) GetExtraProperties() map[string]interface{}
func (*PlansResponse) MarshalJSON ¶ added in v0.11.0
func (p *PlansResponse) MarshalJSON() ([]byte, error)
func (*PlansResponse) SetData ¶ added in v0.11.0
func (p *PlansResponse) SetData(data []*Plan)
SetData sets the Data field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlansResponse) String ¶ added in v0.11.0
func (p *PlansResponse) String() string
func (*PlansResponse) UnmarshalJSON ¶ added in v0.11.0
func (p *PlansResponse) UnmarshalJSON(data []byte) error
type PlatformMarket ¶
type PlatformMarket struct {
Platform PlatformMarketPlatform `json:"platform" url:"platform"`
// Provider-native parent event or fixture identifier for the path in `GET /v1/events/{event_id}`. Kalshi uses its event ticker, Polymarket its event slug (or numeric event ID fallback), Predict its market ID, SX Bet its `L...` fixture ID, AlphaArcade its parent market ULID, and ProphetX its integer event id. Always pair it with the events endpoint's `platform` query parameter, passing this row's `platform` value (matched case-insensitively). Without that override, ambiguous identifiers probe only Polymarket and Predict: two hits return `409`, one hit returns that provider's event, and no hits return `404`. AlphaArcade and ProphetX are never probed or inferred; their native IDs require the override or a provider-prefixed composite ID to reach the correct venue. Retained snapshots created before this field was introduced may omit it.
EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
// Kalshi event ticker. Present when platform is KALSHI.
EventTicker *string `json:"event_ticker,omitempty" url:"event_ticker,omitempty"`
// Kalshi market tickers. Present when platform is KALSHI.
MarketTickers []string `json:"market_tickers,omitempty" url:"market_tickers,omitempty"`
// Polymarket market slug. Present when platform is POLYMARKET.
MarketSlug *string `json:"market_slug,omitempty" url:"market_slug,omitempty"`
// Polymarket token IDs. Present when platform is POLYMARKET.
TokenIDs []string `json:"token_ids,omitempty" url:"token_ids,omitempty"`
// Source market ID. Present for platforms other than Kalshi and Polymarket.
MarketID *string `json:"market_id,omitempty" url:"market_id,omitempty"`
// Source outcome IDs for the market named by `market_id`, sorted and de-duplicated. These are the same values `GET /v1/markets/{market_id}` returns as `outcomes[].outcome_id`, so they join directly. SX Bet's are `outcomeOne`/`outcomeTwo` — market-scoped, because SX Bet publishes no per-outcome token; read them together with `market_id`. ProphetX's are small integers (`4`, `5`) that are likewise market-scoped. Present for platforms that use outcome IDs.
OutcomeIDs []string `json:"outcome_ids,omitempty" url:"outcome_ids,omitempty"`
// contains filtered or unexported fields
}
func (*PlatformMarket) GetEventID ¶ added in v0.13.0
func (p *PlatformMarket) GetEventID() *string
func (*PlatformMarket) GetEventTicker ¶
func (p *PlatformMarket) GetEventTicker() *string
func (*PlatformMarket) GetExtraProperties ¶
func (p *PlatformMarket) GetExtraProperties() map[string]interface{}
func (*PlatformMarket) GetMarketID ¶
func (p *PlatformMarket) GetMarketID() *string
func (*PlatformMarket) GetMarketSlug ¶
func (p *PlatformMarket) GetMarketSlug() *string
func (*PlatformMarket) GetMarketTickers ¶
func (p *PlatformMarket) GetMarketTickers() []string
func (*PlatformMarket) GetOutcomeIDs ¶
func (p *PlatformMarket) GetOutcomeIDs() []string
func (*PlatformMarket) GetPlatform ¶
func (p *PlatformMarket) GetPlatform() PlatformMarketPlatform
func (*PlatformMarket) GetTokenIDs ¶
func (p *PlatformMarket) GetTokenIDs() []string
func (*PlatformMarket) MarshalJSON ¶
func (p *PlatformMarket) MarshalJSON() ([]byte, error)
func (*PlatformMarket) SetEventID ¶ added in v0.13.0
func (p *PlatformMarket) SetEventID(eventID *string)
SetEventID sets the EventID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlatformMarket) SetEventTicker ¶
func (p *PlatformMarket) SetEventTicker(eventTicker *string)
SetEventTicker sets the EventTicker field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlatformMarket) SetMarketID ¶
func (p *PlatformMarket) SetMarketID(marketID *string)
SetMarketID sets the MarketID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlatformMarket) SetMarketSlug ¶
func (p *PlatformMarket) SetMarketSlug(marketSlug *string)
SetMarketSlug sets the MarketSlug field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlatformMarket) SetMarketTickers ¶
func (p *PlatformMarket) SetMarketTickers(marketTickers []string)
SetMarketTickers sets the MarketTickers field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlatformMarket) SetOutcomeIDs ¶
func (p *PlatformMarket) SetOutcomeIDs(outcomeIDs []string)
SetOutcomeIDs sets the OutcomeIDs field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlatformMarket) SetPlatform ¶
func (p *PlatformMarket) SetPlatform(platform PlatformMarketPlatform)
SetPlatform sets the Platform field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlatformMarket) SetTokenIDs ¶
func (p *PlatformMarket) SetTokenIDs(tokenIDs []string)
SetTokenIDs sets the TokenIDs field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlatformMarket) String ¶
func (p *PlatformMarket) String() string
func (*PlatformMarket) UnmarshalJSON ¶
func (p *PlatformMarket) UnmarshalJSON(data []byte) error
type PlatformMarketPlatform ¶
type PlatformMarketPlatform string
const ( PlatformMarketPlatformKalshi PlatformMarketPlatform = "KALSHI" PlatformMarketPlatformPolymarket PlatformMarketPlatform = "POLYMARKET" PlatformMarketPlatformPredict PlatformMarketPlatform = "PREDICT" PlatformMarketPlatformSxbet PlatformMarketPlatform = "SXBET" PlatformMarketPlatformAlphaArcade PlatformMarketPlatform = "ALPHA-ARCADE" PlatformMarketPlatformProphetx PlatformMarketPlatform = "PROPHETX" )
func NewPlatformMarketPlatformFromString ¶
func NewPlatformMarketPlatformFromString(s string) (PlatformMarketPlatform, error)
func (PlatformMarketPlatform) Ptr ¶
func (p PlatformMarketPlatform) Ptr() *PlatformMarketPlatform
type PlayerPropRuleComparison ¶ added in v0.16.0
type PlayerPropRuleComparison struct {
Rule PlayerPropRuleComparisonRule `json:"rule" url:"rule"`
// Human-readable name of the rule dimension.
Label string `json:"label" url:"label"`
// Known differences take precedence over unknown source values.
Comparison PlayerPropRuleComparisonComparison `json:"comparison" url:"comparison"`
SourceValues []*PlayerPropRuleSourceValue `json:"source_values" url:"source_values"`
// contains filtered or unexported fields
}
func (*PlayerPropRuleComparison) GetComparison ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) GetComparison() PlayerPropRuleComparisonComparison
func (*PlayerPropRuleComparison) GetExtraProperties ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) GetExtraProperties() map[string]interface{}
func (*PlayerPropRuleComparison) GetLabel ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) GetLabel() string
func (*PlayerPropRuleComparison) GetRule ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) GetRule() PlayerPropRuleComparisonRule
func (*PlayerPropRuleComparison) GetSourceValues ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) GetSourceValues() []*PlayerPropRuleSourceValue
func (*PlayerPropRuleComparison) MarshalJSON ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) MarshalJSON() ([]byte, error)
func (*PlayerPropRuleComparison) SetComparison ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) SetComparison(comparison PlayerPropRuleComparisonComparison)
SetComparison sets the Comparison field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlayerPropRuleComparison) SetLabel ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) SetLabel(label string)
SetLabel sets the Label field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlayerPropRuleComparison) SetRule ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) SetRule(rule PlayerPropRuleComparisonRule)
SetRule sets the Rule field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlayerPropRuleComparison) SetSourceValues ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) SetSourceValues(sourceValues []*PlayerPropRuleSourceValue)
SetSourceValues sets the SourceValues field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlayerPropRuleComparison) String ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) String() string
func (*PlayerPropRuleComparison) UnmarshalJSON ¶ added in v0.16.0
func (p *PlayerPropRuleComparison) UnmarshalJSON(data []byte) error
type PlayerPropRuleComparisonComparison ¶ added in v0.16.0
type PlayerPropRuleComparisonComparison string
Known differences take precedence over unknown source values.
const ( PlayerPropRuleComparisonComparisonEquivalent PlayerPropRuleComparisonComparison = "equivalent" PlayerPropRuleComparisonComparisonDifferent PlayerPropRuleComparisonComparison = "different" PlayerPropRuleComparisonComparisonUnverified PlayerPropRuleComparisonComparison = "unverified" )
func NewPlayerPropRuleComparisonComparisonFromString ¶ added in v0.16.0
func NewPlayerPropRuleComparisonComparisonFromString(s string) (PlayerPropRuleComparisonComparison, error)
func (PlayerPropRuleComparisonComparison) Ptr ¶ added in v0.16.0
func (p PlayerPropRuleComparisonComparison) Ptr() *PlayerPropRuleComparisonComparison
type PlayerPropRuleComparisonRule ¶ added in v0.16.0
type PlayerPropRuleComparisonRule string
const ( PlayerPropRuleComparisonRuleNonParticipation PlayerPropRuleComparisonRule = "non_participation" PlayerPropRuleComparisonRuleOvertime PlayerPropRuleComparisonRule = "overtime" PlayerPropRuleComparisonRuleStatDefinition PlayerPropRuleComparisonRule = "stat_definition" PlayerPropRuleComparisonRuleThreshold PlayerPropRuleComparisonRule = "threshold" PlayerPropRuleComparisonRuleStatCorrections PlayerPropRuleComparisonRule = "stat_corrections" PlayerPropRuleComparisonRulePostponement PlayerPropRuleComparisonRule = "postponement" PlayerPropRuleComparisonRuleCancellation PlayerPropRuleComparisonRule = "cancellation" PlayerPropRuleComparisonRuleInterruption PlayerPropRuleComparisonRule = "interruption" PlayerPropRuleComparisonRuleResolutionSource PlayerPropRuleComparisonRule = "resolution_source" )
func NewPlayerPropRuleComparisonRuleFromString ¶ added in v0.16.0
func NewPlayerPropRuleComparisonRuleFromString(s string) (PlayerPropRuleComparisonRule, error)
func (PlayerPropRuleComparisonRule) Ptr ¶ added in v0.16.0
func (p PlayerPropRuleComparisonRule) Ptr() *PlayerPropRuleComparisonRule
type PlayerPropRuleSourceValue ¶ added in v0.16.0
type PlayerPropRuleSourceValue struct {
// Lowercase provider slug matching a source_markets entry.
Provider string `json:"provider" url:"provider"`
// Exact native market ID matching a source_markets entry.
MarketID string `json:"market_id" url:"market_id"`
// Machine-readable observed rule value, or `unknown`. Values are extensible; clients must tolerate unfamiliar values and read description. Never interpret unknown as no restriction.
Value string `json:"value" url:"value"`
// Plain-language meaning, including relevant qualifications.
Description string `json:"description" url:"description"`
// Source contract containing the observed clause; omitted for unknown rules.
EvidenceURL *string `json:"evidence_url,omitempty" url:"evidence_url,omitempty"`
// contains filtered or unexported fields
}
func (*PlayerPropRuleSourceValue) GetDescription ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) GetDescription() string
func (*PlayerPropRuleSourceValue) GetEvidenceURL ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) GetEvidenceURL() *string
func (*PlayerPropRuleSourceValue) GetExtraProperties ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) GetExtraProperties() map[string]interface{}
func (*PlayerPropRuleSourceValue) GetMarketID ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) GetMarketID() string
func (*PlayerPropRuleSourceValue) GetProvider ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) GetProvider() string
func (*PlayerPropRuleSourceValue) GetValue ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) GetValue() string
func (*PlayerPropRuleSourceValue) MarshalJSON ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) MarshalJSON() ([]byte, error)
func (*PlayerPropRuleSourceValue) SetDescription ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) SetDescription(description string)
SetDescription sets the Description field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlayerPropRuleSourceValue) SetEvidenceURL ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) SetEvidenceURL(evidenceURL *string)
SetEvidenceURL sets the EvidenceURL field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlayerPropRuleSourceValue) SetMarketID ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) SetMarketID(marketID string)
SetMarketID sets the MarketID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlayerPropRuleSourceValue) SetProvider ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) SetProvider(provider string)
SetProvider sets the Provider field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlayerPropRuleSourceValue) SetValue ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) SetValue(value string)
SetValue sets the Value field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PlayerPropRuleSourceValue) String ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) String() string
func (*PlayerPropRuleSourceValue) UnmarshalJSON ¶ added in v0.16.0
func (p *PlayerPropRuleSourceValue) UnmarshalJSON(data []byte) error
type PolymarketPosition ¶ added in v0.5.0
type PolymarketPosition struct {
// Polymarket condition ID (`0x`-prefixed hex).
ConditionID string `json:"condition_id" url:"condition_id"`
// Outcome label held in this position (`Yes`/`No` for binary markets).
Outcome string `json:"outcome" url:"outcome"`
Shares float64 `json:"shares" url:"shares"`
// contains filtered or unexported fields
}
func (*PolymarketPosition) GetConditionID ¶ added in v0.5.0
func (p *PolymarketPosition) GetConditionID() string
func (*PolymarketPosition) GetExtraProperties ¶ added in v0.5.0
func (p *PolymarketPosition) GetExtraProperties() map[string]interface{}
func (*PolymarketPosition) GetOutcome ¶ added in v0.5.0
func (p *PolymarketPosition) GetOutcome() string
func (*PolymarketPosition) GetShares ¶ added in v0.5.0
func (p *PolymarketPosition) GetShares() float64
func (*PolymarketPosition) MarshalJSON ¶ added in v0.5.0
func (p *PolymarketPosition) MarshalJSON() ([]byte, error)
func (*PolymarketPosition) SetConditionID ¶ added in v0.5.0
func (p *PolymarketPosition) SetConditionID(conditionID string)
SetConditionID sets the ConditionID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PolymarketPosition) SetOutcome ¶ added in v0.5.0
func (p *PolymarketPosition) SetOutcome(outcome string)
SetOutcome sets the Outcome field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PolymarketPosition) SetShares ¶ added in v0.5.0
func (p *PolymarketPosition) SetShares(shares float64)
SetShares sets the Shares field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PolymarketPosition) String ¶ added in v0.5.0
func (p *PolymarketPosition) String() string
func (*PolymarketPosition) UnmarshalJSON ¶ added in v0.5.0
func (p *PolymarketPosition) UnmarshalJSON(data []byte) error
type PolymarketPositionsResponse ¶ added in v0.5.0
type PolymarketPositionsResponse struct {
// Resolved Polymarket proxy wallet (lowercased).
Address string `json:"address" url:"address"`
Data []*PolymarketPosition `json:"data" url:"data"`
Pagination *PaginationBlock `json:"pagination" url:"pagination"`
// contains filtered or unexported fields
}
func (*PolymarketPositionsResponse) GetAddress ¶ added in v0.5.0
func (p *PolymarketPositionsResponse) GetAddress() string
func (*PolymarketPositionsResponse) GetData ¶ added in v0.5.0
func (p *PolymarketPositionsResponse) GetData() []*PolymarketPosition
func (*PolymarketPositionsResponse) GetExtraProperties ¶ added in v0.5.0
func (p *PolymarketPositionsResponse) GetExtraProperties() map[string]interface{}
func (*PolymarketPositionsResponse) GetPagination ¶ added in v0.5.0
func (p *PolymarketPositionsResponse) GetPagination() *PaginationBlock
func (*PolymarketPositionsResponse) MarshalJSON ¶ added in v0.5.0
func (p *PolymarketPositionsResponse) MarshalJSON() ([]byte, error)
func (*PolymarketPositionsResponse) SetAddress ¶ added in v0.5.0
func (p *PolymarketPositionsResponse) SetAddress(address string)
SetAddress sets the Address field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PolymarketPositionsResponse) SetData ¶ added in v0.5.0
func (p *PolymarketPositionsResponse) SetData(data []*PolymarketPosition)
SetData sets the Data field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PolymarketPositionsResponse) SetPagination ¶ added in v0.5.0
func (p *PolymarketPositionsResponse) SetPagination(pagination *PaginationBlock)
SetPagination sets the Pagination field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PolymarketPositionsResponse) String ¶ added in v0.5.0
func (p *PolymarketPositionsResponse) String() string
func (*PolymarketPositionsResponse) UnmarshalJSON ¶ added in v0.5.0
func (p *PolymarketPositionsResponse) UnmarshalJSON(data []byte) error
type PolymarketWalletResponse ¶ added in v0.4.0
type PolymarketWalletResponse struct {
// Polymarket proxy address (lowercased) the profile is keyed on. When the input was a signer EOA, this is the resolved proxy.
Address string `json:"address" url:"address"`
// Original signer EOA from the request, when the input was an EOA that resolved to a different proxy. `null` when the input was already a proxy address (no resolution needed) or when no populated profile could be found for the resolved proxy.
Signer *string `json:"signer,omitempty" url:"signer,omitempty"`
// URL of the wallet's profile image, or `null` if unset.
ProfileImage *string `json:"profile_image,omitempty" url:"profile_image,omitempty"`
// User-chosen display name when set; otherwise the auto-generated pseudonym Polymarket assigns. `null` only when both are missing.
DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"`
// contains filtered or unexported fields
}
func (*PolymarketWalletResponse) GetAddress ¶ added in v0.4.0
func (p *PolymarketWalletResponse) GetAddress() string
func (*PolymarketWalletResponse) GetDisplayName ¶ added in v0.4.0
func (p *PolymarketWalletResponse) GetDisplayName() *string
func (*PolymarketWalletResponse) GetExtraProperties ¶ added in v0.4.0
func (p *PolymarketWalletResponse) GetExtraProperties() map[string]interface{}
func (*PolymarketWalletResponse) GetProfileImage ¶ added in v0.4.0
func (p *PolymarketWalletResponse) GetProfileImage() *string
func (*PolymarketWalletResponse) GetSigner ¶ added in v0.4.0
func (p *PolymarketWalletResponse) GetSigner() *string
func (*PolymarketWalletResponse) MarshalJSON ¶ added in v0.4.0
func (p *PolymarketWalletResponse) MarshalJSON() ([]byte, error)
func (*PolymarketWalletResponse) SetAddress ¶ added in v0.4.0
func (p *PolymarketWalletResponse) SetAddress(address string)
SetAddress sets the Address field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PolymarketWalletResponse) SetDisplayName ¶ added in v0.4.0
func (p *PolymarketWalletResponse) SetDisplayName(displayName *string)
SetDisplayName sets the DisplayName field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PolymarketWalletResponse) SetProfileImage ¶ added in v0.4.0
func (p *PolymarketWalletResponse) SetProfileImage(profileImage *string)
SetProfileImage sets the ProfileImage field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PolymarketWalletResponse) SetSigner ¶ added in v0.4.0
func (p *PolymarketWalletResponse) SetSigner(signer *string)
SetSigner sets the Signer field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*PolymarketWalletResponse) String ¶ added in v0.4.0
func (p *PolymarketWalletResponse) String() string
func (*PolymarketWalletResponse) UnmarshalJSON ¶ added in v0.4.0
func (p *PolymarketWalletResponse) UnmarshalJSON(data []byte) error
type ServiceUnavailableError ¶
type ServiceUnavailableError struct {
}
Public plan catalog is not configured
func (*ServiceUnavailableError) MarshalJSON ¶
func (s *ServiceUnavailableError) MarshalJSON() ([]byte, error)
func (*ServiceUnavailableError) UnmarshalJSON ¶
func (s *ServiceUnavailableError) UnmarshalJSON(data []byte) error
func (*ServiceUnavailableError) Unwrap ¶
func (s *ServiceUnavailableError) Unwrap() error
type SportsMatchingResponse ¶
type SportsMatchingResponse struct {
// Key-value pairs where each key is the queried identifier (Kalshi event ticker, Polymarket slug, or canonical event ID when no filter is provided) and each value is an array of platform market objects.
Markets map[string][]*PlatformMarket `json:"markets" url:"markets"`
// Opt-in canonical identity map, present only when `include_submarkets=true`. Keys match the `markets` response keys; each value contains the canonical event ID and every normalized submarket/source mapping for that event.
CanonicalEvents map[string]*CanonicalSportsEvent `json:"canonical_events,omitempty" url:"canonical_events,omitempty"`
// Pagination metadata for the current page. Present in list mode (no platform-ID filter). Absent in lookup mode since the response is bounded by the filter.
Pagination *PaginationBlock `json:"pagination,omitempty" url:"pagination,omitempty"`
// contains filtered or unexported fields
}
func (*SportsMatchingResponse) GetCanonicalEvents ¶ added in v0.10.0
func (s *SportsMatchingResponse) GetCanonicalEvents() map[string]*CanonicalSportsEvent
func (*SportsMatchingResponse) GetExtraProperties ¶
func (s *SportsMatchingResponse) GetExtraProperties() map[string]interface{}
func (*SportsMatchingResponse) GetMarkets ¶
func (s *SportsMatchingResponse) GetMarkets() map[string][]*PlatformMarket
func (*SportsMatchingResponse) GetPagination ¶ added in v0.3.0
func (s *SportsMatchingResponse) GetPagination() *PaginationBlock
func (*SportsMatchingResponse) MarshalJSON ¶
func (s *SportsMatchingResponse) MarshalJSON() ([]byte, error)
func (*SportsMatchingResponse) SetCanonicalEvents ¶ added in v0.10.0
func (s *SportsMatchingResponse) SetCanonicalEvents(canonicalEvents map[string]*CanonicalSportsEvent)
SetCanonicalEvents sets the CanonicalEvents field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*SportsMatchingResponse) SetMarkets ¶
func (s *SportsMatchingResponse) SetMarkets(markets map[string][]*PlatformMarket)
SetMarkets sets the Markets field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*SportsMatchingResponse) SetPagination ¶ added in v0.3.0
func (s *SportsMatchingResponse) SetPagination(pagination *PaginationBlock)
SetPagination sets the Pagination field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*SportsMatchingResponse) String ¶
func (s *SportsMatchingResponse) String() string
func (*SportsMatchingResponse) UnmarshalJSON ¶
func (s *SportsMatchingResponse) UnmarshalJSON(data []byte) error
type TooManyRequestsError ¶
type TooManyRequestsError struct {
*core.APIError
Body *ErrorResponse
}
API key exceeded its rate limit
func (*TooManyRequestsError) MarshalJSON ¶
func (t *TooManyRequestsError) MarshalJSON() ([]byte, error)
func (*TooManyRequestsError) UnmarshalJSON ¶
func (t *TooManyRequestsError) UnmarshalJSON(data []byte) error
func (*TooManyRequestsError) Unwrap ¶
func (t *TooManyRequestsError) Unwrap() error
type UnauthorizedError ¶
type UnauthorizedError struct {
}
Missing or invalid API key
func (*UnauthorizedError) MarshalJSON ¶
func (u *UnauthorizedError) MarshalJSON() ([]byte, error)
func (*UnauthorizedError) UnmarshalJSON ¶
func (u *UnauthorizedError) UnmarshalJSON(data []byte) error
func (*UnauthorizedError) Unwrap ¶
func (u *UnauthorizedError) Unwrap() error
type UnifiedMarket ¶ added in v0.3.0
type UnifiedMarket struct {
// Composite market identifier in the format `{provider}:{provider_id}` (e.g. `kalshi:AMAZONFTC-29DEC31`).
ID string `json:"id" url:"id"`
// Prediction market provider.
Provider UnifiedMarketProvider `json:"provider" url:"provider"`
// Human-readable market title/question.
Title string `json:"title" url:"title"`
Category MarketCategory `json:"category" url:"category"`
// contains filtered or unexported fields
}
func (*UnifiedMarket) GetCategory ¶ added in v0.9.0
func (u *UnifiedMarket) GetCategory() MarketCategory
func (*UnifiedMarket) GetExtraProperties ¶ added in v0.3.0
func (u *UnifiedMarket) GetExtraProperties() map[string]interface{}
func (*UnifiedMarket) GetID ¶ added in v0.3.0
func (u *UnifiedMarket) GetID() string
func (*UnifiedMarket) GetProvider ¶ added in v0.3.0
func (u *UnifiedMarket) GetProvider() UnifiedMarketProvider
func (*UnifiedMarket) GetTitle ¶ added in v0.3.0
func (u *UnifiedMarket) GetTitle() string
func (*UnifiedMarket) MarshalJSON ¶ added in v0.3.0
func (u *UnifiedMarket) MarshalJSON() ([]byte, error)
func (*UnifiedMarket) SetCategory ¶ added in v0.9.0
func (u *UnifiedMarket) SetCategory(category MarketCategory)
SetCategory sets the Category field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*UnifiedMarket) SetID ¶ added in v0.3.0
func (u *UnifiedMarket) SetID(id string)
SetID sets the ID field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*UnifiedMarket) SetProvider ¶ added in v0.3.0
func (u *UnifiedMarket) SetProvider(provider UnifiedMarketProvider)
SetProvider sets the Provider field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*UnifiedMarket) SetTitle ¶ added in v0.3.0
func (u *UnifiedMarket) SetTitle(title string)
SetTitle sets the Title field and marks it as non-optional; this prevents an empty or null value for this field from being omitted during serialization.
func (*UnifiedMarket) String ¶ added in v0.3.0
func (u *UnifiedMarket) String() string
func (*UnifiedMarket) UnmarshalJSON ¶ added in v0.3.0
func (u *UnifiedMarket) UnmarshalJSON(data []byte) error
type UnifiedMarketProvider ¶ added in v0.3.0
type UnifiedMarketProvider string
Prediction market provider.
const ( UnifiedMarketProviderKalshi UnifiedMarketProvider = "kalshi" UnifiedMarketProviderPolymarket UnifiedMarketProvider = "polymarket" UnifiedMarketProviderPredict UnifiedMarketProvider = "predict" UnifiedMarketProviderSxbet UnifiedMarketProvider = "sxbet" UnifiedMarketProviderHyperliquid UnifiedMarketProvider = "hyperliquid" UnifiedMarketProviderAlphaArcade UnifiedMarketProvider = "alpha-arcade" UnifiedMarketProviderProphetx UnifiedMarketProvider = "prophetx" UnifiedMarketProviderLimitless UnifiedMarketProvider = "limitless" )
func NewUnifiedMarketProviderFromString ¶ added in v0.3.0
func NewUnifiedMarketProviderFromString(s string) (UnifiedMarketProvider, error)
func (UnifiedMarketProvider) Ptr ¶ added in v0.3.0
func (u UnifiedMarketProvider) Ptr() *UnifiedMarketProvider