The below table indicates fields will be available at each roll-up when making requests to listClearedOrders
Wherever possible we want to display bet level data at higher roll-up levels (RUNNER & MARKET). This requires listClearedOrders to 'hoist' this data into higher roll-up levels whenever the value is unambiguous, this can occur when:
- SIDE, RUNNER & MARKET level when only 1 bet is involved in the roll-up - only 1 possible value for each field so they are all unambiguous (in particular, betId)
- RUNNER level when all bets are on the same side - value of side is unambiguous, priceRequested and priceMatched can be averaged, sizeSettled can be totalled.
- MARKET level when all bets are on the same selection/side combo - value of selectionId, handicap and side are unambiguous, priceRequested and priceMatched can be averaged, sizeSettled can be totalled.
- PersistenceType and OrderType are only displayed above BET level if all bets in the roll-up have the same type
Rollup level: | BET | SIDE | RUNNER | MARKET | EVENT | EVENT_TYPE | EXCHANGE |
---|---|---|---|---|---|---|---|
Settled As | Y | Y | Y | Y | Y | Y | Y |
Settled Date | Y | MAX | MAX | MAX | MAX | MAX | MAX |
Bet Count | Y | Y | Y | Y | Y | Y | Y |
Profit | Y | SUM | SUM | SUM | SUM | SUM | SUM |
Exchange Id | Y | Y | Y | Y | Y | Y | Y |
Event Type Id | Y | Y | Y | Y | Y | Y | N |
Event Id | Y | Y | Y | Y | Y | N | N |
Market Id | Y | Y | Y | Y | N | N | N |
Selection Id | Y | Y | Y | N* | N | N | N |
Handicap | Y | Y | Y | N* | N | N | N |
Side | Y | Y | N* | N* | N | N | N |
Price Requested | Y | AVG | N*(AVG) | N*(AVG) | N | N | N |
Price Matched | Y | AVG | N*(AVG) | N*(AVG) | N | N | N |
Size Settled | Y | SUM | N*(SUM) | N*(SUM) | N | N | N |
Price Reduced | Y | Y | Y | Y | N | N | N |
Commission | N | N | N | Y | SUM | SUM | SUM |
Bet Id | Y | N* | N* | N* | N | N | N |
Placed Date | Y | MAX | MAX | MAX | N | N | N |
Persistence Type | Y | Y | Y | Y | N | N | N |
Order Type | Y | Y | Y | Y | N | N | N |
Regulator Code | Y | Y | Y | Y | N | N | N |
Regulator Auth Code | Y | Y | Y | Y | N | N | N |
Voided Date (where applicable) | Y | MAX | MAX | MAX | N | N | N |
*=fields that may be hoisted (if lower level fields are unambiguous or the roll-up contains only 1 bet)