Betting API

Endpoints

Please find the details for the current Betting API endpoints.  

All API requests should be sent as POST.

If you have an Italian or Spanish Exchange account please see:

Global Exchange

Interface

Endpoint

JSON-RPC Prefix

<method> Example

JSON-RPC

https://api.betfair.com/exchange/betting/json-rpc/v1

<method>

SportsAPING/v1.0/listMarketBook

JSON REST

https://api.betfair.com/exchange/betting/rest/v1.0/

listMarketBook/

New Zealand Customers - New Zealand based customer must use the following endpoints

New Zealand Customers

Interface

Endpoint

JSON-RPC Prefix

<method> Example

JSON-RPC

https://api.betfair.com.au/exchange/betting/json-rpc/v1

<method>

SportsAPING/v1.0/listMarketBook

JSON REST

https://api.betfair.com.au/exchange/betting/rest/v1.0/

listMarketBook/

Operation Summary

Type

Operation

Description

List< EventTypeResult >

listEventTypes ( MarketFilter filter ,Stringlocale )

Returns a list of Event Types (i.e. Sports) associated with the markets selected by the MarketFilter.

List< CompetitionResult >

listCompetitions ( MarketFilter filter ,Stringlocale )

Returns a list of Competitions (i.e., World Cup 2013) associated with the markets selected by the MarketFilter. Please note: Specific eventTypes (horse racing & greyhounds) are not associated with specific competitions. These eventTypes are only associated with Venues (see listVenues)

List< TimeRangeResult >

listTimeRanges ( MarketFilter filter TimeGranularity granularity )

Returns a list of time ranges in the granularity specified in the request (i.e. 3PM to 4PM, Aug 14th to Aug 15th) associated with the markets selected by the MarketFilter.

List< EventResult >

listEvents ( MarketFilter filter ,Stringlocale )

Returns a list of Events (i.e, Reading vs. Man United) associated with the markets selected by the MarketFilter.

List< MarketTypeResult >

listMarketTypes ( MarketFilter filter ,Stringlocale )

Returns a list of market types (i.e. MATCH_ODDS, NEXT_GOAL) associated with the markets selected by the MarketFilter. The market types are always the same, regardless of locale.

List< CountryCodeResult >

listCountries ( MarketFilter filter ,Stringlocale )

Returns a list of Countries associated with the markets selected by the MarketFilter.

List< VenueResult >

listVenues ( MarketFilter filter ,Stringlocale )

Returns a list of Venues (i.e. Cheltenham, Ascot) associated with the markets selected by the MarketFilter. Please note: Only horse racing & greyhound markets are associated with a Venue.

List< MarketCatalogue >

listMarketCatalogue ( MarketFilter filter ,Set< MarketProjection >marketProjection, MarketSort sort, int maxResults, Stringlocale )

Returns a list of information about published (ACTIVE/SUSPENDED) markets that does not change (or changes very rarely).

List< MarketBook >

listMarketBook ( List<String>marketIds , PriceProjection priceProjection, OrderProjection orderProjection, MatchProjection matchProjection,StringcurrencyCode,Stringlocale, Date matchedSince, Set<BetId> betIds )

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

List<MarketBook>

List<MarketBook> listRunnerBook ( MarketId marketIdSelectionId selectionId, double handicap, 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 a market and a specified runner. 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..

List<MarketProfitAndLoss>

listMarketProfitAndLoss ( Set<MarketId> marketIds, boolean includeSettledBets, boolean includeBspBets, boolean netOfCommission )

Retrieve profit and loss for a given list of OPEN markets. The values are calculated using matched bets and optionally settled bets

CurrentOrderSummaryReport

listCurrentOrders ( Set<String>betIds,Set<String>marketIds, OrderProjection orderProjection, TimeRangeplacedDateRange, OrderBy orderBy, SortDir sortDir,intfromRecord,intrecordCount )

Returns a list of your current orders.

ClearedOrderSummaryReport

 listClearedOrders ( BetStatus betStatus, Set<EventTypeId> eventTypeIds, Set<EventId> eventIds, Set<MarketId> marketIds, Set<RunnerId> runnerIds, Set<BetId> betIds, Side side, TimeRange settledDateRange, GroupBy groupBy, boolean includeItemDescription, String locale, int fromRecord, int recordCount )

Returns a list of settled bets based on the bet status, ordered by settled date

PlaceExecutionReport

placeOrders ( StringmarketIdList<PlaceInstruction> instructions, StringcustomerRef, MarketVersion marketVersion, String customerStrategyRef, boolean async)

Place new orders into market.

CancelExecutionReport

cancelOrders  ( StringmarketIdList<CancelInstruction>instructions, StringcustomerRef )

Cancel all bets OR cancel all bets on a market OR fully or partially cancel particular orders on a market

ReplaceExecutionReport

replaceOrders ( StringmarketIdList< ReplaceInstruction> instructions, StringcustomerRef, MarketVersion marketVersion, boolean async)

This operation is logically a bulk cancel followed by a bulk place. The cancel is completed first then the new orders are placed.

UpdateExecutionReport

updateOrders ( StringmarketIdList< UpdateInstruction> instructions, StringcustomerRef )

Update non-exposure changing fields