Meta markets (metaMarkets)
After configuring individual markets, you can move on to building more sophisticated views, by combining these previously defined markets into what are known as MetaMarkets or MarketMapping, in the OfferingResponse.
A metaMarket serves as a higher-level structure that allows you to group multiple markets into organized collections, such as rows or tabs.
Lets take a look at how metaMarkets can be used:
Rows
The rows view is a combination of base views. It is used to display multiple market views in a row layout in a single combined view. To specify which markets you want displayed in your custom row view, you need to add them to themarketList
array in the metaMarket object. And set cbViewLayout
to rows.Each row has a header (market name) that can be displayed or hidden by setting
srHideHeader
to true
in the metaMarket object.Markets are displayed in the order they are provided in the marketList array.
![](img/customBet.RowMarketCategory.png)
![](img/customBet.RowMarketView1.png)
![](img/customBet.RowMarketView2.png)
[
{
id: "homeTeamPlayerGoals",
name: "Home Team Player goals",
status: {
isActive: true
},
marketList: ["goals:playerId=123", "goals:playerId=456"],
cbViewLayout: "rows",
srHideHeader: true
}
]
Tabs
The tabs view is a combination of base and row views. It is used to add views to tabs. To specify which markets you want to be tabs, you need to add them to themarketList
array in the metaMarket object. And set cbViewLayout
to tabs.Each element in the
marketList
array is a tab. The name of the market / metaMarket will be displayed as tab name, and tab view will be displayed in the Custom Bet main view, in the assigned category.![](img/customBet.TabMarketCategory.png)
![](img/customBet.TabMarketView.png)
[
{
id: "playerGoals",
name: "Player goals",
status: {
isActive: true
},
marketList: ["homeTeamPlayerGoals", "awayTeamPlayerGoals"],
cbViewLayout: "tabs",
},
{
id: "homeTeamPlayerGoals",
name: "PSG",
status: {
isActive: true
},
marketList: ["goals:playerId=333", "goals:playerId=444"],
cbViewLayout: "rows",
},
{
id: "awayTeamPlayerGoals",
name: "Monaco",
status: {
isActive: true
},
marketList: ["goals:playerId=111", "goals:playerId=222"],
cbViewLayout: "rows",
}
]