The limitOrder
function helps construct a bet order in the correct format.
limitOrder(size = 2,
price = NULL,
persistenceType = "LAPSE")
param | details |
---|---|
size |
the bet size, NB for a market of type EACH_WAY the total stake is 2 * size |
price |
the limit price, the price you at which you wish to strike your bet |
persistenceType |
what to do with the order at turn in play, three choices. LAPSE - lapse the order when the market goes in play (ie. cancel bet); PERSIST - persist the order at in-play, the bet will be placed automatically into the in-play market at the start of the event; MARKET_ON_CLOSE - put the order into the auction (SP) at turn in-play |
A simple list
The limitOnCloseOrder
function helps construct a bet order in the correct format.
limitOnCloseOrder(size = 2,
price = NULL)
param | details |
---|---|
size |
the bet size, NB, for a market type of EACH_WAY the total stake is 2 * size |
price |
the limit price, the price you wish to place your bet |
A simple list
The prepare_order
function helps contruct a bet, it is used inside the placeOrders
function so the arguments are exactly the same, the reason why I’m sharing it is in case you wish to see the list it constructs.
prepare_order(marketId,
selectionId,
orderType = "LIMIT",
handicap = "0",
side = "BACK",
limitOrder = limitOrder(),
limitOnCloseOrder = limitOnCloseOrder(),
marketOnCloseOrder = list())
param | details |
---|---|
marketId |
unique market id into which the bet will be placed |
selectionId |
the unique id for the selection in the market, this will be a horse, a team, etc, these ids can be found using the marketCatalogue and marketBook methods |
orderType |
the type of order, LIMIT - a normal exchange order for immediate execution, LIMIT_ON_CLOSE - limit oder for the auction (SP bet with a price limit), MARKET_ON_CLOSE - market order for the auction, SP bet regardless of price. |
handicap |
for ASIAN handicap markets (I believe!), default is 0 |
side |
BACK or LAY |
limitOrder |
list with details of the bet, required if orderType is LIMIT, use limitOrder to help construct correct list |
limitOnCloseOrder |
list with details of the bet, required if orderType is LIMIT_ON_CLOSE, use limitOnCloseOrder to help construct correct list |
marketOnCloseOrder |
single number, the size of your bet to be placed at Betfairs SP. |