betfaiR

Different types of bets require differently formatted requests when bets are being placed, so a number of helper functions are available to make sure requests are correctly formatted, these functions include limitOrder and limitOnCloseOrder. Other helper functions existing for changing these orders.


limitOrder

This helper function is to be used with the placeOrders method when an orderType is LIMIT, to help construct the conditions of a bet.

arguments

param details
size the size of the best. NB. for a market type of EACH_WAY the total stake is 2 * size.
price the limit price
persistenceType what to do with the order when the market goes in-play. LAPSE (default) - lapse the order when the market goes in play. PERSIST - persist the order 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 in-play.

limitOnCloseOrder

This helper function is to be used with the placeOrders method when an orderType is LIMIT_ON_CLOSE, to help construct the conditions of a bet.

arguments

param details
size the size of the bet. NB. for a market type of EACH_WAY the total stake is 2 * size.
price the limit price

cancel_inst

This helper function is to be used with the cancelOrders method, to help cancel individual orders using their betIds.

arguments

param details
betId the unique betId, returned when the bet was placed, these can also be retrieved by the currentOrders method.
sizeReduction reduction size

replace_inst

This helper function is to be used with the cancelOrders method, to help replace individual orders using their betIds.

arguments

param details
betId the unique betId, returned when the bet was placed, these can also be retrieved by the currentOrders method.
newPrice new price to strike the bet

update_inst

This helper function is to be used with the updateOrders method, to help replace individual orders using their betId with new instructions for what to do when the market goes in-play.

arguments

param details
betId the unique betId, returned when the bet was placed, these can also be retrieved by the currentOrders method.
persistenceType new persistenceType, what to do when the market goes in-play. LAPSE - lapse the order when the market is turned in-play. PERSIST - persist the order 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.