4.5.1 Sample Procedure of executing GetPlacementInfo
In this example, lets use PostMan which is a plugin from Chrome. You could use this to do a test on our API.
The assumption here is that we are currently logged in and registered to the API. We wanted to place a bet on a match in Today Market.
GetPlacementInfo is normally called before you place a bet. Reason is that this gives you information that you can use before you place a bet. Example, the Minimum Amount, or Maximum Amount, the current scores, and the price that can be used.
To help the user identify what parameter is to be sent, first we get the odds :
The Parameter to send a GetPlacementInfo is :
{
“GameId”:{gameId from feed},
“GameType”:”{H|O|X}”,
“IsFullTime”:{1|0},
“Bookies”:”SIN,GA,..”,
“MarketTypeId”:{0,1,2},
“OddsFormat”:”{MY|00|HK}”,
“OddsName”:”{oddsName}”,
“SportsType”:{sportsType}
}
So what we need to do is use this as an HTTP Post and send to GetPlacementInfo
The data to be submitted are retrieved as shown below :
<h5>GameID</h5>
GameType
Type of game where the bets will place.
H is for HDP
O is for OverUnder
X is for 1X2 game
You will know the type of game by the identification such as shown below:
FullTimeHDP or HalfTimeHDP for HDP
FullTimeOu or HalftimeOu for Over/Under
FullTimeOneXTwo or HalfTimeOneXTwo for 1X2
Example:
IsFullTime
Determines if you want to bet a FullTime or HalfTime Game.
In an example, if we want to choose a FullTimeHDP then we will put the GameType as H and IsFullTime as 1. This will choose the FullTimeHDP.
For Halftime with GameType of Over/Under then we will use GameType as O and IsFullTime as 0
Bookies
This is a required field. If you want to only place a bet on a specific bookie and before placing a bet , you want to get the information for that specific bookie, you fill this in with what bookie you want to target. You can specify multiple bookies and is separated with ,..
The available bookies are identified as example below on BookieOdds :
MarketTypeID
You specify the Market you want to get the info from. This is 0 for live, 1 for today and 2 for early.
OddsFormat
Valid odds format are : MY for Malaysian Odds, 00 For Decima/Eurol, or HK for Hong Kong odds
OddsName
This specify if you want to place a bet for Home and Away for HDP, Over or Under for OU or Home, Away or Draw.
SportsType
1 for Football, 2 for Basketball.
Example
We added a Body for the request with this value :
{
“GameId”:1114634687,
“GameType”:”H”,
“IsFullTime”:1,
“MarketTypeId”:1,
“OddsFormat”:”MY”,
“OddsName”:”HomeOdds”,
“SportsType”:1,
“Bookies”:”ISN”
}
Once submitted, we got this reply
{
“Code”: 0,
“Result”: {
“OddsPlacementData”: [
{
“AwayName”: “Ceara CE”,
“AwayScore”: 0,
“Bookie”: “ISN”,
“Currency”: “EUR”,
“GameType”: “H”,
“HDPorGoal”: “0.0”,
“HomeName”: “Criciuma SC”,
“HomeOrAwayOrDraw”: “H”,
“HomeScore”: 0,
“IsFullTime”: true,
“LeagueName”: “BRAZIL SERIE B”,
“MarketTypeId”: 1,
“MaximumAmount”: 1331,
“Message”: null,
“MinimumAmount”: 10,
“OddPlacementId”: “1478584321053”,
“OddsFormat”: null,
“Price”: 0.6,
“Rejected”: false,
“SportsType”: 1
}
]
}
}