Skip to content

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.

  1. Retrieve the result of the bet
  2. Listen to web socket for the settlement of the bet
Authorization header

Remember to include the Authorization header in the request.

Retrieve a bet

You can retrieve a bet by using the toteId that was provided by the placeBets request.

query GetBets {
  bets(toteId: "8779011e10f4462988f6b9b5364e9a00") {
    nodes {
      id
      toteId
      placement {
        status
        stake {
          currency {
            code
          }
          decimalAmount
        }
      }
      resulting {
        returns {
          totalAmount {
            decimalAmount
            currency {
              code
            }
          }
        }
      }
      settlement {
        status
      }
      ticket {
        id
        toteId
      }
    }
  }
}
  {
    "data": {
      "bets": {
        "nodes": [
          {
            "id": "bet-win-1",
            "toteId": "8779011e10f4462988f6b9b5364e9a00",
            "placement": {
              "status": "ACCEPTED",
              "stake": {
                "currency": {
                  "code": "GBP"
                },
                "decimalAmount": 1
              }
            },
            "resulting": {
              "returns": {
                "totalAmount": {
                  "decimalAmount": 10,
                  "currency": {
                    "code": "GBP"
                  }
                }
              }
            },
            "settlement": {
              "status": "SETTLED"
            },
            "ticket": {
              "id": "ticket-win-1",
              "toteId": "3c7238aa-1a4b-4482-9503-85799c7d2e7d"
            }
          }
        ]
      }
    }
  }

Settlement the bets

After a bets are settled the web socket or web socket will return a message. For each bet there is be individual request to the web socket.

BetCancelled

{
  "MessageType": "BetCancelled",
  "BetId": "66f2340f0c464ee5a55b5d42ed7fd49e"
}

BetResulted

{
  "MessageType": "BetResulted",
  "BetId": "72c330b977994628a19dea517f24ba95",
  "ReturnAmount": 10
}

BetSettled

{
  "MessageType": "BetSettled",
  "BetId": "f42eb3ed94a540438ab5344f6d9b1e13",
  "ReturnAmount": 15
}