Cashout API

Controls cashout feed

Cashout API allows to control which bets are included in the Cashout Feed.

Cashout Feed

As cashout real-time calculation can be very resource-consuming, we need to know which exact bets we should keep there.

Subscribe Endpoint

Allows to subscribe to a potential cashout amount for specific bets.

betIds should contain only ids of the bets (without player id).

Subscription will wear-out after 10 minutes.

In order to keep bets in the subscription, this endpoint should be called periodically to renew the subscription.

Potential cashout values will be sent via the Cashout Feed.

Cashout Feed

Subscribes to provided bets for realtime data

post
Authorizations
HTTPRequired

JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

Body
all ofOptional
Responses
post
/api/Cashout/subscribe
POST /api/Cashout/subscribe HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "betIds": [
    "text"
  ]
}

No content

Unsubscribe Endpoint

Allows to unsibscribe from cashout values for specific bets.

betIds should contain only ids of the bets (without player id).

Should be called when real-time cashout amount for specific bets is not needed anymore (when player leaves the bet history page or moves to another page).

Unsubscribes from provided bets to stop realtime data

post
Authorizations
HTTPRequired

JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

Body
all ofOptional
Responses
post
/api/Cashout/unsubscribe
POST /api/Cashout/unsubscribe HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "betIds": [
    "text"
  ]
}

No content

Cashout Endpoint

Allows to perform cashout of the bet with risk management check.

Odds88 will perform validation of cashout possibility and cashout amount.

Tries to cashout a bet.

post
Authorizations
HTTPRequired

JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

Body
all ofOptional
Responses
post
/api/Cashout
POST /api/Cashout HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 91

{
  "betId": "text",
  "priceChange": 1,
  "amount": {
    "localAmount": 1,
    "precision": 1,
    "currency": "text"
  }
}
{
  "success": true,
  "reason": "text",
  "payload": {
    "betId": "text",
    "localAmount": 1
  }
}

Last updated