Skip to main content

Outbound Data Structures — MarketBook

Queue Configuration

PropertyValue
Topic name{customerPrefix}.market-book.queue
DescriptionMessages containing full market dynamic details. Upon arrival, it should override the existing snapshot after the version check.
Routing patternscustomerPrefix - customer unique prefix
ProducesMarketBook

MarketBook Model

FieldData TypeDescription
marketIdstringThe unique id of the market.
marketStatusstringThe status of the market: INACTIVE, OPEN, BALL_RUNNING, SUSPENDED, CLOSED, SETTLED. Note: BALL_RUNNING is currently supported, but is planned for deprecation.
maxMarketdoubleMax market liability per b2b client member in HKD
maxMarketCurrenciesmap<string, double>Max market liability per b2b client member in provided currencies
runnersRunner[]The set of betable selections on the market.
variablesmap<string, string>The market variables.
versionLongThe version of market. This can be used for deduplication and ordering of updates downstream.
sportIdstringThe id of the sport
tradingMarketTypestringOriginal market type

marketStatus Values

StatusDescription
INACTIVEMarket isn't available for Bet placement
OPENMarket is available for Bet placement
SUSPENDEDMarket isn't available for Bet placement
CLOSEDMarket isn't available for Bet placement
SETTLEDMarket is fully settled
BALL_RUNNING(Planned for deprecation)

MarketBook Proto

message MarketBook {
string marketId = 1;
string marketStatus = 2;
double maxMarket = 3;
map<string, double> maxMarketCurrencies = 4;
repeated Runner runner = 5;
map<string, string> variables = 6;
int64 version = 7;
string sportId = 8;
optional double minStake = 9;
map<string, double> minStakeCurrencies = 10;
string tradingMarketType = 11;
}

Runner Model

FieldData TypeDescription
idstringThe id of the runner that should be provided when placing a bet.
statusstringThe bettable status of the runner.
priceLadderRunnerPriceLadderThe prices ladder of the runner
versionlongThe runner version

Runner Proto

message Runner {
int64 id = 1;
string status = 2;
RunnerPriceLadder priceLadder = 3;
int64 version = 4;
}

RunnerPriceLadder Model

FieldData TypeDescription
availableToBackRunnerPriceSize[]The available BACK prices and available max stake to bet at that price.
availableToLayRunnerPriceSize[]The available LAY prices and available max stake to bet at that price.

RunnerPriceLadder Proto

message RunnerPriceLadder {
repeated RunnerPriceSize availableToBack = 1;
repeated RunnerPriceSize availableToLay = 2;
}

RunnerPriceSize Model

FieldData TypeDescription
pricedoubleThe price at which this runner can be bettable by customer.
midPricedoubleThe mid price.
linedoubleThe runner line.
midLinedoubleThe runner mid line.
priceIndexintegerThe position order of the line.
maxStakedoubleThe maximum stake size of a bet at this price.
maxStakeCurrenciesmap<string, double>The maximum stake size of a bet at this price in provided currencies.

RunnerPriceSize Proto

message RunnerPriceSize {
double price = 1;
double midPrice = 2;
double size = 3;
double line = 4;
double midLine = 5;
int32 priceIndex = 6;
double maxStake = 7;
map<string, double> maxStakeCurrencies = 8;
}