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
(default0
): the tax rate will be subtracted in the end from the cashout value.0
to disable it. -
caWithdrawal
(default10
): this value in % will be subtracted from the cashout value. A penalty the player must pay for the cashout. -
maxCaValue
(default5000
): the maximum value allowed for the cash out. -
minCaValue
(default0.5
): the minimum value allowed for the cash out.
We recommend that you set this to 10% of the stake. -
noCaOutOfLimits
(defaulttrue
): iftrue
and the cashout value is higher as the maximum or lower than the minimum, the cashout fails and is set to 0. Iffalse
the cashout is set to the limits instead. -
maxOpenTip
(default5
): the maximum number of open tips allowed. -
maxTipCount
(default15
): the maximum number of tips allowed. -
inplayMaxOddPerTip
(default6
): the maximum value allowed forodd
andoddcurrent
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 eventodd
: the odd the player has bet onoddcurrent
: the current odd of this tipgamestate
: the current state of the event1
= event not started;odd
andoddcurrent
must be > 12
= tip already lost; cashout fails and returns 03
= tip already won;odd
must be > 1;oddcurrent
will be ignored4
= event currently running (in-play);odd
andoddcurrent
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
}
]
}