Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
bgColor#FFFFFF
titleBGColor#C8D0E4
titleplaceOrders
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.

Parameter name

Type

Required

Description

marketId

String

(tick)

The market id these orders are to be placed on

instructions

List< PlaceInstruction >

(tick)

The number of place instructions.  The limit of place instructions per request is 200 for the UK/AUS Exchange and 50 for the Italian Exchange.

customerRef

String

 

Optional parameter allowing the client to pass a unique string (up to 32 chars) that is used to de-dupe mistaken re-submissions.   CustomerRef can contain: upper/lower chars, digits, chars : - . _ + * : ; ~ only. Please note: There is a time window associated with the de-duplication of duplicate submissions which is 60 seconds.

marketVersion

MarketVersion

 

Optional parameter allowing the client to specify which version of the market the 
orders should be placed on. If the current market version is higher than that sent on an order, 
the bet will be lapsed.

customerStrategyRef

String

 

An optional reference customers can use to specify which strategy has sent the order. 
The reference will be returned on order change messages through the stream API. The string is 
limited to 15 characters. If an empty string is provided it will be treated as null.

asyncboolean 

An optional flag (not setting equates to false) which specifies if the orders should be placed asynchronously. 
Orders can be tracked via the Exchange Stream API or or the API-NG by providing a customerOrderRef for each place order. 
An order's status will be PENDING and no bet ID will be returned. 

This functionality is available for all bet types - including Market on Close and Limit on Close

Return type

Description

PlaceExecutionReport

 

Throws

Description

APINGException

Generic exception that is thrown if this operation fails for any reason.

Since 1.0.0

...

If the bet is placed successfully, a betId is returned in the placeOrders response

 

placeOrders Request

 

Code Block
[
    {
        "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

 

Code Block

[
    {
        "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.

 

placeOrders Request

 

Code Block
[
    {
        "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

...