Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

This method places a single bet to the book. Note : It is recommended to call GetPlacementInfo method BEFORE you execute a PlaceBet method. If not done, PlaceBet will do an internal call to GetPlacementInfo if a prior call to GetPlacementInfo has not been done. PlaceBet uses some internal values returned and processed by GetPlacementInfo. If these informations are not available within our internal cache, the PlaceBet method will fail.

Request

Method

URL

POST

/AsianOddsService/PlaceBet

JSON REQUEST BODY

{
"PlaceBetId":"{uniqueID (optional)}",
"GameId":{gameId from feed},
"GameType":"{H|O|X}",
"IsFullTime":{1|0},
“MarketTypeId”:{0,1,2},
"OddsFormat":"{MY|00|HK}",
"OddsName":"{oddsName}",
"SportsType":{sportsType},
"AcceptChangedOdds":{1|0},
"BookieOdds":"ISN:-0.84,SBO:-0.75,..",
"Amount":5
}

Type

Params

Values

HEAD

AOToken

string

HEAD

Accept

application/json

POST

isFullTime

int

POST

MarketTypeId

int

POST

PlaceBetId

string

POST

gameId

long

POST

gameType

string

POST

oddsName

string

POST

oddsFormat

string

POST

BookieOdds

string

POST

AcceptChangeOdds

int

Request Values

Value

What is this for

AOToken

Token generated also by the Login method. This token identifies which user is requesting or executing the API Method. This has to be sent for all of the request except during execution of the Login method

accept

application/json

isFullTime

1 if fulltime, 0 if not

MarketTypeId

1 for Football, 2 for Basketball

PlaceBetId

(Optional) PlaceBetId is optional and should be no more than 40 characters in length. Whenever provided, this will be considered an identifier to your bet. This is returned as BetPlacementReference under GetBets or GetRunningBet. You can also use this ID as a parameter for GetBetByReference to get the status of the bet that was placed.

gameId

GameID from the GetFeeds. Pertains to the Id from the game.

gameType

Type of game where the bets will place.
H is for HDP
O is for OverUnder
X is for 1X2 game

oddsName

Where the bets will be placed. Here are the valid values :
If GameType is H then :
● AwayOdds -Value of the AwayOdds from Feed under HDP
● HomeOdds -Value of Home Odds from Feed under HDP
If GameType is O then
● OverOdds -Value of OverOdds from Feed
● UnderOdds -Value of UnderOdds from Feed
If GameType is X then
● AwayOdds -Value of AwayOdds from Feed under OneXTwos
● DrawOdds -Value of DrawOdds from Feed under OneXTwos
● HomeOdds -Value of HomeOdds from Feed under OneXTwos

oddsFormat

Format of Odds. Valid Values are :
MY
00
HK
This field is Required.

acceptChangedOdds

1 if true (meaning that lower odds will be automatically accepted) or 0 if false (reject if the odds became lower). If the odds has changed to better/higher, then the bet will be placed regardless of the value of AcceptChangedOdds.

Amount

Amount to be placed.

BookieOdds

Specifies what type of odds you are placing the bet. The value of the odds is the same what you get from GetFeeds or GetPlacementInfo. For different books, they are to be separated by comma.

Sample JSON Response

Response Type

Response

Success

{
"Code": 0,
"Result": {
"BetPlacementReference": "WA-12345678",
"Message": "Bet has been placed. Check GetBets() or GetRunningBets() to receive the status of the bet using the BetPlacementReference"
}
}
NOTE : BetPlacementReference is an identifier that allows the developers to check the status via GetBets or GetBetsByReference Method.A similar betplacementreference will be issued on the same ticket that was processed by the Bookie.

Fail

{
"Code": -1,
"Result": {
"PlacementData": null
}
}

  • No labels