Betting Data Structures
BetSnapshot
| Field | Data Type | Description |
|---|---|---|
| requestId | String | A request unique identifier. It could be generated on the customer side. |
| betId | Long | Unique identifier for the placed bet. Generated on Public API level. |
| memberCode | String | Code identifying the member placing the bet. |
| status | String | Bet status enum. One of: PENDING - the bet placement request has been sent, waiting for provider's response; FAILED - the bet placement has failed; PLACED - the bet was successfully placed (fully matched); VOIDED - the bet was voided by the provider/operator. PARTIALLY_MATCHED - part of the bet has been matched, the rest is waiting in the market. UNMATCHED - the bet is in the market but has not been matched yet. CANCEL_PENDING - The client requested to cancel the bet (or remaining part), but the provider has not yet confirmed the cancellation. CANCELLED - The bet (or its unmatched portion) was canceled by the user. LAPSED - the bet automatically expired because the market closed or conditions were no longer valid. |
| side | String | Side enum. One of: BACK - selection occurrence side selection; LAY - selection non-occurrence side selection. |
| marketId | String | Identifier for the specific market within an event. |
| runnerId | Long | Identifier for the specific runner within a market. |
| size | double | Bet size requested for placement in customer currency |
| sizeMatched | double | Bet size matched at the time of bet request placement. Applicable for Exchange markets. |
| odds | double | Accepted bet odds |
| line | int | The bet line, can be empty |
| errorMessage | String | Message from a provider accompanying failed or voided bet; empty if a bet is placed. |
| errorCode | String | Message from a provider accompanying failed or voided bet; empty if a bet is placed. |
| version | long | Timestamp when the bet was placed (UTC) |
| sizeMatched | double | The portion of the bet that has been successfully matched with the opposing side in the market. Applicable for Exchange markets. |
| sizeRemaining | double | The remaining unmatched portion of the bet that is still active in the market. Applicable for Exchange markets. |
| sizeLapsed | double | The portion of the bet that has lapsed (i.e. was not matched before the market closed or the event started) and was automatically removed. Applicable for Exchange markets. |
| sizeCancelled | double | The portion of the bet that was cancelled by the user or system before being matched. Applicable for Exchange markets. |
| sizeVoided | double | The portion of the bet that was voided (e.g. due to event cancellation or market rule changes). Applicable for Exchange markets. |
| averageOdds | double | The weighted average odds at which the bet was matched. If the bet is partially matched at different odds, this value reflects the overall effective odds based on matched sizes. Applicable for Exchange markets. |
| voidReason | String | Message from operator accompanying failed or voided bet |
BetSnapshot Proto
message BetSnapshot {
string requestId = 1;
int64 betId = 2;
string marketId = 3;
int64 runnerId = 4;
double size = 5;
optional double odds = 6;
optional int32 line = 7;
string side = 8;
string memberCode = 9;
string status = 10;
optional string errorMessage = 11;
optional string errorCode = 12;
int64 version = 13;
double sizeMatched = 14;
double sizeRemaining = 15;
double sizeLapsed = 16;
double sizeCancelled = 17;
double sizeVoided = 18;
double averageOdds = 19;
optional string voidReason = 20;
}
BetOutcomeSnapshot
| Field | Data Type | Description |
|---|---|---|
| betId | long | Bet id |
| outcome | string | Bet outcome enum. One of: WON - the bet has won; LOST - the bet has lost; VOID - the bet was voided; |
| pnl | double | Bet profit and lose outcome |
| version | Long | Timestamp when the bet was settled (UTC). |
| sizeSettled | double | Provider matched size in the case of a partial match |
BetOutcome Proto
message BetOutcomeSnapshot {
string requestId = 1;
int64 betId = 2;
string outcome = 3;
double pnl = 4;
int64 version = 5;
double sizeSettled = 6;
}