Bets API
  1. Bets
Bets API
  • Bets
    • Places a multiple or a complex bet.
      POST
    • Places a single bet
      POST
    • /betslips
      POST
    • Returns available free bets
      GET
    • Retrieves the customer’s bet history.
      GET
    • Allows a trusted application to cash in a bet (take a return on a bet) on behalf of the customer
      PUT
  1. Bets

Retrieves the customer’s bet history.

GET
/history
Retrieves the customer’s bet history. Options are available to organise the history in terms of date, bet type and settled and unsettled bets. The maximum number of bets and bet history pages retrieved can also be set.

Request

Query Params

Header Params

Responses

🟢200Success
application/json
Body

🟠404Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://sandbox.whapi.com/v2/bets/history?dateFrom=&dateTo=' \
--header 'apiKey;' \
--header 'apiSecret;' \
--header 'apiTicket;'
Response Response Example
200 - response
{
 bets:
 [
 {
 id:"797",
 typeCode:"SGL",
 typeName:"Single",
 transDateTime:"2016-01-05 14:27:58",
 settled:false,
 stake:0.12,
 status:"N",
 winnings:0.26,
 estimatedReturns:0.26
 },
 {
 id:"798",
 typeCode:"SGL",
 typeName:"Single",
 transDateTime:"2016-01-05 15:27:58",
 numLines:5,
 numSelections:5,
 receipt:"O/0001370/0000132/F",
 settled:false,
 stake:0.13,
 cashinValue:0.12,
 stakePerLine:0.13,
 status:"A",
 winnings:0.26,
 estimatedReturns:0.26,
 freeBetValue:0.00,
 legs: 
 [
 {
 type:"W",
 number:1,
 parts:
 [
 {
 number:1,
 description:"Swansea",
 eventId:"OB_EV3966",
 eventDescription:"Swansea Vs Sunderland",
 priceDen:1,
 priceNum:1,
 priceType:"L",
 result:"-",
 startDateTime:"2016-01-07 20:00:00"
 },
 {
 number:1,
 description:"Swansea",
 eachWayNum:1,
 eachWayDen:1,
 eachWayPlaces:1
 eventId:"OB_EV3966",
 eventDescription:"Swansea Vs Sunderland",
 eventMarketDescription:"90 Minutes",
 eventTypeDescription:"Manchester Senior Cup",
 handicap:0.1,
 selectionId:"OB_OU00001",
 priceDen:1,
 priceNum:1,
 priceType:"L",
 result:"-",
 startDateTime:"2016-01-07 20:00:00",
 rule4Deductions:0.1,
 priceFormatted:
 {
 fractional:"EVS",
 decimal:2,
 american:"+100"
 } 
 }
 ]
 }
 ]
 }
 ]
}
Modified at 2023-08-16 06:51:28
Previous
Returns available free bets
Next
Allows a trusted application to cash in a bet (take a return on a bet) on behalf of the customer
Built with