...
Panel | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||
PlaceExecutionReport placeOrders ( StringmarketId , List< PlaceInstruction >instructions, String customerRef, MarketVersion marketVersion, String customerStrategyRef ) throws APINGException Place new orders into market. This operation is atomic in that all orders will be placed or none will be placed. Please note that additional bet sizing rules apply to bets placed into the Italian Exchange.
Since 1.0.0 |
Placing a Bet
To place a bet you require the marketId and selectionId parameters from the listMarketCatalogue API call. The below parameters will place a normal Exchange bet at odds of 3.0 for a stake of £2.0.
If the bet is placed successfully, a betId is returned in the placeOrders response
placeOrders Request
[ { "jsonrpc" : "2.0" , "method" : "SportsAPING/v1.0/placeOrders" , "params" : { "marketId" : "1.109850906" , "instructions" : [ { "selectionId" : "237486" , "handicap" : "0" , "side" : "LAY" , "orderType" : "LIMIT" , "limitOrder" : { "size" : "2" , "price" : "3" , "persistenceType" : "LAPSE" } } ] }, "id" : 1 } ] |
placeOrder Response
[ { "jsonrpc" : "2.0" , "result" : { "marketId" : "1.109850906" , "instructionReports" : [ { "instruction" : { "selectionId" : 237486 , "handicap" : 0 , "limitOrder" : { "size" : 2 , "price" : 3 , "persistenceType" : "LAPSE" }, "orderType" : "LIMIT" , "side" : "LAY" }, "betId" : "31242604945" , "placedDate" : "2013-10-30T14:22:47.000Z" , "averagePriceMatched" : 0 , "sizeMatched" : 0 , "status" : "SUCCESS" } ], "status" : "SUCCESS" }, "id" : 1 } ] |
Placing a Betfair SP Bet
To place a bet on a selection at Betfair SP, you need to specify the parameters below in the placeOrders request. The below example would place a Betfair SP back bet on the required selection for a stake of £2.00.
Request
placeOrders Request
[ { "jsonrpc" : "2.0" , "method" : "SportsAPING/v1.0/placeOrders" , "params" : { "marketId" : "1.111836557" , "instructions" : [ { "selectionId" : "5404312" , "handicap" : "0" , "side" : "BACK" , "orderType" : "MARKET_ON_CLOSE" , "marketOnCloseOrder" : { "liability" : "2" } } ] }, "id" : 1 } ] |
placeOrders Response
[ { "jsonrpc" : "2.0" , "result" : { "marketId" : "1.111836557" , "instructionReports" : [ { "instruction" : { "selectionId" : 5404312 , "handicap" : 0 , "marketOnCloseOrder" : { "liability" : 2 }, "orderType" : "MARKET_ON_CLOSE" , "side" : "BACK" }, "betId" : "31645233727" , "placedDate" : "2013-11-12T12:07:29.000Z" , "status" : "SUCCESS" } ], "status" : "SUCCESS" }, "id" : 1 } ] |
Fill or Kill bets
By setting the optional parameter ‘TimeInForce’ on a limitOrder submission to the value ‘FILL_OR_KILL’ and optionally passing a minFillSize value, the Exchange will only match the order if at least the specified minFillSize can be matched (if passed) or the whole order matched (if not). Any order which cannot be so matched, and any remaining unmatched part of the order (if minFillSize is specified) will be immediately cancelled.
...