betting

package
v0.0.0-...-e4508ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Code generated by "codegen"; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APINGException

type APINGException struct {
	ErrorCode    APINGExceptionCode `json:"errorCode"`
	ErrorDetails string             `json:"errorDetails"`
	RequestUUID  string             `json:"requestUUID"`
}

type APINGExceptionCode

type APINGExceptionCode int
const (
	APINGExceptionCode_TooMuchData APINGExceptionCode = iota + 1
	APINGExceptionCode_InvalidInputData
	APINGExceptionCode_InvalidSessionInformation
	APINGExceptionCode_NoAppKey
	APINGExceptionCode_NoSession
	APINGExceptionCode_UnexpectedError
	APINGExceptionCode_InvalidAppKey
	APINGExceptionCode_TooManyRequests
	APINGExceptionCode_ServiceBusy
	APINGExceptionCode_TimeoutError
	APINGExceptionCode_RequestSizeExceedsLimit
	APINGExceptionCode_AccessDenied
)

func (APINGExceptionCode) MarshalJSON

func (apingec APINGExceptionCode) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (APINGExceptionCode) String

func (apingec APINGExceptionCode) String() string

func (*APINGExceptionCode) UnmarshalJSON

func (apingec *APINGExceptionCode) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type BetStatus

type BetStatus int
const (
	BetStatus_Settled BetStatus = iota + 1
	BetStatus_Voided
	BetStatus_Lapsed
	BetStatus_Cancelled
)

func (BetStatus) MarshalJSON

