Messages
The following are examples of JSON messages that can be received from web socket. We currently only send messages as JSON.
Messages include an header called x-message-type, matching the type of messaged received. This can be helpful if using tools to deserialize the message payload for processing within the receiving application
Bet¶
Placement¶
After a bet is sent to the API, it can be either Accepted, Rejected or Fail to be placed due to a system error.
BetAccepted¶
{
"MessageType": "BetAccepted",
"BetId": "f8dd4ab924fa4ab19acf8f37f176f3d0",
"CustomerBetId": "customer-bet-1"
}
BetRejected¶
{
"MessageType": "BetRejected",
"BetId": "2c14a75b0f8c483197cbdf37910ccd03",
"CustomerBetId": "customer-bet-1",
"Reason": "Product was not open"
}
BetFailed¶
{
"MessageType": "BetFailed",
"BetId": "af0fc513a53d4cc7acc3e00416abf056",
"CustomerBetId": "customer-bet-1",
"Reason": "Product was not open"
}
Settlement¶
Once a bet is successful placed, then can be resulted as win/loss with a return amount, then settled to indicate it has been paid out. A bet could also be cancelled.
BetCancelled¶
BetResulted¶
BetSettled¶
Product¶
ProductStatusChanged¶
When a products changes between its status such as open, closed, settled
{
"MessageType": "ProductStatusChanged",
"ProductId": "0b315e3d-3e0b-4c76-9f9e-762555aad6bb",
"Status": "CLOSED"
}
SelectionStatusChanged¶
{
"MessageType": "SelectionStatusChanged",
"LegId": "37f298fb-2913-4dde-b167-8e4c15438173",
"SelectionId": "a5d1e23b-0520-401a-bcac-1e325277919e",
"ProductId": "0b315e3d-3e0b-4c76-9f9e-762555aad6bb",
"Status": "Active"
}
SelectionUnitsChanged¶
{
"MessageType": "SelectionUnitsChanged",
"LegId": "37f298fb-2913-4dde-b167-8e4c15438173",
"SelectionId": "a5d1e23b-0520-401a-bcac-1e325277919e",
"ProductId": "0b315e3d-3e0b-4c76-9f9e-762555aad6bb",
"Units": [
{ "Type": "Winning", "Amount": 150 },
{ "Type": "Consolation", "Amount": 50 }
]
}
PlaceTermsChanged¶
{
"MessageType": "PlaceTermsChanged",
"ProductId": "0b315e3d-3e0b-4c76-9f9e-762555aad6bb",
"LegId": "37f298fb-2913-4dde-b167-8e4c15438173",
"PlaceTerms": {
"NumberOfPlaces": 2
}
}
LinesChanged¶
{
"MessageType": "LinesChanged",
"ProductId": "3c71e095-dd6d-46c0-a51b-e147e1e20d8a",
"Lines": [
{
"Id": "WIN-HORSERACING-SANDOWN-PARK-GB-2026-07-29-1645-2",
"Legs": [
{
"LegId": "bddc7005-8f98-4509-9104-b30bb8362833",
"LineSelections": [
{
"SelectionId": "ce8bbc15-ef05-46cf-b58a-97c4e29eddf4",
"FinishingPosition": null
}
]
}
],
"Odds": [
{
"Name": "Enhanced",
"Decimal": 10.2,
"Status": "Provisional",
"Type": "Pool"
}
]
},
{
"Id": "WIN-HORSERACING-SANDOWN-PARK-GB-2026-07-29-1645-3",
"Legs": [
{
"LegId": "bddc7005-8f98-4509-9104-b30bb8362833",
"LineSelections": [
{
"SelectionId": "00b94ffe-43a6-44bc-899e-87594525f3ae",
"FinishingPosition": null
}
]
}
],
"Odds": [
{
"Name": "Enhanced",
"Decimal": 4.8,
"Status": "Provisional",
"Type": "Pool"
}
]
},
{
"Id": "WIN-HORSERACING-SANDOWN-PARK-GB-2026-07-29-1645-5",
"Legs": [
{
"LegId": "bddc7005-8f98-4509-9104-b30bb8362833",
"LineSelections": [
{
"SelectionId": "dba18f3a-40f9-483b-87e2-cc8ebed8dc22",
"FinishingPosition": null
}
]
}
],
"Odds": [
{
"Name": "Enhanced",
"Decimal": 14.4,
"Status": "Provisional",
"Type": "Pool"
}
]
}
]
}
Pool¶
Pool specific messages such as when the total is changed, or dividends are declared or updated.
PoolTotalChanged¶
{
"MessageType": "PoolTotalChanged",
"ProductId": "c2edd582-ce72-4178-a511-377a4837d122",
"IsFinalized": false,
"Total": {
"GrossAmounts": [
{
"DecimalAmount": 6645.4,
"Currency": {
"Code": "GBP"
}
}
],
"NetAmounts": [
{
"DecimalAmount": 4917.6,
"Currency": {
"Code": "GBP"
}
}
]
},
"Guarantee": {
"GrossAmounts": [
{
"DecimalAmount": 0,
"Currency": {
"Code": "GBP"
}
}
],
"NetAmounts": [
{
"DecimalAmount": 0,
"Currency": {
"Code": "GBP"
}
}
]
},
"CarryIn": {
"GrossAmounts": [
{
"DecimalAmount": 0,
"Currency": {
"Code": "GBP"
}
}
],
"NetAmounts": [
{
"DecimalAmount": 0,
"Currency": {
"Code": "GBP"
}
}
]
},
"Funds": []
}
PoolDividendChanged¶
{
"MessageType": "PoolDividendChanged",
"ProductId": "137e68f7-2536-46cd-b578-2f35c976dc20",
"Dividends": [
{
"Dividend": {
"Name": "Base",
"Type": 1,
"Status": 1,
"Amounts": [
{
"DecimalAmount": 17.5,
"Currency": {
"Code": "GBP"
}
}
]
},
"Legs": [
{
"LegId": "e2ffb3b6-67d3-4147-b056-6a19ae0c6526",
"Selections": [
{
"Id": "5db02c74-9f91-42ad-9920-500146df96e3",
"FinishingPosition": null
}
]
}
]
}
]
}
Event¶
When an event status or result changes.
EventResultChanged¶
{
"MessageType": "EventResultChanged",
"EventId": "HORSERACING-NEWCASTLE-GB-2024-01-02-1545",
"CompetitorResults": [
{
"CompetitorId": "HORSERACING-NEWCASTLE-GB-2024-01-02-1545-BRUNELLO-BREEZE",
"FinishingPosition": "1",
"Status": "Final"
}
]
}
EventStatusChanged¶
{
"MessageType": "EventStatusChanged",
"EventId": "HORSERACING-NEWCASTLE-GB-2024-01-02-1545",
"Status": "Finished"
}
EventUpdated¶
Competitor¶
CompetitorStatusChanged¶
{
"MessageType": "CompetitorStatusChanged",
"EventId": "HORSERACING-NEWCASTLE-GB-2024-01-02-1545",
"CompetitorId": "HORSERACING-NEWCASTLE-GB-2024-01-02-1545-BRUNELLO-BREEZE",
"Status": "Confirmed"
}