Cashout

The cashout function calculates the price for the early sale of the betting slip by the player.

important

We only support combi bets for the cashout function.

Ensure that you don't transfer data from single-bet or system-bet tickets. A ticket with only one tip will be handled as a combi bet with one tip.

API Endpoint (POST only)

https://dataapi.oddsgigant-api.com/ApiR1/cashout

Parameters

All parameters except the ones within the caSettings object are required.

unixTimestamp

The timestamp the request is send as Unix time.

auth

Your identification code.

referenceID

Your id to identify this request, can be a betslip id.

stake

The stake the player bet for this betslip.

totalOdd

The multiplication off all odds for this betslip.

totalGain

The value the player would get if the betslip wins.

caSettings

Optional settings for the cashout.

  • taxRate (default 0): the tax rate will be subtracted in the end from the cashout value. 0 to disable it.

  • caWithdrawal (default 10): this value in % will be subtracted from the cashout value. A penalty the player must pay for the cashout.

  • maxCaValue (default 5000): the maximum value allowed for the cash out.

  • minCaValue (default 0.5): the minimum value allowed for the cash out.
    We recommend that you set this to 10% of the stake.

  • noCaOutOfLimits (default true): if true and the cashout value is higher as the maximum or lower than the minimum, the cashout fails and is set to 0. If false the cashout is set to the limits instead.

  • maxOpenTip (default 5): the maximum number of open tips allowed.

  • maxTipCount (default 15): the maximum number of tips allowed.

  • inplayMaxOddPerTip (default 6): the maximum value allowed for odd and oddcurrent if it is an in-play match.

    warning

    Never set this value too high. It is strongly recommended to use the default setting.

caBets

An array of objects representing the ticket's tips.

  • matchid: an id to identify the event
  • odd: the odd the player has bet on
  • oddcurrent: the current odd of this tip
  • gamestate: the current state of the event
    • 1 = event not started; odd and oddcurrent must be > 1
    • 2 = tip already lost; cashout fails and returns 0
    • 3 = tip already won; odd must be > 1; oddcurrent will be ignored
    • 4 = event currently running (in-play); odd and oddcurrent must be > 1
  • islocked: true / false; if the event is locked and the tip is open the cashout fails

POST body example

{
  "unixTimestamp": 1719826277,
  "auth": "a1b2c3d4e5f6",
  "referenceID": "677d53edb49a83a0b2b809c05a6c7ad3",
  "stake": 5,
  "totalOdd": 1.83,
  "totalGain": 9.15,
  "caSettings": {
    "taxRate": 0,
    "caWithdrawal": 10,
    "maxCaValue": 5000,
    "minCaValue": 0.5,
    "noCaOutOfLimits": true,
    "maxOpenTip": 5,
    "inplayMaxOddPerTip": 6,
    "maxTipCount": 15
  },
  "caBets": [
    {
      "matchid": "111",
      "odd": 1.22,
      "oddcurrent": 1.45,
      "gamestate": 4,
      "islocked": false
    },
    {
      "matchid": "222",
      "odd": 1.5,
      "oddcurrent": 1.35,
      "gamestate": 4,
      "islocked": false
    }
  ]
}