Outbound Data Structures — MarketBook
Queue Configuration
| Property | Value |
|---|---|
| Topic name | {customerPrefix}.market-book.queue |
| Description | Messages containing full market dynamic details. Upon arrival, it should override the existing snapshot after the version check. |
| Routing patterns | customerPrefix - customer unique prefix |
| Produces | MarketBook |
MarketBook Model
| Field | Data Type | Description |
|---|---|---|
| marketId | string | The unique id of the market. |
| marketStatus | string | The status of the market: INACTIVE, OPEN, BALL_RUNNING, SUSPENDED, CLOSED, SETTLED. Note: BALL_RUNNING is currently supported, but is planned for deprecation. |
| maxMarket | double | Max market liability per b2b client member in HKD |
| maxMarketCurrencies | map<string, double> | Max market liability per b2b client member in provided currencies |
| runners | Runner[] | The set of betable selections on the market. |
| variables | map<string, string> | The market variables. |
| version | Long | The version of market. This can be used for deduplication and ordering of updates downstream. |
| sportId | string | The id of the sport |
| tradingMarketType | string | Original market type |
marketStatus Values
| Status | Description |
|---|---|
| INACTIVE | Market isn't available for Bet placement |
| OPEN | Market is available for Bet placement |
| SUSPENDED | Market isn't available for Bet placement |
| CLOSED | Market isn't available for Bet placement |
| SETTLED | Market 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
| Field | Data Type | Description |
|---|---|---|
| id | string | The id of the runner that should be provided when placing a bet. |
| status | string | The bettable status of the runner. |
| priceLadder | RunnerPriceLadder | The prices ladder of the runner |
| version | long | The runner version |
Runner Proto
message Runner {
int64 id = 1;
string status = 2;
RunnerPriceLadder priceLadder = 3;
int64 version = 4;
}
RunnerPriceLadder Model
| Field | Data Type | Description |
|---|---|---|
| availableToBack | RunnerPriceSize[] | The available BACK prices and available max stake to bet at that price. |
| availableToLay | RunnerPriceSize[] | 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
| Field | Data Type | Description |
|---|---|---|
| price | double | The price at which this runner can be bettable by customer. |
| midPrice | double | The mid price. |
| line | double | The runner line. |
| midLine | double | The runner mid line. |
| priceIndex | integer | The position order of the line. |
| maxStake | double | The maximum stake size of a bet at this price. |
| maxStakeCurrencies | map<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;
}