Requests
Initiating a WebSocket stream with cashout amounts (identical to those for our other feeds)
Cashout APISubscribe/unsubscribe requests:
{
betIds: ["id1","id2"]
}Success response: code 200, no body
Cashout request:
{
betId: "id1",
priceChange: 0,
amount: {
localAmount: 40000,
precision: 4,
currency: "USD",
}
}When sending a cashout request make sure the currency you send is the same as the one you used to place a bet.
PriceChange field affects whether the odds changes that happened (odds change will affect the cashout amount) will be ignored, or block the cashout request. If you leave it as 1, it means any cashout amount changes will be a blocker and request will be rejected (if changes are above a threshold of 2%). For these changes to be detected we require you to send us the last cashout amount you received from us (the one you show to the user), which we compare with the latest cashout amount on our side. If you set PriceChange to 2, it will ignore any odds changes and won't reject cashout requests even if the amount was changed drastically in a short period of time. Example: Current odds are 2.0 and the player placed a bet of 100$. Now, for example, he is allowed to cashout 90$. You get this value from the feed and send a cashout request with it to us. By the time your request reaches us, the odds change not in the favour of the player (or vice versa) and the cashout amount is now 85$. We calculate the difference between 85 and 90 and check if it is under a certain threshold. If you sent us PriceChange 2 then we ignore any difference and odds and proceed with cashing out 85, as it was the actual latest value on our side. If PriceChange: 1 and the difference exceeds 2% then we reject the request.
Success response:
{
success: true,
reason: null,
payload: {
localAmount: 40000,
betId: "id1",
}
}Rejection response:
{
Success: false,
Reason: "Reason why cashout can not be made"
Payload: {
LocalAmount: 40000,
BetId: "id1",
}
}
Last updated