/
v3.0.11Get access

cashout

Process cashout for a specific bet. Call only if cash_out field exists in bet history response

Request parameters:

Name
DescriptionTypeValuesDefaultSource
betId
The unique identifier of the specific bet the player wants to cash outnumber--
Key from responseid
price
The total cashout value offered by the system at the moment of the requestnumber---
mode
Defines the "Accept Changes" logicstring"alwaysAsk", "acceptAnyAmount", "acceptHigherAmount"--
partialPrice
Used for Partial Cashout. This is the specific portion of the total price the user wants to take now, leaving the remainder of the stake active on the original betnumber---

Call example:

cashout({
  betId: 6112168352,
  price: 0.5,
  mode: 'alwaysAsk'
})

Response examples:

{
  code: 0,
  rid: 1763804937,
  data: {
    result: 'Ok',
    result_text: null,
    details: {
      price: 0.5,
      new_price: 2
    }
  }
}

Response parameters:

NameDescriptionTypeValues
price
In the context of betting, this represents the current valuation or cashout offer.number-
new_price
In the context of betting, this represents the new pricenumber-