listMarketBook
Operation
List< MarketBook > listMarketBook#listMarketBook ( List<String>marketIds , PriceProjection priceProjection, OrderProjection orderProjection, MatchProjection matchProjection, boolean includeOverallPosition, boolean partitionMatchedByStrategyRef, Set<String> customerStrategyRefs, StringcurrencyCode,Stringlocale, Date matchedSince, Set<BetId> betIds) 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.
Please note: Separate requests should be made for OPEN & CLOSED markets. Requests that include both OPEN & CLOSED markets will only return those markets that are OPEN.
Please note: An illustration of the equivalent data as displayed on the Betfair website can be viewed here
Market 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.
Best Practice
Customers seeking to use listMarketBook to obtain price, volume, unmatched (EXECUTABLE) orders, and matched positions 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, unmatched orders and your evolving matched position with a reasonably fixed, minimally sized response.
Parameter name | Type | Required | Description |
---|---|---|---|
marketIds | List<String> | One or more market ids. The number of markets returned depends on the amount of data you request via the price projection. | |
priceProjection | The projection of price data you want to receive in the response. Please note: An illustration of the equivalent data priceProjection as displayed on the Betfair website can be viewed here | ||
orderProjection | The orders you want to receive in the response. | ||
matchProjection | If you ask for orders, specifies the representation of matches. | ||
includeOverallPosition | boolean | If you ask for orders, returns matches for each selection. Defaults to true if unspecified. | |
partitionMatchedByStrategyRef | boolean | If you ask for orders, returns the breakdown of matches by strategy for each selection. Defaults to false if unspecified. | |
customerStrategyRefs | Set<String> | If you ask for orders, restricts the results to orders matching any of the specified set of customer defined strategies. | |
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. | |
matchedSince | Date | If you ask for orders, restricts the results to orders that have at least one fragment matched since | |
betIds | Set<BetId> | If you ask for orders, restricts the results to orders with the specified bet IDs. Omitting this parameter means that all bets will be included in the response. Please note: A maximum of 250 betId's can be provided at a time. |
Return type | Description |
---|---|
List< MarketBook > | output data |
Throws | Description |
---|---|
Generic exception that is thrown if this operation fails for any reason. |
Since 1.0.0