Versions Compared

Key

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

Operation

...

Panel
bgColor#FFFFFF
titleBGColor#C8D0E4
titlelistMarketBook
List< MarketBook > listMarketBook ( List<String>marketIds , PriceProjection priceProjection, OrderProjection orderProjection, MatchProjection matchProjection,StringcurrencyCode,Stringlocale ) throws APINGException

Returns a list of dynamic data about markets. Dynamic data includes prices, the status of the market, the status of selections, the traded volume, and the status of any orders you have placed in the market. 

Info

Please noteMarket Data Request Limits apply to requests made to listMarketBook that include price or order projections.

Calls to listMarketBook should be made up to a maximum of 5 times per second to a single marketId.

Info
titleBest Practice

Customers seeking to use listMarketBook to obtain price, volume, unmatched (EXECUTABLE) orders and matched position in a single operation should provide an OrderProjectionof “EXECUTABLE” in their listMarketBook request and receive all unmatched (EXECUTABLE) orders and the aggregated matched volume from all orders irrespective of whether they are partially or fully matched. The level of matched volume aggregation (MatchProjection) requested should be ROLLED_UP_BY_AVG_PRICE or ROLLED_UP_BY_PRICE, the former being preferred. This provides a single call in which you can track prices, traded volume, their own unmatched orders and their your evolving matched position with a reasonably fixed, minimally sized response.

Parameter name

Type

Required

Description

marketIds

List<String>

(tick)

One or more market ids. The number of markets returned depends on the amount of data you request via the price projection.

priceProjection

PriceProjection

 

The projection of price data you want to receive in the response.

orderProjection

OrderProjection

 

The orders you want to receive in the response.

matchProjection

MatchProjection

 

If you ask for orders, specifies the representation of matches.

currencyCode

String

 

A Betfair standard currency code. If not specified, the default currency code is used.

locale

String

 

The language used for the response. If not specified, the default is returned.

Return type

Description

List< MarketBook >

output data

Throws

Description

APINGException

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

Since 1.0.0

 

Virtual Bets

 

The Betfair Exchange uses a 'cross matching' algorithm to display the best possible prices (bets) available by taking into account the back and lay offers (unmatched bets) across all selections.

Info

You can return virtual bets in the response when using API-NG by including the virtualise":"true" in the listMarketBook request e.g. [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "params": {"marketIds":["1.114101556"],"priceProjection":{"priceData":["EX_BEST_OFFERS"],"virtualise":"true"}}, "id": 1}] 

 

One of the easiest ways to understand how we generate virtual bets for cross matching is to work through a couple of examples.

...