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

Places a multiple or a complex bet.

POST
/bet/complex
Places a multiple or a complex bet.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://sandbox.whapi.com/v2/bets/bet/complex' \
--header 'apiKey;' \
--header 'apiSecret;' \
--header 'apiTicket;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "bets": [
        {
            "delayedBetId": "string",
            "freeBetId": "string",
            "legs": [
                {
                    "parts": [
                        {
                            "includeInMultiple": true,
                            "priceDen": 0,
                            "priceNum": 0,
                            "priceType": 0,
                            "selectionId": 0
                        }
                    ],
                    "sort": "string",
                    "type": "string"
                }
            ],
            "number": 0,
            "stake": 0,
            "typeCode": "string"
        }
    ]
}'
Response Response Example
200 - response
{
 "placedBets" : [
 {
 "id" : 51097,
 "number": 1,
 "receipt" : "O/0013333/0000109/F", 
 "numLines" : 1, 
 "totalStake" : 2.50, 
 "placedDateTime" : "2015-12-12T00:11:00"
 }, 
 {
 "id" : 51098, 
 "number": 2,
 "receipt" : "O/0013333/0000109/F", 
 "numLines" : 1, 
 "totalStake" : 2.50, 
 "placedDateTime" : "2015-12-12T00:11:00"
 }
 ]
}

Request

Query Params
fields
array[string]
optional
Specify an absolute field list to return (Comma Separated List)
include
array[string]
optional
Specify fields in addition to the default to return (Comma Separated List)
exclude
array[string]
optional
Specify fields from the default to exclude (Comma Separated List)
Header Params
apiKey
string 
required
A unique identifier of your application that is generated by the API portal.
apiSecret
string 
required
Another unique identifier for your application.
apiTicket
string 
required
The ticket obtained from the sessions API
Body Params application/json
bets
array[object (bet) {6}] 
optional
A collection of bets
delayedBetId
string 
optional
The delayed bet identifier
freeBetId
string 
optional
The ID number of the free bet token if used in conjunction with this bet
legs
array[object (leg) {3}] 
required
number
integer 
required
The bet number
stake
number <double>
required
The amount of the stake placed on the bet
typeCode
string 
required
The bet type code of the bet. For example: TBL (Treble)
Examples

Responses

🟢200Success
application/json
Body
array of:
id
string 
optional
The bet id
numLines
integer 
optional
The number of lines the bet consists of
number
number 
optional
Number of the bet if this is part of a multiple bet
placedDateTime
string 
optional
The time the bet was placed. For example: 2013-01-30TT13:34:20. The value of this element can be replaced with the current timestamp if it was missing.
receipt
string 
required
The unique ID of the bet receipt
totalStake
number <double>
optional
The total amount staked on the bet
🟢202Delayed
🟠400Errors
Modified at 2023-08-16 06:51:28
Next
Places a single bet
Built with