func (bs BetStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (BetStatus) String

func (bs BetStatus) String() string

func (*BetStatus) UnmarshalJSON

func (bs *BetStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type BetTargetType

type BetTargetType int
const (
	BetTargetType_BackersProfit BetTargetType = iota + 1
	BetTargetType_Payout
)

func (BetTargetType) MarshalJSON

func (btt BetTargetType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (BetTargetType) String

func (btt BetTargetType) String() string

func (*BetTargetType) UnmarshalJSON

func (btt *BetTargetType) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type BetfairAPIError

type BetfairAPIError struct {
	Detail      BetfairDetailError `json:"detail"`
	FaultCode   string             `json:"faultCode"`
	FaultString string             `json:"faultstring"`
}

type BetfairDetailError

type BetfairDetailError struct {
	APINGException APINGException `json:"APINGException"`
	ExceptionName  string         `json:"exceptionname"`
}

type BettingAPI

type BettingAPI struct {
	aping.BetfairAPI
}

func NewBettingAPI

func NewBettingAPI(bapi aping.BetfairAPI) BettingAPI

func (BettingAPI) CancelOrders

CancelOrders cancels bets on the market.

func (BettingAPI) ListClearedOrders

ListClearedOrders returns a list of settled bets based on the bet status, ordered by settled date. To retrieve more than 1000 records, you need to make use of the fromRecord and recordCount parameters. By default the service will return all available data for the last 90 days.

func (BettingAPI) ListCurrentOrders

ListClearedOrders returns a list of settled bets based on the bet status, ordered by settled date.

func (BettingAPI) ListMarketBook

func (b BettingAPI) ListMarketBook(clmb ContainerListMarketBook) ([]MarketBook, error)

ListMarketBook lists dynamic data about markets. Calls to listMarketBook should be made up to a maximum of 5 times per second to a single marketId.

func (BettingAPI) ListMarketCatalogue

func (b BettingAPI) ListMarketCatalogue(lrc ContainerListMarketCatalogue) ([]MarketCatalogue, error)

ListMarketCatalogue lists the market catalogue. Note: listMarketCatalogue does not return markets that are CLOSED.

func (BettingAPI) PlaceOrders

PlaceOrders puts back/lay bets on the market.

func (BettingAPI) ReplaceOrders

ReplaceOrders cancels bets followed by putting new bets on the market.

type BettingAPIError

type BettingAPIError struct {
	ErrorCode    APINGExceptionCode
	ErrorDetails string
	RequestUUID  string
}

func (*BettingAPIError) Error

func (e *BettingAPIError) Error() string

type CancelExecutionReport

type CancelExecutionReport struct {
	Status             ExecutionReportStatus     `json:"status"`
	ErrorCode          ExecutionReportErrorCode  `json:"errorCode"`
	MarketID           string                    `json:"marketId"`
	InstructionReports []CancelInstructionReport `json:"instructionReports"`
}

type CancelInstruction

type CancelInstruction struct {
	BetID         string   `json:"betId"`
	SizeReduction *float64 `json:"sizeReduction"`
}

type CancelInstructionReport

type CancelInstructionReport struct {
	Status        InstructionReportStatus     `json:"status"`
	ErrorCode     *InstructionReportErrorCode `json:"errorCode"`
	Instruction   CancelInstruction           `json:"instruction"`
	SizeCancelled float64                     `json:"sizeCancelled"`
}

type ClearedOrderSummary

type ClearedOrderSummary struct {
	EventID             string          `json:"eventId"`
	MarketID            string          `json:"marketId"`
	SelectionID         uint            `json:"selectionId"`
	BetID               string          `json:"betId"`
	PlacedDate          *time.Time      `json:"placedDate"`
	Side                Side            `json:"side"`
	ItemDescription     ItemDescription `json:"itemDescription"`
	BetOutcome          string          `json:"betOutcome"`
	PriceRequested      float64         `json:"priceRequested"`
	SettledDate         *time.Time      `json:"settledDate"`
	LastMatchedDate     *time.Time      `json:"lastMatchedDate"`
	BetCount            uint            `json:"betCount"`
	Commission          float64         `json:"commission"`
	PriceMatched        float64         `json:"priceMatched"`
	PriceReduced        bool            `json:"priceReduced"`
	SizeSettled         float64         `json:"sizeSettled"`
	Profit              float64         `json:"profit"`
	CustomerStrategyRef string          `json:"customerStrategyRef"`
}

type ClearedOrderSummaryReport

type ClearedOrderSummaryReport struct {
	ClearedOrders []ClearedOrderSummary `json:"clearedOrders"`
	MoreAvailable bool                  `json:"moreAvailable"`
}

type ContainerCancelOrders

type ContainerCancelOrders struct {
	MarketID     string              `json:"marketId"`
	Instructions []CancelInstruction `json:"instructions"`
}

type ContainerListClearedOrders

type ContainerListClearedOrders struct {
	BetStatus              BetStatus  `json:"betStatus"`
	GroupBy                *GroupBy   `json:"groupBy"`
	CustomerStrategyRefs   []string   `json:"customerStrategyRefs,omitempty"`
	SettledDateRange       *TimeRange `json:"settledDateRange,omitempty"`
	IncludeItemDescription bool       `json:"includeItemDescription"`
	FromRecord             uint       `json:"fromRecord"`
	RecordCount            uint       `json:"recordCount"`
}

type ContainerListCurrentOrders

type ContainerListCurrentOrders struct {
	BetIDs []string `json:"betIds,omitempty"`
}

type ContainerListMarketBook

type ContainerListMarketBook struct {
	MarketIDs       []string        `json:"marketIds"`
	PriceProjection PriceProjection `json:"priceProjection"`
}

type ContainerListMarketCatalogue

type ContainerListMarketCatalogue struct {
	Filter           MarketFilter       `json:"filter"`
	MarketProjection []MarketProjection `json:"marketProjection,omitempty"`
	Sort             *MarketSort        `json:"sort,omitempty"`
	MaxResults       uint               `json:"maxResults"`
	Locale           *string            `json:"locale,omitempty"`
}

type ContainerPlaceOrders

type ContainerPlaceOrders struct {
	MarketID     string             `json:"marketId"`
	Instructions []PlaceInstruction `json:"instructions"`
	// CustomerStrategyRef - Max of 15 characters
	CustomerStrategyRef string `json:"customerStrategyRef"`
}

type ContainerReplaceOrders

type ContainerReplaceOrders struct {
	MarketID     string               `json:"marketId"`
	Instructions []ReplaceInstruction `json:"instructions"`
}

type CurrentOrderSummary

type CurrentOrderSummary struct {
	BetID  string      `json:"betId"`
	Status OrderStatus `json:"status"`
}

type CurrentOrderSummaryReport

type CurrentOrderSummaryReport struct {
	CurrentOrders []CurrentOrderSummary `json:"currentOrders"`
	MoreAvailable bool                  `json:"moreAvailable"`
}

type Event

type Event struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	CountryCode string     `json:"countryCode"`
	Timezone    string     `json:"timezone"`
	Venue       string     `json:"venue"`
	OpenDate    *time.Time `json:"openDate"`
}

type ExchangePrices

type ExchangePrices struct {
	AvailableToBack []PriceSize `json:"availableToBack"`
	AvailableToLay  []PriceSize `json:"availableToLay"`
	TradedVolume    []PriceSize `json:"tradedVolume"`
}

type ExecutionReportErrorCode

type ExecutionReportErrorCode int
const (
	ExecutionReportErrorCode_ErrorInMatcher ExecutionReportErrorCode = iota + 1
	ExecutionReportErrorCode_ProcessedWithErrors
	ExecutionReportErrorCode_BetActionError
	ExecutionReportErrorCode_InvalidAccountState
	ExecutionReportErrorCode_InvalidWalletStatus
	ExecutionReportErrorCode_InsufficientFunds
	ExecutionReportErrorCode_LossLimitExceeded
	ExecutionReportErrorCode_MarketSuspended
	ExecutionReportErrorCode_MarketNotOpenForBetting
	ExecutionReportErrorCode_DuplicateTransaction
	ExecutionReportErrorCode_InvalidOrder
	ExecutionReportErrorCode_InvalidMarketId
	ExecutionReportErrorCode_PermissionDenied
	ExecutionReportErrorCode_DuplicateBetids
	ExecutionReportErrorCode_NoActionRequired
	ExecutionReportErrorCode_ServiceUnavailable
	ExecutionReportErrorCode_RejectedByRegulator
	ExecutionReportErrorCode_NoChasing
	ExecutionReportErrorCode_RegulatorIsNotAvailable
	ExecutionReportErrorCode_TooManyInstructions
	ExecutionReportErrorCode_InvalidMarketVersion
)

func (ExecutionReportErrorCode) MarshalJSON

func (erec ExecutionReportErrorCode) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (ExecutionReportErrorCode) String

func (erec ExecutionReportErrorCode) String() string

func (*ExecutionReportErrorCode) UnmarshalJSON

func (erec *ExecutionReportErrorCode) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type ExecutionReportStatus

type ExecutionReportStatus int
const (
	ExecutionReportStatus_Success ExecutionReportStatus = iota + 1
	ExecutionReportStatus_Failure
	ExecutionReportStatus_ProcessedWithErrors
	ExecutionReportStatus_Timeout
)

func (ExecutionReportStatus) MarshalJSON

func (ers ExecutionReportStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (ExecutionReportStatus) String

func (ers ExecutionReportStatus) String() string

func (*ExecutionReportStatus) UnmarshalJSON

func (ers *ExecutionReportStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type GroupBy

type GroupBy int
const (
	GroupBy_EventType GroupBy = iota + 1
	GroupBy_Event
	GroupBy_Market
	GroupBy_Side
	GroupBy_Bet
)

func (GroupBy) MarshalJSON

func (gb GroupBy) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (GroupBy) String

func (gb GroupBy) String() string

func (*GroupBy) UnmarshalJSON

func (gb *GroupBy) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type InstructionReportErrorCode

type InstructionReportErrorCode int
const (
	InstructionReportErrorCode_InvalidBetSize InstructionReportErrorCode = iota + 1
	InstructionReportErrorCode_InvalidRunner
	InstructionReportErrorCode_BetTakenOrLapsed
	InstructionReportErrorCode_BetInProgress
	InstructionReportErrorCode_RunnerRemoved
	InstructionReportErrorCode_MarketNotOpenForBetting
	InstructionReportErrorCode_LossLimitExceeded
	InstructionReportErrorCode_MarketNotOpenForBspBetting
	InstructionReportErrorCode_InvalidPriceEdit
	InstructionReportErrorCode_InvalidOdds
	InstructionReportErrorCode_InsufficientFunds
	InstructionReportErrorCode_InvalidPersistenceType
	InstructionReportErrorCode_ErrorInMatcher
	InstructionReportErrorCode_InvalidBackLayCombination
	InstructionReportErrorCode_ErrorInOrder
	InstructionReportErrorCode_InvalidBidType
	InstructionReportErrorCode_InvalidBetId
	InstructionReportErrorCode_CancelledNotPlaced
	InstructionReportErrorCode_RelatedActionFailed
	InstructionReportErrorCode_NoActionRequired
	InstructionReportErrorCode_TimeInForceConflict
	InstructionReportErrorCode_UnexpectedPersistenceType
	InstructionReportErrorCode_InvalidOrderType
	InstructionReportErrorCode_UnexpectedMinFillSize
	InstructionReportErrorCode_InvalidCustomerOrderRef
	InstructionReportErrorCode_InvalidMinFillSize
	InstructionReportErrorCode_BetLapsedPriceImprovementTooLarge
)

func (InstructionReportErrorCode) MarshalJSON

func (irec InstructionReportErrorCode) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (InstructionReportErrorCode) String

func (irec InstructionReportErrorCode) String() string

func (*InstructionReportErrorCode) UnmarshalJSON

func (irec *InstructionReportErrorCode) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type InstructionReportStatus

type InstructionReportStatus int
const (
	InstructionReportStatus_Success InstructionReportStatus = iota + 1
	InstructionReportStatus_Failure
	InstructionReportStatus_Timeout
)

func (InstructionReportStatus) MarshalJSON

func (irs InstructionReportStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (InstructionReportStatus) String

func (irs InstructionReportStatus) String() string

func (*InstructionReportStatus) UnmarshalJSON

func (irs *InstructionReportStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type ItemDescription

type ItemDescription struct {
	EventTypeDesc   string     `json:"eventTypeDesc"`
	EventDesc       string     `json:"eventDesc"`
	MarketDesc      string     `json:"marketDesc"`
	MarketType      string     `json:"marketType"`
	MarketStartTime *time.Time `json:"marketStartTime"`
	RunnerDesc      string     `json:"runnerDesc"`
	NumberOfWinners uint       `json:"numberOfWinners"`
	EachWayDivisor  float64    `json:"eachWayDivisor"`
}

type LimitOrder

type LimitOrder struct {
	Size            string          `json:"size"`
	Price           string          `json:"price"`
	PersistenceType PersistenceType `json:"persistenceType,omitempty"`
}

type LimitOrderR

type LimitOrderR struct {
	Size            float64         `json:"size"`
	Price           float64         `json:"price"`
	PersistenceType PersistenceType `json:"persistenceType,omitempty"`
}

type MarketBettingType

type MarketBettingType int
const (
	MarketBettingType_Odds MarketBettingType = iota + 1
	MarketBettingType_Line
	MarketBettingType_Range
	MarketBettingType_AsianHandicapDoubleLine
	MarketBettingType_AsianHandicapSingleLine
	MarketBettingType_FixedOdds
)

func (MarketBettingType) MarshalJSON

func (mbt MarketBettingType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (MarketBettingType) String

func (mbt MarketBettingType) String() string

func (*MarketBettingType) UnmarshalJSON

func (mbt *MarketBettingType) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type MarketBook

type MarketBook struct {
	MarketID              string       `json:"marketId"`
	Status                MarketStatus `json:"status"`
	InPlay                bool         `json:"inplay"`
	NumberOfWinners       uint         `json:"numberOfWinners"`
	NumberOfRunners       uint         `json:"numberOfRunners"`
	NumberOfActiveRunners uint         `json:"numberOfActiveRunners"`
	LastMatchTime         time.Time    `json:"lastMatchTime"`
	TotalMatched          float64      `json:"totalMatched"`
	TotalAvailable        float64      `json:"totalAvailable"`
	Version               uint         `json:"version"`
	Runners               []Runner     `json:"runners"`
}

type MarketCatalogue

type MarketCatalogue struct {
	MarketID        string     `json:"marketId"`
	MarketName      string     `json:"marketName"`
	MarketStartTime *time.Time `json:"marketStartTime"`
	// Description     string          `json:"description"`
	TotalMatched float64         `json:"totalMatched"`
	Runners      []RunnerCatalog `json:"runners"`
	// EventType    string          `json:"eventType"`
	// Competition  string          `json:"competition"`
	Event Event `json:"event"`
}

type MarketFilter

type MarketFilter struct {
	TextQuery          string              `json:"textQuery,omitempty"`
	ExchangeIDs        []string            `json:"exchangeIds,omitempty"` //NOTE: Deprecated
	EventTypeIDs       []string            `json:"eventTypeIds,omitempty"`
	EventIDs           []string            `json:"eventIds,omitempty"`
	CompetitionIDs     []string            `json:"competitionIds,omitempty"`
	MarketIDs          []string            `json:"marketIds,omitempty"`
	Venues             []string            `json:"venues,omitempty"`
	BSPOnly            *bool               `json:"bspOnly,omitempty"`
	TurnInPlayEnabled  *bool               `json:"turnInPlayEnabled,omitempty"`
	InPlayOnly         *bool               `json:"inPlayOnly,omitempty"`
	MarketBettingTypes []MarketBettingType `json:"marketBettingTypes,omitempty"`
	MarketCountries    []string            `json:"marketCountries,omitempty"`
	MarketTypeCodes    []string            `json:"marketTypeCodes,omitempty"`
	MarketStartTime    *TimeRange          `json:"marketStartTime,omitempty"`
	WithOrders         []OrderStatus       `json:"withOrders,omitempty"`
	RaceTypes          []string            `json:"raceTypes,omitempty"`
}

type MarketProjection

type MarketProjection int
const (
	MarketProjection_Competition MarketProjection = iota + 1
	MarketProjection_Event
	MarketProjection_EventType
	MarketProjection_MarketStartTime
	MarketProjection_MarketDescription
	MarketProjection_RunnerDescription
	MarketProjection_RunnerMetadata
)

func (MarketProjection) MarshalJSON

func (mp MarketProjection) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (MarketProjection) String

func (mp MarketProjection) String() string

func (*MarketProjection) UnmarshalJSON

func (mp *MarketProjection) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type MarketSort

type MarketSort int
const (
	MarketSort_MinimumTraded MarketSort = iota + 1
	MarketSort_MaximumTraded
	MarketSort_MinimumAvailable
	MarketSort_MaximumAvailable
	MarketSort_FirstToStart
	MarketSort_LastToStart
)

func (MarketSort) MarshalJSON

func (ms MarketSort) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (MarketSort) String

func (ms MarketSort) String() string

func (*MarketSort) UnmarshalJSON

func (ms *MarketSort) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type MarketStatus

type MarketStatus int
const (
	MarketStatus_Inactive MarketStatus = iota + 1
	MarketStatus_Open
	MarketStatus_Suspended
	MarketStatus_Closed
)

func (MarketStatus) MarshalJSON

func (ms MarketStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (MarketStatus) String

func (ms MarketStatus) String() string

func (*MarketStatus) UnmarshalJSON

func (ms *MarketStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type MarketType

type MarketType int
const (
	MarketType_A MarketType = iota + 1
	MarketType_L
	MarketType_O
	MarketType_R
	MarketType_NotApplicable
)

func (MarketType) MarshalJSON

func (mt MarketType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (MarketType) String

func (mt MarketType) String() string

func (*MarketType) UnmarshalJSON

func (mt *MarketType) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type MatchProjection

type MatchProjection int
const (
	MatchProjection_NoRollup MatchProjection = iota + 1
	MatchProjection_RolledUpByPrice
	MatchProjection_RolledUpByAvgPrice
)

func (MatchProjection) MarshalJSON

func (mp MatchProjection) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (MatchProjection) String

func (mp MatchProjection) String() string

func (*MatchProjection) UnmarshalJSON

func (mp *MatchProjection) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type OrderBy

type OrderBy int
const (
	OrderBy_ByBet OrderBy = iota + 1
	OrderBy_ByMarket
	OrderBy_ByMatchTime
	OrderBy_ByPlaceTime
	OrderBy_BySettledTime
	OrderBy_ByVoidTime
)

func (OrderBy) MarshalJSON

func (ob OrderBy) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (OrderBy) String

func (ob OrderBy) String() string

func (*OrderBy) UnmarshalJSON

func (ob *OrderBy) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type OrderProjection

type OrderProjection int
const (
	OrderProjection_All OrderProjection = iota + 1
	OrderProjection_Executable
	OrderProjection_ExecutionComplete
)

func (OrderProjection) MarshalJSON

func (op OrderProjection) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (OrderProjection) String

func (op OrderProjection) String() string

func (*OrderProjection) UnmarshalJSON

func (op *OrderProjection) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type OrderStatus

type OrderStatus int
const (
	OrderStatus_Pending OrderStatus = iota + 1
	OrderStatus_ExecutionComplete
	OrderStatus_Executable
	OrderStatus_Expired
)

func (OrderStatus) MarshalJSON

func (os OrderStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (OrderStatus) String

func (os OrderStatus) String() string

func (*OrderStatus) UnmarshalJSON

func (os *OrderStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type OrderType

type OrderType int
const (
	OrderType_Limit OrderType = iota + 1
	OrderType_LimitOnClose
	OrderType_MarketOnClose
)

func (OrderType) MarshalJSON

func (ot OrderType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (OrderType) String

func (ot OrderType) String() string

func (*OrderType) UnmarshalJSON

func (ot *OrderType) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type PersistenceType

type PersistenceType int
const (
	PersistenceType_Lapse PersistenceType = iota + 1
	PersistenceType_Persist
	PersistenceType_MarketOnClose
)

func (PersistenceType) MarshalJSON

func (pt PersistenceType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (PersistenceType) String

func (pt PersistenceType) String() string

func (*PersistenceType) UnmarshalJSON

func (pt *PersistenceType) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type PlaceExecutionReport

type PlaceExecutionReport struct {
	Status             ExecutionReportStatus    `json:"status"`
	ErrorCode          ExecutionReportErrorCode `json:"errorCode"`
	MarketID           string                   `json:"marketId"`
	InstructionReports []PlaceInstructionReport `json:"instructionReports"`
}

type PlaceInstruction

type PlaceInstruction struct {
	OrderType        OrderType  `json:"orderType"`
	SelectionID      uint       `json:"selectionId"`
	Side             Side       `json:"side"`
	LimitOrder       LimitOrder `json:"limitOrder"`
	CustomerOrderRef string     `json:"customerOrderRef"`
}

type PlaceInstructionR

type PlaceInstructionR struct {
	OrderType   OrderType   `json:"orderType"`
	SelectionID uint        `json:"selectionId"`
	Side        Side        `json:"side"`
	LimitOrder  LimitOrderR `json:"limitOrder"`
}

type PlaceInstructionReport

type PlaceInstructionReport struct {
	Status              InstructionReportStatus     `json:"status"`
	ErrorCode           *InstructionReportErrorCode `json:"errorCode"`
	OrderStatus         OrderStatus                 `json:"orderStatus"`
	Instruction         PlaceInstructionR           `json:"instruction"`
	BetID               *string                     `json:"betId"`
	AveragePriceMatched *float64                    `json:"averagePriceMatched"`
	SizeMatched         *float64                    `json:"sizeMatched"`
}

type PriceData

type PriceData int
const (
	PriceData_SpAvailable PriceData = iota + 1
	PriceData_SpTraded
	PriceData_ExBestOffers
	PriceData_ExAllOffers
	PriceData_ExTraded
)

func (PriceData) MarshalJSON

func (pd PriceData) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (PriceData) String

func (pd PriceData) String() string

func (*PriceData) UnmarshalJSON

func (pd *PriceData) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type PriceLadderType

type PriceLadderType int
const (
	PriceLadderType_Classic PriceLadderType = iota + 1
	PriceLadderType_Finest
	PriceLadderType_LineRange
)

func (PriceLadderType) MarshalJSON

func (plt PriceLadderType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (PriceLadderType) String

func (plt PriceLadderType) String() string

func (*PriceLadderType) UnmarshalJSON

func (plt *PriceLadderType) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type PriceProjection

type PriceProjection struct {
	PriceData []PriceData `json:"priceData"`
}

type PriceSize

type PriceSize struct {
	Price float64 `json:"price"`
	Size  float64 `json:"size"`
}

type ReplaceExecutionReport

type ReplaceExecutionReport struct {
	Status             ExecutionReportStatus      `json:"status"`
	ErrorCode          ExecutionReportErrorCode   `json:"errorCode"`
	MarketID           string                     `json:"marketId"`
	InstructionReports []ReplaceInstructionReport `json:"instructionReports"`
}

type ReplaceInstruction

type ReplaceInstruction struct {
	BetID    string  `json:"betId"`
	NewPrice float64 `json:"newPrice"`
}

type ReplaceInstructionReport

type ReplaceInstructionReport struct {
	Status    InstructionReportStatus     `json:"status"`
	ErrorCode *InstructionReportErrorCode `json:"errorCode"`
}

type RollupModel

type RollupModel int
const (
	RollupModel_Stake RollupModel = iota + 1
	RollupModel_Payout
	RollupModel_ManagedLiability
	RollupModel_None
)

func (RollupModel) MarshalJSON

func (rm RollupModel) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (RollupModel) String

func (rm RollupModel) String() string

func (*RollupModel) UnmarshalJSON

func (rm *RollupModel) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type Runner

type Runner struct {
	SelectionID     uint           `json:"selectionId"`
	Status          RunnerStatus   `json:"status"`
	LastPriceTraded float64        `json:"lastPriceTraded"`
	TotalMatched    float64        `json:"totalMatched"`
	Ex              ExchangePrices `json:"ex"`
}

type RunnerCatalog

type RunnerCatalog struct {
	SelectionID  uint              `json:"selectionId"`
	RunnerName   string            `json:"runnerName"`
	Handicap     float64           `json:"handicap"`
	SortPriority uint              `json:"sortPriority"`
	Metadata     map[string]string `json:"metadata"`
}

type RunnerStatus

type RunnerStatus int
const (
	RunnerStatus_Active RunnerStatus = iota + 1
	RunnerStatus_Winner
	RunnerStatus_Loser
	RunnerStatus_Placed
	RunnerStatus_RemovedVacant
	RunnerStatus_Removed
	RunnerStatus_Hidden
)

func (RunnerStatus) MarshalJSON

func (rs RunnerStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (RunnerStatus) String

func (rs RunnerStatus) String() string

func (*RunnerStatus) UnmarshalJSON

func (rs *RunnerStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type Side

type Side int
const (
	Side_Back Side = iota + 1
	Side_Lay
)

func (Side) MarshalJSON

func (s Side) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (Side) String

func (s Side) String() string

func (*Side) UnmarshalJSON

func (s *Side) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type SortDir

type SortDir int
const (
	SortDir_EarliestToLatest SortDir = iota + 1
	SortDir_LatestToEarliest
)

func (SortDir) MarshalJSON

func (sd SortDir) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (SortDir) String

func (sd SortDir) String() string

func (*SortDir) UnmarshalJSON

func (sd *SortDir) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type TimeGranularity

type TimeGranularity int
const (
	TimeGranularity_Days TimeGranularity = iota + 1
	TimeGranularity_Hours
	TimeGranularity_Minutes
)

func (TimeGranularity) MarshalJSON

func (tg TimeGranularity) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (TimeGranularity) String

func (tg TimeGranularity) String() string

func (*TimeGranularity) UnmarshalJSON

func (tg *TimeGranularity) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type TimeInForce

type TimeInForce int
const (
	TimeInForce_FillOrKill TimeInForce = iota + 1
)

func (TimeInForce) MarshalJSON

func (tif TimeInForce) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (TimeInForce) String

func (tif TimeInForce) String() string

func (*TimeInForce) UnmarshalJSON

func (tif *TimeInForce) UnmarshalJSON(data []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type TimeRange

type TimeRange struct {
	From *time.Time `json:"from,omitempty"`
	To   *time.Time `json:"to,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL