Versions in this module Expand all Collapse all v0 v0.4.0 Dec 2, 2026 Changes in this version + const RuleSpread + const RuleSpreadFirstHalf + const RuleSpreadQuarter1 + const RuleSpreadQuarter2 + const RuleSpreadQuarter3 + const RuleSpreadQuarter4 + const RuleSpreadSecondHalf + func IsSpreadRule(rule string) bool + func IsValidSpreadLine(line float64) bool + func SpreadRules() []string type MarketType + func (m MarketType) CanCreateOn(eventType string) bool type MarketTypeEventType + PartnerCreate *bool v0.3.1 Nov 18, 2026 v0.3.0 Nov 18, 2026 v0.2.1 Nov 18, 2026 Changes in this version + const FeatureOrdersFillOrKill + const FeatureOrdersPostOnly + const FillNormal + const FillOrKill + const PostOnly + var ErrBlocked = errors.New("stx: blocked") + var ErrFillModeNotAllowed = errors.New("stx: fill mode not allowed on this market") + var ErrPostOnlyWouldMatch = errors.New("stx: post-only order would match") + var ErrRestrictedJurisdiction = errors.New("stx: restricted jurisdiction") + var ErrUnusualNetwork = errors.New("stx: unusual network") type APIError + Reference string type Client + func (c *Client) SupportsFillMode(ctx context.Context, mode string, refresh bool) (bool, error) + type ForbiddenError struct + Error string + ErrorDescription string + TermsURL string type Market + MarketRulesPdfURL string + RulesVersion int64 type Order + FillMode string type OrderRequest + FillMode string type Position + Multiplier float64 + type PostOnlyWouldMatchError struct + Err error + Order *Order + Reason string + func (e *PostOnlyWouldMatchError) Error() string + func (e *PostOnlyWouldMatchError) Is(target error) bool + func (e *PostOnlyWouldMatchError) Unwrap() error + type PoweredBy struct + Link string + Provider string v0.1.0 Nov 12, 2026 Changes in this version + const Buy + const DefaultProfile + const FeatureCombos + const FeatureConnect + const FeatureEventPlayers + const FeatureLeaderboard + const FeatureMarketTypes + const FeatureMarketsCreate + const FeatureOAuth + const FeatureOAuthApp + const FeatureOAuthMember + const FeatureTermsSTXPage + const GoodTillStart + const GoodTillTime + const HeaderAccessKey + const HeaderAccessSignature + const HeaderAccessTimestamp + const Limit + const MarketCreated + const MarketExists + const MarketOrder + const MarketRejected + const MarketValid + const MaxMarketsPerRequest + const RejectEventNotOpen + const RejectInvalidLine + const RejectInvalidMarket + const RejectNotCreated + const RejectUnknownPlayer + const RejectUnsupportedRule + const RejectUnsupportedStat + const RulePlayerStatLine + const Sell + const Version + var DefaultRetryPolicy = RetryPolicy + var ErrAlreadySubscribed = errors.New("stx: already subscribed") + var ErrBadRequest = errors.New("stx: bad request") + var ErrChannelRefused = errors.New("stx: channel refused") + var ErrComboPriceMoved = errors.New("stx: combo price moved") + var ErrConfig = errors.New("stx: configuration error") + var ErrForbidden = errors.New("stx: forbidden") + var ErrIPNotAllowed = errors.New("stx: ip address not allowed") + var ErrInsufficientScope = errors.New("stx: insufficient scope") + var ErrInvalidToken = errors.New("stx: invalid token") + var ErrNotAvailable = errors.New("stx: not available") + var ErrNotFound = errors.New("stx: not found") + var ErrNotJoined = errors.New("stx: channel not joined") + var ErrRateLimited = errors.New("stx: rate limited") + var ErrRejected = errors.New("stx: rejected") + var ErrServer = errors.New("stx: server error") + var ErrStreamClosed = errors.New("stx: stream closed") + var ErrTermsRequired = errors.New("stx: terms not accepted") + var ErrTimeout = errors.New("stx: no reply in time") + var ErrTransport = errors.New("stx: transport error") + var ErrUnauthorized = errors.New("stx: unauthorized") + var NoRetry = RetryPolicy + var OntarioDemo = Environment + var OntarioProduction = Environment + var USDemo = Environment + func Bool(v bool) *bool + func Features() []string + func IsValidLine(line float64) bool + func KnownStats() map[string][]string + func LoadPrivateKey(value string) (ed25519.PrivateKey, error) + func ParsePrivateKeyPEM(data []byte) (ed25519.PrivateKey, error) + func SigningMessage(timestampMs int64, method, path string) string + type APIError struct + Body []byte + Code string + Message string + Method string + Path string + RequestID string + RequiredScopes []string + RetryAfter time.Duration + StatusCode int + TermsURL string + func (e *APIError) Error() string + func (e *APIError) Is(target error) bool + type APIKey struct + func NewAPIKey(id, privateKey string) (*APIKey, error) + func NewAPIKeyWithSigner(id string, signer crypto.Signer) (*APIKey, error) + func (k *APIKey) AuthHeaders(_ context.Context, method, path string) (http.Header, error) + func (k *APIKey) ID() string + func (k *APIKey) Kind() string + func (k *APIKey) Sign(message []byte) ([]byte, error) + func (k *APIKey) SignedHeaders(method, path string, at time.Time) (http.Header, error) + func (k *APIKey) WebSocketHeaders(_ context.Context, _ bool) (http.Header, error) + func (k APIKey) GoString() string + func (k APIKey) String() string + type AcceptTermsOptions struct + AcceptHouseRules *bool + AcceptPrivacy *bool + AcceptTerms *bool + type AccountChange struct + Data any + Event string + Kind AccountChangeKind + Snapshot bool + type AccountChangeKind string + const AccountBalance + const AccountFills + const AccountOrders + const AccountPayment + const AccountPositions + type AccountService struct + func (s *AccountService) AcceptTerms(ctx context.Context, deviceID string, opts *AcceptTermsOptions) (string, error) + func (s *AccountService) Balance(ctx context.Context) (*Balance, error) + func (s *AccountService) Me(ctx context.Context) (*Me, error) + func (s *AccountService) Positions(ctx context.Context, q *PositionsQuery) ([]Position, error) + func (s *AccountService) UpdateProfile(ctx context.Context, update ProfileUpdate) (*Me, error) + func (s *AccountService) UserID(ctx context.Context) (string, error) + type AccountState struct + Balance *Balance + Fills []Fill + OpenOrders []Order + Positions []Position + type AccountView struct + func (v *AccountView) Changes() <-chan AccountChange + func (v *AccountView) Close() error + func (v *AccountView) Done() <-chan struct{} + func (v *AccountView) Err() error + func (v *AccountView) MarshalJSON() ([]byte, error) + func (v *AccountView) Ready() bool + func (v *AccountView) Snapshot() AccountState + type AccountViewOptions struct + AccountID string + KeepFlatPositions bool + MarketIDs []string + MaxFills int + SnapshotTimeout time.Duration + type Auth interface + AuthHeaders func(ctx context.Context, method, path string) (http.Header, error) + Kind func() string + type Balance struct + AccountBalance Decimal + AccountID string + AvailableBalance Decimal + BaseFeePercent float64 + BuyOrderLiability Decimal + Escrow Decimal + FeeSchedule string + LoyaltyTier string + MakerFactor float64 + Points int64 + PositionPremiumLiability Decimal + SellOrderLiability Decimal + TakerFactor float64 + TotalAdjustments Decimal + TotalDeposits Decimal + TotalFees Decimal + TotalSettlementPnL Decimal + TotalTradeCount int64 + TotalTraded Decimal + TotalWithdrawals Decimal + UserID string + type BatchOrderResult struct + Errors []string + Order *Order + func (r BatchOrderResult) OK() bool + type BookLevel struct + Price Decimal + Quantity Decimal + type Cancellation struct + OrderID string + Status string + type Capabilities struct + APIVersion string + CheckedAt time.Time + Features map[string]*bool + Host string + ScopesSupported []string + func (c *Capabilities) Has(feature string) bool + func (c *Capabilities) Known(feature string) bool + func (c *Capabilities) Require(feature string) error + type Channel struct + func AccountChannel(marketIDs_ ...string) Channel + func BalancesChannel(accountID string) Channel + func EventsChannel(eventIDs ...string) Channel + func FillsChannel(marketIDs_ ...string) Channel + func MarketChannel(marketIDOrSymbol string) Channel + func MarketStatsChannel(r StatsRange, marketIDs ...string) Channel + func MarketUpdatesChannel(watch ...string) Channel + func MarketsChannel(f MarketsFilter) Channel + func OrderbookChannel(marketIDs ...string) Channel + func OrdersChannel(f OrdersFilter) Channel + func PositionsChannel(marketIDs_ ...string) Channel + func SettlementsChannel(marketIDs_ ...string) Channel + func TickerChannel(f TickerFilter) Channel + func TradesChannel(f TradesFilter) Channel + func UserInfoChannel() Channel + func (c Channel) Name() string + type ChannelError struct + Event string + Reason string + Reply json.RawMessage + Topic string + func (e *ChannelError) Error() string + func (e *ChannelError) Is(target error) bool + type Client struct + Account *AccountService + Combos *CombosService + Events *EventsService + Leaderboard *LeaderboardService + Markets *MarketsService + Orders *OrdersService + Portfolio *PortfolioService + func New(opts ...Option) (*Client, error) + func (c *Client) APIKey() *APIKey + func (c *Client) Auth() Auth + func (c *Client) BaseURL() string + func (c *Client) Capabilities(ctx context.Context, refresh bool) (*Capabilities, error) + func (c *Client) HTTPClient() *http.Client + func (c *Client) Host() string + func (c *Client) Logger() *slog.Logger + func (c *Client) Profile() string + func (c *Client) SocketURL() string + func (c *Client) Stream(ctx context.Context, opts ...StreamOption) (*Stream, error) + func (c *Client) UserAgent() string + type ComboBestQuote struct + Amount Decimal + ExpiresAt int64 + QuoteID string + type ComboBestQuoteEvent struct + MarketID string + RFQID string + type ComboCashOut struct + MarketID string + Quantity Decimal + RFQID string + type ComboEvent struct + Data any + Event string + Payload json.RawMessage + QuoteID string + RFQID string + type ComboLeg struct + MarketID string + Outcome ComboOutcome + type ComboMaker struct + func (m *ComboMaker) Close() error + func (m *ComboMaker) Done() <-chan struct{} + func (m *ComboMaker) Err() error + func (m *ComboMaker) Events() <-chan ComboEvent + func (m *ComboMaker) ExternalID() string + func (m *ComboMaker) History() []ComboEvent + func (m *ComboMaker) Quote(ctx context.Context, q ComboQuoteRequest) (ComboQuote, error) + func (m *ComboMaker) Topic() string + func (m *ComboMaker) WaitFor(ctx context.Context, w ComboWait) (ComboEvent, error) + func (m *ComboMaker) WithdrawQuote(ctx context.Context, rfqID, quoteID string) error + type ComboMakerPlacedEvent struct + ExternalID string + MarketID string + OrderID string + Price Decimal + Quantity Decimal + QuoteID string + RFQID string + type ComboOutcome string + const ComboLost + const ComboWon + type ComboPlacedEvent struct + RFQID string + type ComboPlacement struct + MarketID string + OrderID string + Price Decimal + Quantity Decimal + type ComboPlayer struct + func (p *ComboPlayer) Accept(ctx context.Context, rfqID, quoteID string, amount Decimal) (ComboPlacement, error) + func (p *ComboPlayer) Cancel(ctx context.Context, rfqID string) error + func (p *ComboPlayer) CashOut(ctx context.Context, marketID string) (ComboCashOut, error) + func (p *ComboPlayer) Close() error + func (p *ComboPlayer) Done() <-chan struct{} + func (p *ComboPlayer) Err() error + func (p *ComboPlayer) Events() <-chan ComboEvent + func (p *ComboPlayer) ExternalID() string + func (p *ComboPlayer) History() []ComboEvent + func (p *ComboPlayer) RequestQuote(ctx context.Context, legs []ComboLeg, amount Decimal) (ComboRequest, error) + func (p *ComboPlayer) Snapshot(ctx context.Context, rfqID string) (ComboSnapshot, error) + func (p *ComboPlayer) Topic() string + func (p *ComboPlayer) WaitFor(ctx context.Context, w ComboWait) (ComboEvent, error) + type ComboQuote struct + Amount Decimal + ExternalID string + QuoteID string + type ComboQuoteAcceptedEvent struct + ExternalID string + MarketID string + QuoteID string + RFQID string + type ComboQuoteClosedEvent struct + ExternalID string + MarketID string + QuoteID string + RFQID string + Reason string + type ComboQuoteRequest struct + Amount Decimal + ClientOrderID string + ExpiresIn time.Duration + RFQID string + type ComboRFQClosedEvent struct + MarketID string + RFQID string + Reason string + type ComboRFQLeg struct + MarketID string + Outcome ComboOutcome + ShortName string + type ComboRFQOpenedEvent struct + Amount Decimal + ExpiresAt int64 + ExternalID string + Legs []ComboRFQLeg + MarketID string + MaxPrice Decimal + Quantity Decimal + RFQID string + Side string + TickSize Decimal + type ComboRefusedError struct + Best *ComboBestQuote + Code string + Command string + Detail string + Reason string + Reply json.RawMessage + Topic string + func (e *ComboRefusedError) Error() string + func (e *ComboRefusedError) Is(target error) bool + type ComboRequest struct + RFQID string + type ComboRequestClosedEvent struct + MarketID string + RFQID string + Reason string + type ComboSnapshot struct + Amount Decimal + BestQuote ComboBestQuote + ExpiresAt int64 + MarketID string + Quantity Decimal + RFQID string + Side string + Status string + type ComboWait struct + Events []string + QuoteID string + RFQID string + type CombosService struct + func (s *CombosService) Available(ctx context.Context) (bool, error) + func (s *CombosService) Maker(ctx context.Context, opts ...StreamOption) (*ComboMaker, error) + func (s *CombosService) Player(ctx context.Context, opts ...StreamOption) (*ComboPlayer, error) + type CreateMarketResult struct + Index int + Market NewMarket + MarketID string + Reason string + Status string + type CreateMarketsOptions struct + DryRun bool + Validate bool + type Decimal string + func MustDecimal(s string) Decimal + func ParseDecimal(s string) (Decimal, error) + func (d *Decimal) UnmarshalJSON(data []byte) error + func (d Decimal) Cmp(other Decimal) int + func (d Decimal) Float64() float64 + func (d Decimal) IsZero() bool + func (d Decimal) MarshalJSON() ([]byte, error) + func (d Decimal) Rat() (r *big.Rat, ok bool) + func (d Decimal) String() string + func (d Decimal) Valid() bool + type Environment struct + Env string + Host string + Name string + RealMoney bool + Region string + func EnvironmentNamed(name string) (Environment, error) + func Environments() []Environment + type Event struct + Archived bool + Competition string + EventID string + EventType string + Participants []map[string]any + Promoted bool + ShortTitle string + Sport string + StartTime int64 + StartTimeISO time.Time + Status string + Symbol string + Title string + type EventPlayer struct + Jersey string + Name string + PlayerID string + Position string + type EventPlayers struct + EventID string + Stats []EventStat + Teams []EventTeam + type EventStat struct + Name string + Stat string + type EventTeam struct + Players []EventPlayer + Team string + type EventVolume struct + EventID string + Volume Decimal + type EventsQuery struct + Competitions []string + Cursor string + EventIDs []string + EventTypes []string + Limit int + Promoted *bool + SortBy string + SortDirection string + Sports []string + Status string + Title string + type EventsReply struct + Events []EventVolume + SelectedEventIDs []string + type EventsService struct + func (s *EventsService) All(ctx context.Context, q *EventsQuery) iter.Seq2[Event, error] + func (s *EventsService) List(ctx context.Context, q *EventsQuery) (*Page[Event], error) + func (s *EventsService) Players(ctx context.Context, eventID string) (*EventPlayers, error) + func (s *EventsService) StatsFor(ctx context.Context, eventID string) ([]EventStat, error) + type FeeTransaction struct + AccountID string + Amount Decimal + EventID string + FeeID string + ID string + InsertedAt int64 + MarketID string + PaymentID string + Points float64 + SettlementID string + Time time.Time + Type string + type Fill struct + AccountID string + Action string + AdminLog map[string]any + Amended bool + ClientOrderID string + ClosedContracts Decimal + ClosedFee Decimal + ClosedNetPnL Decimal + ClosedPnL Decimal + Closing Decimal + DeviceID string + ExpiredContracts Decimal + ExpiredFee Decimal + ExpiredNetPnL Decimal + ExpiredPnL Decimal + ExpiresAt int64 + Filled Decimal + GrossPnL Decimal + IPAddress string + InsertedAt int64 + LastModifiedAt int64 + LastModifiedByAdminID string + LiquidityAction string + MarketID string + OpenedAt int64 + OrderID string + OriginalFilled Decimal + OriginalPremium Decimal + OriginalPrice Decimal + OriginalRisk Decimal + OriginalToWin Decimal + PcPremium Decimal + PcRisk Decimal + PcToWin Decimal + PlacedPreStart bool + Points float64 + PreStart bool + Price Decimal + Remaining Decimal + RemainingPotentialFee Decimal + RemainingPremium Decimal + RemainingRisk Decimal + RemainingToWin Decimal + SettledAt time.Time + SettledContracts Decimal + SettlementsCount int64 + Status string + Time time.Time + TotalFee Decimal + TradeFee Decimal + TradeID string + TradedContracts Decimal + UnroundedTradeFee Decimal + UpdatedAt int64 + VirtualRemaining Decimal + type FillsQuery struct + Cursor string + Limit int + MarketIDs []string + OrderIDs []string + Status string + type FillsSnapshot struct + Trades []Fill + func (s *FillsSnapshot) UnmarshalJSON(data []byte) error + type HandshakeError struct + Reason string + StatusCode int + func (e *HandshakeError) Error() string + func (e *HandshakeError) Is(target error) bool + type Leaderboard struct + Category string + Leaderboard []LeaderboardEntry + Metric string + NextResetAt time.Time + Period string + RefreshedAt time.Time + Shown bool + type LeaderboardEntry struct + AvatarURL string + Handle string + Rank int64 + TopSport string + TopSportIconURL string + Value Decimal + type LeaderboardQuery struct + Category string + Limit int + Metric string + Period string + type LeaderboardRank struct + Rank int64 + Value Decimal + type LeaderboardService struct + func (s *LeaderboardService) Get(ctx context.Context, q *LeaderboardQuery) (*Leaderboard, error) + func (s *LeaderboardService) Me(ctx context.Context, q *LeaderboardQuery) (*LeaderboardStanding, error) + type LeaderboardStanding struct + BiggestWin *LeaderboardRank + Category string + Markets *LeaderboardRank + OptedIn bool + Period string + Predictions *LeaderboardRank + Profit *LeaderboardRank + Return *LeaderboardRank + SettledMarkets int64 + Streak *LeaderboardRank + Volume *LeaderboardRank + WinRate float64 + WinRateRank *LeaderboardRank + type Market struct + Archived bool + Bids []BookLevel + Competition string + Description string + EventID string + EventShortTitle string + EventStart time.Time + EventStatus string + EventTitle string + EventType string + Featured bool + FeaturedHome bool + Filters []MarketFilter + GroupTitle string + GroupingID string + GroupingName string + HomeCategory string + InPlayDelaySec int64 + Keywords []string + LastProbabilityAt int64 + LastTradedPrice Decimal + ManualProbability bool + MarketID string + MaxPrice Decimal + Offers []BookLevel + OpenInterest Decimal + Participants []map[string]any + PointsCost int64 + Position string + PoweredBy map[string]any + Price Decimal + PriceChange24h int64 + Probability float64 + Question string + RecentTrades []RecentTrade + Result string + Rules string + SettledAt int64 + ShortTitle string + Specifier string + Sport string + StatDetail *StatDetail + Status string + Symbol string + Timestamp time.Time + TimestampInt int64 + Title string + TotalVolume Decimal + Trading bool + TradingFilters []MarketFilter + Volume24h Decimal + type MarketBook struct + Bids []MarketBookLevel + Offers []MarketBookLevel + type MarketBookLevel struct + Liquidity Decimal + Price Decimal + Quantity Decimal + TotalLiquidity Decimal + TotalQuantity Decimal + type MarketChange struct + Bids []BookLevel + Book *MarketBook + DetailedEventBrief string + EventBrief string + EventID string + EventStart int64 + EventStatus string + Fields map[string]json.RawMessage + LastTradedPrice Decimal + MarketID string + MaxPrice Decimal + Offers []BookLevel + OpenInterest Decimal + Price Decimal + Probability *float64 + Result string + Rules string + SettledAt string + ShortTitle string + Status string + Symbol string + Timestamp string + Title string + TotalVolume Decimal + Trading *bool + UnixTimestamp int64 + Volume24h Decimal + func (m *MarketChange) Has(field string) bool + func (m *MarketChange) UnmarshalJSON(data []byte) error + type MarketChanges map[string]*MarketChange + type MarketFilter struct + Category string + Grouping string + Manual bool + Section string + Subcategory string + Subgrouping string + type MarketSeries struct + MarketID string + Points []PricePoint + type MarketStat struct + AccountID string + ArchivedAt int64 + AvailablePosition Decimal + AverageOpenPremium Decimal + BuyContractsClosed Decimal + BuyContractsExpired Decimal + BuyContractsSettled Decimal + BuyContractsTraded Decimal + BuyOrderLiability Decimal + BuyOrders int64 + BuyOriginalRisk Decimal + BuySettlements int64 + BuyTradeCount int64 + CancelledBuyContracts Decimal + CancelledBuyOrders int64 + CancelledContracts Decimal + CancelledOrders int64 + CancelledSellContracts Decimal + CancelledSellOrders int64 + ClosedBuyPremium Decimal + ClosedFees Decimal + ClosedGrossPnL Decimal + ClosedNetPnL Decimal + ClosedPremium Decimal + ClosedSellPremium Decimal + Competition string + ContractsClosed Decimal + ContractsExpired Decimal + ContractsInBuyOrders Decimal + ContractsInOrders Decimal + ContractsInSellOrders Decimal + ContractsSettled Decimal + ContractsTraded Decimal + EventID string + EventStartTime int64 + ExpiredBuyPremium Decimal + ExpiredFees Decimal + ExpiredGrossPnL Decimal + ExpiredNetPnL Decimal + ExpiredPremium Decimal + ExpiredSellPremium Decimal + FeePlugin string + InsertedAt int64 + LastSettledAt int64 + MarketID string + MarketMaxPrice Decimal + MaxLiabilityLoss Decimal + MaxLiabilityWin Decimal + MaxPotentialFee Decimal + MaxPotentialProfit Decimal + MaxRisk Decimal + NeedsRebuild bool + OpenOrderCount int64 + OpenPotentialFee Decimal + OpenPotentialProfit Decimal + OpenPremium Decimal + OpenRisk Decimal + OpenTradeCount int64 + OrderLiability Decimal + Orders int64 + OriginalRisk Decimal + PendingCloseFee Decimal + PendingClosePnL Decimal + Position Decimal + PositionAccountabilityAlertID string + PositionPremiumLiability Decimal + PotentialOrderTradeFee Decimal + RejectedBuyOrders int64 + RejectedOrders int64 + RejectedSellOrders int64 + SellContractsClosed Decimal + SellContractsExpired Decimal + SellContractsSettled Decimal + SellContractsTraded Decimal + SellOrderLiability Decimal + SellOrders int64 + SellOriginalRisk Decimal + SellSettlements int64 + SellTradeCount int64 + SettledAt int64 + Settlements int64 + Sport string + Status string + Title string + TotalFees Decimal + TotalLiability Decimal + TotalNetPnL Decimal + TotalSettlementPnL Decimal + TradeCount int64 + UpdatedAt int64 + type MarketStatsQuery struct + Competitions []string + Cursor string + EventIDs []string + ExcludeZeroSettlements *bool + FromTime int64 + Limit int + MarketIDs []string + Sports []string + ToTime int64 + type MarketStatsReply struct + Markets []MarketSeries + Range StatsRange + SelectedMarketIDs []string + type MarketType struct + EventTypeNames []string + EventTypes map[string]MarketTypeEventType + Fields map[string]MarketTypeField + PartnerCreate bool + func (m *MarketType) UnmarshalJSON(data []byte) error + type MarketTypeEventType struct + Sport string + Stats []EventStat + type MarketTypeField struct + Description string + Type string + type MarketTypes map[string]MarketType + type MarketsFilter struct + MessageTypes []string + RuleFilters []string + type MarketsQuery struct + Competitions []string + Cursor string + EventIDs []string + Limit int + MarketIDs []string + SortBy string + SortDirection string + Sports []string + Status []string + Trading *bool + type MarketsService struct + func (s *MarketsService) All(ctx context.Context, q *MarketsQuery) iter.Seq2[Market, error] + func (s *MarketsService) Create(ctx context.Context, eventID string, markets []NewMarket, ...) ([]CreateMarketResult, error) + func (s *MarketsService) Get(ctx context.Context, marketID string) (*Market, error) + func (s *MarketsService) List(ctx context.Context, q *MarketsQuery) (*Page[Market], error) + func (s *MarketsService) Types(ctx context.Context) (MarketTypes, error) + type Me struct + AccountID string + AvatarURL string + FirstName string + Handle string + HandleChangeableAt time.Time + KeyID string + LastName string + LeaderboardOptIn bool + Method string + Scope string + UserID string + type Message struct + Data any + Event string + Payload json.RawMessage + Snapshot bool + Topic string + func (m Message) Channel() string + func (m Message) Decode(v any) error + type NewMarket struct + Line float64 + PlayerID string + Rule string + Stat string + type NotAvailableError struct + Err error + Feature string + Host string + func (e *NotAvailableError) Error() string + func (e *NotAvailableError) Is(target error) bool + func (e *NotAvailableError) Unwrap() error + type Option func(*options) error + func WithAuth(a Auth) Option + func WithCredentialsFile(path string) Option + func WithEnvironment(e Environment) Option + func WithEnvironmentName(name string) Option + func WithHTTPClient(hc *http.Client) Option + func WithHost(host string) Option + func WithInsecureSkipVerify() Option + func WithKey(id, privateKey string) Option + func WithLogger(l *slog.Logger) Option + func WithProfile(name string) Option + func WithRegion(region, env string) Option + func WithResponseHook(fn func(ResponseEvent)) Option + func WithRetry(p RetryPolicy) Option + func WithSigner(id string, signer crypto.Signer) Option + func WithTimeout(d time.Duration) Option + func WithUserAgent(product string) Option + type Order struct + AcceptedAt int64 + Action string + Amount Decimal + AvgPrice Decimal + CancellationReason string + ClientOrderID string + DelayedUntil int64 + DeviceID string + Expiration string + ExpirationTime int64 + ExpiresAt int64 + Filled Decimal + FilledAmount Decimal + FilledPercentage int64 + FixOrder bool + ID string + IPAddress string + InsertedAt int64 + MarketID string + OddsType string + OddsValue string + OrderType string + PlacedPreStart bool + Price Decimal + Quantity Decimal + RejectionReason string + Status string + Time time.Time + TotalValue Decimal + type OrderNumbers struct + Fee Decimal + FillLevels []OrderSlipFill + FillQty Decimal + MarketID string + Ref string + Risk Decimal + RiskWithFee Decimal + SelfMatch bool + UnfilledQty Decimal + type OrderNumbersBatch struct + Updates []OrderNumbers + type OrderRequest struct + Action string + CancelOnDisconnect *bool + ClientOrderID string + DeviceID string + Expiration string + ExpirationTime int64 + MarketID string + OrderType string + Price Decimal + Quantity Decimal + type OrderSlip struct + func (o *OrderSlip) Add(ctx context.Context, e OrderSlipEntry) (OrderSlipRef, error) + func (o *OrderSlip) Close() error + func (o *OrderSlip) Done() <-chan struct{} + func (o *OrderSlip) Err() error + func (o *OrderSlip) Messages() <-chan Message + func (o *OrderSlip) Remove(ctx context.Context, ref string) error + func (o *OrderSlip) Topic() string + type OrderSlipEntry struct + LimitPrice Decimal + MarketID string + MaxPrice Decimal + Quantity Decimal + Side string + type OrderSlipFill struct + Fee Decimal + Price Decimal + Quantity Decimal + type OrderSlipRef struct + Ref string + SelfMatch bool + type OrderbookLevel struct + Liquidity Decimal + Price Decimal + Quantity Decimal + TotalLiquidity Decimal + TotalQuantity Decimal + type OrderbookUpdate struct + Bids []OrderbookLevel + MarketID string + Offers []OrderbookLevel + Timestamp string + TimestampUS int64 + type OrdersFilter struct + CancelOnDisconnect bool + MarketIDs []string + PingTimeout time.Duration + type OrdersQuery struct + ClientOrderIDs []string + Cursor string + Limit int + MarketIDs []string + OrderIDs []string + Status []string + type OrdersService struct + func (s *OrdersService) All(ctx context.Context, q *OrdersQuery) iter.Seq2[Order, error] + func (s *OrdersService) Cancel(ctx context.Context, orderID string) (*Cancellation, error) + func (s *OrdersService) CancelAll(ctx context.Context) ([]Cancellation, error) + func (s *OrdersService) CancelBatch(ctx context.Context, orderIDs []string) ([]Cancellation, error) + func (s *OrdersService) Get(ctx context.Context, orderID string) (*Order, error) + func (s *OrdersService) List(ctx context.Context, q *OrdersQuery) (*Page[Order], error) + func (s *OrdersService) Place(ctx context.Context, order OrderRequest) (*Order, error) + func (s *OrdersService) PlaceBatch(ctx context.Context, orders []OrderRequest) ([]BatchOrderResult, error) + type OrdersSnapshot struct + Orders []Order + type Page struct + Cursor string + Items []T + func (p *Page[T]) HasMore() bool + type PageQuery struct + Cursor string + Limit int + type PaymentTransaction struct + AccountID string + Amount Decimal + EventID string + FeeID string + ID string + InsertedAt int64 + MarketID string + Method string + PaymentID string + Points float64 + Reason string + SettlementID string + SubMethod string + Time time.Time + Type string + type PaymentUpdate struct + AccountID string + Amount Decimal + Data json.RawMessage + ID string + Provider string + ProviderID string + Status string + Type string + type PortfolioService struct + func (s *PortfolioService) Adjustments(ctx context.Context, q *PageQuery) (*Page[PaymentTransaction], error) + func (s *PortfolioService) AllAdjustments(ctx context.Context, q *PageQuery) iter.Seq2[PaymentTransaction, error] + func (s *PortfolioService) AllDeposits(ctx context.Context, q *PageQuery) iter.Seq2[PaymentTransaction, error] + func (s *PortfolioService) AllFees(ctx context.Context, q *PageQuery) iter.Seq2[FeeTransaction, error] + func (s *PortfolioService) AllFills(ctx context.Context, q *FillsQuery) iter.Seq2[Fill, error] + func (s *PortfolioService) AllLoyalty(ctx context.Context, q *PageQuery) iter.Seq2[Transaction, error] + func (s *PortfolioService) AllMarketStats(ctx context.Context, q *MarketStatsQuery) iter.Seq2[MarketStat, error] + func (s *PortfolioService) AllSettlements(ctx context.Context, q *SettlementsQuery) iter.Seq2[Settlement, error] + func (s *PortfolioService) AllWithdrawals(ctx context.Context, q *PageQuery) iter.Seq2[PaymentTransaction, error] + func (s *PortfolioService) Deposits(ctx context.Context, q *PageQuery) (*Page[PaymentTransaction], error) + func (s *PortfolioService) Fees(ctx context.Context, q *PageQuery) (*Page[FeeTransaction], error) + func (s *PortfolioService) Fills(ctx context.Context, q *FillsQuery) (*Page[Fill], error) + func (s *PortfolioService) Loyalty(ctx context.Context, q *PageQuery) (*Page[Transaction], error) + func (s *PortfolioService) MarketStats(ctx context.Context, q *MarketStatsQuery) (*Page[MarketStat], error) + func (s *PortfolioService) Settlements(ctx context.Context, q *SettlementsQuery) (*Page[Settlement], error) + func (s *PortfolioService) Withdrawals(ctx context.Context, q *PageQuery) (*Page[PaymentTransaction], error) + type Position struct + AccountID string + AverageOpenPremium Decimal + BuyOrderLiability Decimal + ContractsSettled Decimal + EventID string + GrossPnL Decimal + ID string + MarketID string + MaxPotentialFee Decimal + MaxPotentialProfit Decimal + MaxRisk Decimal + OpenPotentialFee Decimal + OpenPotentialProfit Decimal + OpenRisk Decimal + Position Decimal + PositionPremiumLiability Decimal + Premium Decimal + SellOrderLiability Decimal + TotalFee Decimal + TotalSettlementPnL Decimal + type PositionsQuery struct + MarketIDs []string + type PositionsSnapshot struct + Positions []Position + type PositionsUpdate struct + Positions []Position + type PricePoint struct + PricePercent float64 + TimestampUS int64 + type ProfileAvatar struct + Palette string + Seed string + Style string + type ProfileUpdate struct + Avatar *ProfileAvatar + Handle string + LeaderboardOptIn *bool + type PublicTrade struct + Action string + EventID string + EventSymbol string + MarketID string + MarketSymbol string + Price Decimal + Quantity Decimal + Timestamp string + TimestampUS int64 + type Reauthenticator interface + Reauthenticate func(ctx context.Context) (bool, error) + type RecentTrade struct + LiquidityTaker string + Price Decimal + Quantity Decimal + Timestamp time.Time + TimestampUs int64 + type ReconnectPolicy struct + InitialBackoff time.Duration + MaxAttempts int + MaxBackoff time.Duration + NoJitter bool + type ResponseEvent struct + Attempt int + AuthKind string + Duration time.Duration + Err error + Method string + OperationID string + Path string + RequestBody []byte + ResponseBody []byte + StatusCode int + type RetryPolicy struct + InitialBackoff time.Duration + MaxAttempts int + MaxBackoff time.Duration + NoJitter bool + type SelfMatchBatch struct + Updates []OrderSlipRef + type Settlement struct + AccountID string + ClosingPlacedPreStart bool + ClosingPrice Decimal + ClosingTradeID string + ClosingTradedPreStart bool + Fee Decimal + GrossPnL Decimal + ID string + InsertedAt int64 + MarketID string + OpeningPlacedPreStart bool + OpeningPrice Decimal + OpeningTradeID string + OpeningTradedPreStart bool + PreStart bool + Quantity Decimal + RealizedPnL Decimal + SettledPremium Decimal + SettledRisk Decimal + Time time.Time + Type string + type SettlementsQuery struct + Cursor string + Limit int + MarketIDs []string + Type string + type SettlementsUpdate struct + Settlements []Settlement + type StatDetail struct + Jersey string + Line float64 + Participant string + Player string + PropType string + Stat string + StatDisplayName string + type StatsRange string + const StatsAll + const StatsDay + const StatsMonth + const StatsWeek + type Stream struct + func (s *Stream) AccountView(ctx context.Context, opts AccountViewOptions) (*AccountView, error) + func (s *Stream) ChannelRejoins() int + func (s *Stream) Close() error + func (s *Stream) ComboMaker(ctx context.Context) (*ComboMaker, error) + func (s *Stream) ComboPlayer(ctx context.Context) (*ComboPlayer, error) + func (s *Stream) Connected() bool + func (s *Stream) Done() <-chan struct{} + func (s *Stream) Err() error + func (s *Stream) OrderSlip(ctx context.Context) (*OrderSlip, error) + func (s *Stream) Reconnects() int + func (s *Stream) Subscribe(ctx context.Context, ch Channel) (*Subscription, error) + type StreamOption func(*streamConfig) + func WithBufferSize(n int) StreamOption + func WithChannelPingInterval(d time.Duration) StreamOption + func WithHeartbeatInterval(d time.Duration) StreamOption + func WithJoinTimeout(d time.Duration) StreamOption + func WithOnReconnect(fn func()) StreamOption + func WithReconnectPolicy(p ReconnectPolicy) StreamOption + func WithStreamLogger(l *slog.Logger) StreamOption + func WithUserID(id string) StreamOption + func WithoutReconnect() StreamOption + type Subscription struct + func (sub *Subscription) Close() error + func (sub *Subscription) DecodeReply(v any) error + func (sub *Subscription) Done() <-chan struct{} + func (sub *Subscription) Err() error + func (sub *Subscription) Joined() bool + func (sub *Subscription) Messages() <-chan Message + func (sub *Subscription) Ping(ctx context.Context) error + func (sub *Subscription) Push(ctx context.Context, event string, payload any) (json.RawMessage, error) + func (sub *Subscription) Reply() json.RawMessage + func (sub *Subscription) RequestSeries(ctx context.Context, r StatsRange, marketIDs ...string) (*MarketStatsReply, error) + func (sub *Subscription) RequestSnapshot(ctx context.Context) error + func (sub *Subscription) SelectEventIDs(ctx context.Context, eventIDs []string) (json.RawMessage, error) + func (sub *Subscription) SelectFilters(ctx context.Context, filters map[string][]string) (json.RawMessage, error) + func (sub *Subscription) SelectMarketIDs(ctx context.Context, marketIDs []string) (json.RawMessage, error) + func (sub *Subscription) SelectMessageTypes(ctx context.Context, types []string) (json.RawMessage, error) + func (sub *Subscription) SelectRuleFilters(ctx context.Context, rules []string) (json.RawMessage, error) + func (sub *Subscription) Topic() string + func (sub *Subscription) Watch(ctx context.Context, marketIDs ...string) (json.RawMessage, error) + type Ticker struct + BestBid Decimal + BestBidQuantity Decimal + BestOffer Decimal + BestOfferQuantity Decimal + BidDepth int + Competition string + EventID string + EventSymbol string + LastTradedPrice Decimal + LastTradedQuantity Decimal + MarketID string + MarketSymbol string + OfferDepth int + OpenInterest Decimal + Sport string + Timestamp string + TimestampUS int64 + TotalVolume Decimal + type TickerFilter struct + Competitions []string + Sports []string + type TradesFilter struct + EventIDs []string + MarketIDs []string + type Transaction struct + AccountID string + Amount Decimal + EventID string + FeeID string + ID string + InsertedAt int64 + MarketID string + PaymentID string + Points float64 + RefereeAccountID string + ReferrerAccountID string + SettlementID string + Time time.Time + Type string + type TransportError struct + Err error + Method string + Path string + func (e *TransportError) Error() string + func (e *TransportError) Is(target error) bool + func (e *TransportError) Unwrap() error + type UserInfo struct + Address1 string + Address2 string + AllowMultipleLogins bool + BusinessCountryCode string + BusinessPhone string + CitizenshipCountry string + City string + Country string + CountryCode string + DateOfBirth string + EmployerAddress string + EmployerName string + FirstName string + Industry string + JobTitle string + LastName string + Logout bool + MiddleName string + OptInMarketing bool + PasswordChanged bool + PhoneNumber string + PreferredName string + ReferralCode string + State string + TestAccount bool + UserID string + UserStatus string + UserUID string + WhitelistIPAddresses string + ZipCode string + type WebSocketAuth interface + WebSocketHeaders func(ctx context.Context, reconnect bool) (http.Header, error)