Betfair Developers

Versions Compared

Key

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

...

Table of Content Zone

Understanding Market Navigation

 

Info
titleRecreating Website Navigation?

Please note:  if you want to recreate the exact navigation hierarchy used by the Betfair website, please use the Navigation Data for Applications service.

In the Betfair Exchange API, navigating markets uses the concepts of faceted search. You've probably seen faceted search used on sites like eBay or Amazon where you pick a category, for example "Shoes" and then you see a list of shoes. Then, you can narrow your search by facets. For example, by colour or price. In a similar way, the new Sports API lets you find markets you're interested in and then get data back about a facet of those markets. 

The way to think of the API Navigation operations is to imagine a single table that lists every market, along with various metadata about the market. The columns of the table are the Facets (and the Nav Operations in API return some of them in combination):



As you can see, the table has four markets along with some of the metadata associated with that market. Of course, the actual table would have tens of thousands of markets and more columns. 

Along the top, you can see three of the navigation operations. Each of those operations takes a "MarketFilter". The MarketFilter filters the table of markets and selects the ones that match. The MarketFilter can contain things like "going in play" or "eventId 7", etc. So, if you called "listCompetitions" and passed in a filter that looked like:
Code:

{ "filter": {"turnsInPlay" : true }}

The selected markets would look like:



In the example, the 1001, 2355, and the 5621 market are the ones that match the filter. As you called "listCompetitions" with that filter, then the data returned is the columns containing competition information:



In this example, you'd get a list of competitions like so:


Code:

{"competitionId" : "23", "competitionName" : "World Cup 2013"}

Notice that the competition "Final 2013" was not returned. This is because the market was not selected by the MarketFilter. Also, notice that although the market 2355 was selected by the MarketFilter, it is not associated with a competition, so no competition id and name were returned for that market. 

As a further example, suppose that you used the same MarketFilter as before while calling listEvents. In that case, the data returned is the columns containing eventId and eventName for the markets that match the filter (i.e., turnsInPlay = True):



In this example, you'd get a list of events like so:


Code:

[{"eventId" : "24", "eventName" : "Arsenal Vs. Reading"}, {"eventId" : "124", "eventName" : "Ascot 16th September"}, {"eventId" : "23", "eventName" : "Cheltenham 17th September"}]

Again, notice that the event "Celtics vs Nicks" was not returned because it was not selected by the MarketFilter.

One further example. Suppose you were only interested in Line markets and you want to find all of the Sports (EventTypes) that contain Line markets. You would create a MarketFilter like this:


Code:

{ "filter": {"MarketBettingType" : "LINE" }}

And call listEventTypes with that filter. The markets selected by that MarketFilter would be:



and the data returned would be:




Code:

{"eventTypeId" : "4", "EventTypeName" : "Basketball"}

Using the set of navigation operations, you can easily create a menu tree of markets in whatever hierarchy you want. You can can listEventTypes to get the Sports as the top of your menu. Or, you could call "listCountries" and use markets in a country as the root of the tree. 

There is also listMarketCatalogue so if you didn't care about creating a visual navigation, you could simply call listMarketCatalogue with a MarketFilter defining the markets you're interested in and get back information about those markets. 

Betfair Price Increments

Below is a list of price increments per price 'group'.  Placing a bet outside of these increments will result in an INVALID_ODDS error.

The Betfair Price increment used for a market is defined by the PriceLadderType returned within the Market Description (listMarketCatalogue / Market Definition (Exchange Stream API).

CLASSIC

PriceIncrement
1.01 → 20.01
2→ 30.02
3 → 40.05
4 → 60.1
6 → 100.2
10 → 200.5
20 → 301
30 → 502
50 → 1005
100 → 100010

FINEST

PriceIncrement
1.01 → 10000.01

 

LINE_RANGE

PriceIncrement (Interval)
0.1 → 1000Specified by Market Line Range Info

Common Error Codes

MeaningFaultCodeClient/ServerAssociated HTTP Transport Response CodeComments

DSC-0008

JSONDeserialisationParseFailure

Client

400

 
DSC-0009ClassConversionFailureClient400Invalid format for parameter, for example passing a string where a number was expected. Can also happen when a value is passed that does not match any valid enum.

DSC-0015

SecurityException

Client

403

Credentials supplied in request were invalid

DSC-0018MandatoryNotDefinedClient400A parameter marked as mandatory was not provided
DSC-0019TimeoutServer504The request has timed out
DSC-0021NoSuchOperationClient404The operation specified does not exist
DSC-0023NoSuchServiceClient404 
DSC-0024RescriptDeserialisationFailureClient400Exception during deserialization of RESCRIPT request
DSC-0034UnknownCallerClient400A valid and active App Key hasn't been provided in the request. Please check that your App Key is active. Please see Application Keys for further information regarding App Keys.
DSC-0035UnrecognisedCredentialsClient400 
DSC-0036InvalidCredentialsClient400 
DSC-0037SubscriptionRequiredClient403The user is not subscribed to the App Key provided
DSC-0038OperationForbiddenClient403The App Key sent with the request is not permitted to access the operation

 

Currency Parameters

 

Guide to available currencies and minimum bet sizes.

Currency name

Symbol

Currency Code

Min Bet Size

Min Deposit Size

Minimum BSP Liability

 

Minimum Bet Payout
UK Sterling£GBP2101010
EuroEUR2152020
US DollarUS$USD4152020
Hong Kong DollarsHK$HKD25150125125
Australian DollarAUDAUD5303030
Canadian DollarCADCAD6253030
Danish KronerDKKDKK30150150150
Norwegian KronorNOKNOK30150150150
Swedish KronaSEKSEK30150150150
Singapore DollarSGDSGD6303030
Romanian LeuRONRON1025 (Paysafe) 40 (Card)50 

Locale Specification

The locale specification determines the language returned for names of sports and markets. It is an optional parameter you can specify when you want to retrieve names in a language that differs from the language specified for the account. For example, if the account language is specified as English, you can use the locale parameter to retrieve non-English sport or market names.

The language code is based on the ISO 639-1 standard which defines two-letter codes, such as "en" and "fr".

The follow languages are available, but please be aware not all markets in all languages are fully translated: 

Language
Locale Code

English

Danish

Swedish

German

Italian

Greek

Spanish

Turkish

Korean

Czech

Bulgarian

Russian

French

Thai

en

da

sv

de

it

el

es

tr

ko

cs

bg

ru

fr

th

Racecourse Abbreviations

Racecourse abbreviations lists for Horse Racing and Greyhounds is available via the spreadsheet below:

View file
nameHorse Racing Abbreviations June 2018.xls
height150250

 

Runner Metadata Description

The RUNNER_METADATA returned by listMarketCatalogue for Horse Racing (when available) is described in the table below.

 

Parameter
Description
Example
WEIGHT_UNITSThe unit of weight used.pounds
ADJUSTED_RATINGAdjusted ratings are race-specific ratings which reflect weights allocated in the race and, in some circumstances, the age of the horse. Collectively they represent the chance each runner has on form. https://www.timeform.com/Racing/Articles/How_the_ratings_for_a_race_are_calculated Please note: this data is only returned for those with a Premium Timeform subscription79
DAM_YEAR_BORNThe year the horse’s mother's birth1997
DAYS_SINCE_LAST_RUNThe number of days since the horse last ran66
WEARINGAny extra equipment the horse is wearingtongue strap
DAMSIRE_YEAR_BORNThe year in which the horse's grandfather was born on its mothers side1988
SIRE_BREDThe country were the horse's father was bredIRE
TRAINER_NAMEThe name of the horse's trainerFergal O'Brien
STALL_DRAWThe stall number the horse is starting from10
SEX_TYPEThe sex of the horsef
OWNER_NAMEThe owner of the horseMr M. C. Fahy
SIRE_NAMEThe name of the horse's fatherRevoque
FORECASTPRICE_NUMERATORThe forecast price numerator13
FORECASTPRICE_DENOMINATORThe forecast price denominator8
JOCKEY_CLAIMThe reduction in the weight that the horse carries for a particular jockey were applicable.5

WEIGHT_VALUE

The weight of the horse163
DAM_NAMEThe name of the horse's motherRare Gesture
AGEThe age of the horse7
COLOUR_TYPEThe colour of the horseb
DAMSIRE_BREDThe country were the horse's grandfather was bornIRE
DAMSIRE_NAMEThe name of the horse's grandfatherShalford
SIRE_YEAR_BORNThe year the horse's father was born1994
OFFICIAL_RATINGThe horses official rating97
FORMThe horses recent form212246
BREDThe country in which the horse was bornIRE

runnerId

 

The runnerId for the horse

62434983
JOCKEY_NAMEThe name of the jockey. Please note: This field will contain 'Reserve' in the event that the horse has been entered into the market as a reserve runner. Any reserve runners will be withdrawn from the market once it has been confirmed that they will not run.Paddy Brennan
DAM_BREDThe country where the horse's mother was bornIRE
COLOURS_DESCRIPTIONThe textual description of the jockey silkRoyal blue and black check, white sleeves and cap
COLOURS_FILENAMEA relative URL to an image file corresponding to the jockey silk. You must add the value of this field to the base URL:

https://content-cache.cdnbf.net/feeds_images/Horses/SilkColours/

Please note - silk cloth images aren't provided for US Racing. The saddlecloth images used for US racing can be view via https://sn4.cdnbf.net/exchange/plus/images/app/common/assets/images/saddlecloths-sprite_2608_.gif

c20170823trots_BATHURST/1109899.png
CLOTH_NUMBERThe number on the saddle-cloth5
CLOTH_NUMBER ALPHAThe number on the saddle-cloth. For US Racing were the runner is paired, this field will display the cloth number of the paired runner e.g. "1A"1A

Terms of use:  Please refer to http://form.timeform.betfair.com/termsofuse regarding the above data.

 

Time Zones & Time Format

All times are returned in GMT and are in ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) format. They can be converted to your local timezone using the timezone field returned by the getAccountDetails operation or into the local market timezone using the timezone returned for the event by listMarketCatalogue

To synchronize with the Betfair server time we recommend that you use the pool of NTP servers listed via http://www.pool.ntp.org/zone/europe 

The following table lists the time zones returned be the API along with their meaning.

Location

Abbreviation

Notes

Africa/Johannesburg

RSA

 

America/Costa_Rica

SJMT

 

America/Indiana/Indianapolis

IEST

North America Indiana East

America/Santiago

SMT

 

Asia/Bangkok

THAI

 

Asia/Calcutta

INT

 

Asia/Dubai

UAE

 

Australia/Adelaide

ACST

 

Australia/Darwin

ANST

 

Australia/Perth

AWST

 

Australia/Queensland

AQST

 

Australia/Sydney

AEST

 

Brazil/East

BRT

 

Brazil/West

AMT

 

CET

CET

Central European Time

EET

EET

Eastern European Time

Etc/GMT-5

PKT

 

Europe/London

UKT

 

Europe/Moscow

MSK

 

GMT/UTC

GMT/UTC

Greenwich Mean Time/Coordinated Universal Time

Hongkong

HK

 

Jamaica

KMT

 

Japan

JPT

 

NZ

NZT

New Zealand

US/Alaska

AKST

 

US/Arizona

AST

 

US/Central

CST

 

US/Eastern

EST

 

US/Hawaii

HST

 

US/Mountain

MST

 

US/Pacific

PST

 

 

Anchor
Virtual
Virtual

Virtual Bets

The Betfair Exchange tries to match bets against the bets placed by other users as well as equivalent bets where possible. 

For example, if a customer backs Player A in a tennis match at odds of 2.0, the exchange matches any lay bet at odds of 2.0 or better on Player A. In addition, the Exchange also calculates all possible matches that are equivalent to a lay bet on Player A. So, if a customer backs Player B at odds of 2.0 or better, the Exchange matches it with the back bet on Player A. 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.

 

 

Tip

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}] 

You should subscribe to the EX_BEST_OFFERS_DISP MarketDataFlter if using the Exchange Stream API

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

Consider the following market and what would happen if we placed a very large back bet at 1.01 on The Draw:



Without cross matching, this bet would be matched in three portions;

1) £150 at 5.0,
2) £250 at 3.0, 
and £999 at 1.01 with anything remaining being left unmatched.

With cross matching we can do better.

We have a back bet on Newcastle for £120 at 2.0 and a back bet on Chelsea for £150 at 3.0 (shown in pink on the available to lay side of the market).

 

These two bets can be matched against a back bet on The Draw at a price of 6.0, since 2.0, 3.0, and 6.0 form a 100% book.  To ensure that the book is balanced, we choose the stakes to be inversely proportional to the prices. 

This means that we take the full £120 at 2.0 on Newcastle, only £80 at 3.0 on Chelsea, and £40 at 6.0 on The Draw, which is the first virtual bet

We now have a back bet on Newcastle for £75 at 2.5 and a back bet on Chelsea for £70 at 3.0 (again shown in pink on the available to lay side of the market).

These two bets can be matched against a back bet on The Draw at a price of 3.75, since 2.5, 3.0, and 3.75 also form a 100% book.

Balancing the stakes means that we need to take the full £75 at 2.5 on Newcastle, only £62.50 at 3.0 on Chelsea, and £50 at 3.75 on The Draw, which is the second virtual bet. Since 3.75 is less than 5.0, the £150 at 5.0 would be matched first followed by £50 at 3.75.  If we continued this process we would get further matching at 1.50 and 1.05, but for the purposes of displaying the market view we have the best 3 prices for the available to back bets on The Draw, and so we can stop calculating the virtual bets.  The virtual bets are just the bets that would have been matched had we received a sufficiently large back bet at 1.01; in this example, £40 at 6.0 and £50 at 3.75.  We take these virtual bets and merge them with the existing bets on the market to generate the following market view (with the virtual bets shown in green)

The process is repeated to obtain the virtual lay bets (available to back bets) for Newcastle and Chelsea.

Here we have a slightly different market (as before, chosen to make the numbers nice) and consider what would happen if we placed a very large lay bet at 1000 on The Draw.

 

Without cross matching, this bet would be matched in three portions; 1) £100 at 10.0, 2) £50 at 50.0, and £2 at 1000 with anything remaining being left unmatched.  With cross matching we can do better.  We have a lay bet on Newcastle for £300 at 2.0 and a lay bet on Chelsea for £150 at 3.0 (shown in blue on the available to back side of the market).  These two bets can be matched against a lay bet on The Draw at a price of 6.0, since 2.0, 3.0, and 6.0 form a 100% book.  To ensure that the book is balanced, we choose the stakes to be inversely proportional to the prices.  This means that we take only £225 at 2.0 on Newcastle, the full £150 at 3.0 on Chelsea, and £75 at 6.0 on The Draw, which is the first virtual bet. 

Assuming these bets got matched, the market would look like this:

 

 We now have a lay bet on Newcastle for £75 at 2.0 and a lay bet on Chelsea for £250 at 2.4 (again shown in blue on the available to back side of the market).  These two bets can be matched against a lay bet on The Draw at a price of 12.0, since 2.0, 2.4, and 12.0 also form a 100% book.  Balancing the stakes means that we need to take the full £75 at 2.0 on Newcastle, only £62.50 at 2.4 on Chelsea, and £12.50 at 12.0 on The Draw, which is the second virtual bet. 

This leaves the following market:

 

This time we can't continue the process since there is no valid price for a virtual bet on The Draw that would result in a 100% book, and so we can stop calculating the virtual bets.  Again, the virtual bets are just the bets that would have been matched had we received a sufficiently large lay bet at 1000; in this example, £75 at 6.0 and £12.50 at 12.0. We take these virtual bets and merge them with the existing bets on the market to generate the following market view (with the virtual bets shown in orange):



Account Statement - Resettlement Lifecycle

The below demonstrates the resettlement lifecycle and how this is represented via the getAccountStatement output.

In the first file, the back bet on Landskrona was settled as winner, and so we see two entries for that bet:

-          The initial debit (RESULT_NOT_APPLICABLE)

-          The profit from winning the bet (RESULT)

Code Block
titleInitial Settlement
collapsetrue
{
    "jsonrpc": "2.0",
    "result": {
        "accountStatement": [
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T09:30:27.000Z",
                "amount": -0.9,
                "balance": 1000034.2,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":0.0,\"betSize\":0.0,\"betType\":\"B\",\"betCategoryType\":\"NONE\",\"commissionRate\":\"5%\",\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":18.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T09:27:58.000Z\",\"selectionId\":0,\"selectionName\":null,\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"ACCOUNT_DEBIT\",\"transactionId\":0,\"winLose\":\"RESULT_NOT_APPLICABLE\"}"
                },
                "legacyData": {
                    "avgPrice": 0,
                    "betSize": 0,
                    "betType": "B",
                    "betCategoryType": "NONE",
                    "commissionRate": "5%",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 18,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T09:27:58.000Z",
                    "selectionId": 0,
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "ACCOUNT_DEBIT",
                    "transactionId": 0,
                    "winLose": "RESULT_NOT_APPLICABLE"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T09:30:27.000Z",
                "amount": 18,
                "balance": 1000035.1,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":10.0,\"betSize\":2.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":0.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T09:27:58.000Z\",\"selectionId\":130432,\"selectionName\":\"Landskrona\",\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"ACCOUNT_CREDIT\",\"transactionId\":0,\"winLose\":\"RESULT_WON\"}"
                },
                "legacyData": {
                    "avgPrice": 10,
                    "betSize": 2,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 0,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T09:27:58.000Z",
                    "selectionId": 130432,
                    "selectionName": "Landskrona",
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "ACCOUNT_CREDIT",
                    "transactionId": 0,
                    "winLose": "RESULT_WON"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841762387",
                "itemDate": "2018-06-07T09:14:03.000Z",
                "amount": -0.9,
                "balance": 1000051.3,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":0.0,\"betSize\":0.0,\"betType\":\"B\",\"betCategoryType\":\"NONE\",\"commissionRate\":\"5%\",\"eventId\":102833966,\"eventTypeId\":7,\"fullMarketName\":\"GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd\",\"grossBetAmount\":18.0,\"marketName\":\"2m Hcap Hrd\",\"marketType\":\"O\",\"placedDate\":\"2018-06-06T16:37:13.000Z\",\"selectionId\":0,\"selectionName\":null,\"startDate\":\"2018-06-06T12:40:00.000Z\",\"transactionType\":\"ACCOUNT_DEBIT\",\"transactionId\":0,\"winLose\":\"RESULT_NOT_APPLICABLE\"}"
                },
                "legacyData": {
                    "avgPrice": 0,
                    "betSize": 0,
                    "betType": "B",
                    "betCategoryType": "NONE",
                    "commissionRate": "5%",
                    "eventId": 102833966,
                    "eventTypeId": 7,
                    "fullMarketName": "GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd",
                    "grossBetAmount": 18,
                    "marketName": "2m Hcap Hrd",
                    "marketType": "O",
                    "placedDate": "2018-06-06T16:37:13.000Z",
                    "selectionId": 0,
                    "startDate": "2018-06-06T12:40:00.000Z",
                    "transactionType": "ACCOUNT_DEBIT",
                    "transactionId": 0,
                    "winLose": "RESULT_NOT_APPLICABLE"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841762387",
                "itemDate": "2018-06-07T09:14:03.000Z",
                "amount": 18,
                "balance": 1000052.2,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":10.0,\"betSize\":2.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102833966,\"eventTypeId\":7,\"fullMarketName\":\"GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd\",\"grossBetAmount\":0.0,\"marketName\":\"2m Hcap Hrd\",\"marketType\":\"O\",\"placedDate\":\"2018-06-06T16:37:13.000Z\",\"selectionId\":4700101,\"selectionName\":\"Catchin Time\",\"startDate\":\"2018-06-06T12:40:00.000Z\",\"transactionType\":\"ACCOUNT_CREDIT\",\"transactionId\":0,\"winLose\":\"RESULT_WON\"}"
                },
                "legacyData": {
                    "avgPrice": 10,
                    "betSize": 2,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102833966,
                    "eventTypeId": 7,
                    "fullMarketName": "GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd",
                    "grossBetAmount": 0,
                    "marketName": "2m Hcap Hrd",
                    "marketType": "O",
                    "placedDate": "2018-06-06T16:37:13.000Z",
                    "selectionId": 4700101,
                    "selectionName": "Catchin Time",
                    "startDate": "2018-06-06T12:40:00.000Z",
                    "transactionType": "ACCOUNT_CREDIT",
                    "transactionId": 0,
                    "winLose": "RESULT_WON"
                },
                "itemClass": "UNKNOWN"
            }
        ],
        "moreAvailable": false
    }
}

In the second example, the market was unsettled, and we see four entries:

-          The two entries described above are still present but tagged with RESULT_ERR

-          An entry to revert the commission payed (tagged with COMMISSION_REVERSAL and RESULT_FIX)

-          An entry to undo the payout from the winning bet (tagged with RESULT_FIX)

Code Block
titleMarket Unsettled
collapsetrue
{
    "jsonrpc": "2.0",
    "result": {
        "accountStatement": [
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T13:20:10.000Z",
                "amount": 0.9,
                "balance": 1000034.2,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":0.0,\"betSize\":0.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":0.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T13:20:10.000Z\",\"selectionId\":0,\"selectionName\":null,\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"COMMISSION_REVERSAL\",\"transactionId\":0,\"winLose\":\"RESULT_FIX\"}"
                },
                "legacyData": {
                    "avgPrice": 0,
                    "betSize": 0,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 0,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T13:20:10.000Z",
                    "selectionId": 0,
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "COMMISSION_REVERSAL",
                    "transactionId": 0,
                    "winLose": "RESULT_FIX"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T13:20:10.000Z",
                "amount": -18,
                "balance": 1000033.3,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":0.0,\"betSize\":0.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":0.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T13:20:10.000Z\",\"selectionId\":0,\"selectionName\":null,\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"ACCOUNT_DEBIT\",\"transactionId\":0,\"winLose\":\"RESULT_FIX\"}"
                },
                "legacyData": {
                    "avgPrice": 0,
                    "betSize": 0,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 0,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T13:20:10.000Z",
                    "selectionId": 0,
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "ACCOUNT_DEBIT",
                    "transactionId": 0,
                    "winLose": "RESULT_FIX"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T09:30:27.000Z",
                "amount": -0.9,
                "balance": 1000034.2,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":0.0,\"betSize\":0.0,\"betType\":\"B\",\"betCategoryType\":\"NONE\",\"commissionRate\":\"5%\",\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":18.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T09:27:58.000Z\",\"selectionId\":0,\"selectionName\":null,\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"ACCOUNT_DEBIT\",\"transactionId\":0,\"winLose\":\"RESULT_ERR\"}"
                },
                "legacyData": {
                    "avgPrice": 0,
                    "betSize": 0,
                    "betType": "B",
                    "betCategoryType": "NONE",
                    "commissionRate": "5%",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 18,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T09:27:58.000Z",
                    "selectionId": 0,
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "ACCOUNT_DEBIT",
                    "transactionId": 0,
                    "winLose": "RESULT_ERR"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T09:30:27.000Z",
                "amount": 18,
                "balance": 1000035.1,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":10.0,\"betSize\":2.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":0.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T09:27:58.000Z\",\"selectionId\":130432,\"selectionName\":\"Landskrona\",\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"ACCOUNT_CREDIT\",\"transactionId\":0,\"winLose\":\"RESULT_ERR\"}"
                },
                "legacyData": {
                    "avgPrice": 10,
                    "betSize": 2,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 0,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T09:27:58.000Z",
                    "selectionId": 130432,
                    "selectionName": "Landskrona",
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "ACCOUNT_CREDIT",
                    "transactionId": 0,
                    "winLose": "RESULT_ERR"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841762387",
                "itemDate": "2018-06-07T09:14:03.000Z",
                "amount": -0.9,
                "balance": 1000051.3,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":0.0,\"betSize\":0.0,\"betType\":\"B\",\"betCategoryType\":\"NONE\",\"commissionRate\":\"5%\",\"eventId\":102833966,\"eventTypeId\":7,\"fullMarketName\":\"GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd\",\"grossBetAmount\":18.0,\"marketName\":\"2m Hcap Hrd\",\"marketType\":\"O\",\"placedDate\":\"2018-06-06T16:37:13.000Z\",\"selectionId\":0,\"selectionName\":null,\"startDate\":\"2018-06-06T12:40:00.000Z\",\"transactionType\":\"ACCOUNT_DEBIT\",\"transactionId\":0,\"winLose\":\"RESULT_NOT_APPLICABLE\"}"
                },
                "legacyData": {
                    "avgPrice": 0,
                    "betSize": 0,
                    "betType": "B",
                    "betCategoryType": "NONE",
                    "commissionRate": "5%",
                    "eventId": 102833966,
                    "eventTypeId": 7,
                    "fullMarketName": "GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd",
                    "grossBetAmount": 18,
                    "marketName": "2m Hcap Hrd",
                    "marketType": "O",
                    "placedDate": "2018-06-06T16:37:13.000Z",
                    "selectionId": 0,
                    "startDate": "2018-06-06T12:40:00.000Z",
                    "transactionType": "ACCOUNT_DEBIT",
                    "transactionId": 0,
                    "winLose": "RESULT_NOT_APPLICABLE"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841762387",
                "itemDate": "2018-06-07T09:14:03.000Z",
                "amount": 18,
                "balance": 1000052.2,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":10.0,\"betSize\":2.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102833966,\"eventTypeId\":7,\"fullMarketName\":\"GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd\",\"grossBetAmount\":0.0,\"marketName\":\"2m Hcap Hrd\",\"marketType\":\"O\",\"placedDate\":\"2018-06-06T16:37:13.000Z\",\"selectionId\":4700101,\"selectionName\":\"Catchin Time\",\"startDate\":\"2018-06-06T12:40:00.000Z\",\"transactionType\":\"ACCOUNT_CREDIT\",\"transactionId\":0,\"winLose\":\"RESULT_WON\"}"
                },
                "legacyData": {
                    "avgPrice": 10,
                    "betSize": 2,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102833966,
                    "eventTypeId": 7,
                    "fullMarketName": "GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd",
                    "grossBetAmount": 0,
                    "marketName": "2m Hcap Hrd",
                    "marketType": "O",
                    "placedDate": "2018-06-06T16:37:13.000Z",
                    "selectionId": 4700101,
                    "selectionName": "Catchin Time",
                    "startDate": "2018-06-06T12:40:00.000Z",
                    "transactionType": "ACCOUNT_CREDIT",
                    "transactionId": 0,
                    "winLose": "RESULT_WON"
                },
                "itemClass": "UNKNOWN"
            }
        ],
        "moreAvailable": false
    }
} 


In the third example, we resettle the market with the back bet on Landskrona as a loser, and we see 5 entries:

-          The four entries described above

-          An entry describing the losing bet (RESULT_LOST)

 

Code Block
titleMarket Resettled
collapsetrue
{
    "jsonrpc": "2.0",
    "result": {
        "accountStatement": [
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T13:29:52.000Z",
                "amount": -2,
                "balance": 1000032.2,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":10.0,\"betSize\":2.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":0.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T09:27:58.000Z\",\"selectionId\":130432,\"selectionName\":\"Landskrona\",\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"ACCOUNT_DEBIT\",\"transactionId\":0,\"winLose\":\"RESULT_LOST\"}"
                },
                "legacyData": {
                    "avgPrice": 10,
                    "betSize": 2,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 0,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T09:27:58.000Z",
                    "selectionId": 130432,
                    "selectionName": "Landskrona",
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "ACCOUNT_DEBIT",
                    "transactionId": 0,
                    "winLose": "RESULT_LOST"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T13:20:10.000Z",
                "amount": 0.9,
                "balance": 1000034.2,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":0.0,\"betSize\":0.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":0.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T13:20:10.000Z\",\"selectionId\":0,\"selectionName\":null,\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"COMMISSION_REVERSAL\",\"transactionId\":0,\"winLose\":\"RESULT_FIX\"}"
                },
                "legacyData": {
                    "avgPrice": 0,
                    "betSize": 0,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 0,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T13:20:10.000Z",
                    "selectionId": 0,
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "COMMISSION_REVERSAL",
                    "transactionId": 0,
                    "winLose": "RESULT_FIX"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T13:20:10.000Z",
                "amount": -18,
                "balance": 1000033.3,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":0.0,\"betSize\":0.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":0.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T13:20:10.000Z\",\"selectionId\":0,\"selectionName\":null,\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"ACCOUNT_DEBIT\",\"transactionId\":0,\"winLose\":\"RESULT_FIX\"}"
                },
                "legacyData": {
                    "avgPrice": 0,
                    "betSize": 0,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 0,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T13:20:10.000Z",
                    "selectionId": 0,
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "ACCOUNT_DEBIT",
                    "transactionId": 0,
                    "winLose": "RESULT_FIX"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T09:30:27.000Z",
                "amount": -0.9,
                "balance": 1000034.2,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":0.0,\"betSize\":0.0,\"betType\":\"B\",\"betCategoryType\":\"NONE\",\"commissionRate\":\"5%\",\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":18.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T09:27:58.000Z\",\"selectionId\":0,\"selectionName\":null,\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"ACCOUNT_DEBIT\",\"transactionId\":0,\"winLose\":\"RESULT_ERR\"}"
                },
                "legacyData": {
                    "avgPrice": 0,
                    "betSize": 0,
                    "betType": "B",
                    "betCategoryType": "NONE",
                    "commissionRate": "5%",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 18,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T09:27:58.000Z",
                    "selectionId": 0,
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "ACCOUNT_DEBIT",
                    "transactionId": 0,
                    "winLose": "RESULT_ERR"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841763486",
                "itemDate": "2018-06-07T09:30:27.000Z",
                "amount": 18,
                "balance": 1000035.1,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":10.0,\"betSize\":2.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102828127,\"eventTypeId\":1,\"fullMarketName\":\"Fixtures 03 June      / Landskrona v GAIS/ Match Odds\",\"grossBetAmount\":0.0,\"marketName\":\"Match Odds\",\"marketType\":\"O\",\"placedDate\":\"2018-06-07T09:27:58.000Z\",\"selectionId\":130432,\"selectionName\":\"Landskrona\",\"startDate\":\"0001-01-01T00:00:00.000Z\",\"transactionType\":\"ACCOUNT_CREDIT\",\"transactionId\":0,\"winLose\":\"RESULT_ERR\"}"
                },
                "legacyData": {
                    "avgPrice": 10,
                    "betSize": 2,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102828127,
                    "eventTypeId": 1,
                    "fullMarketName": "Fixtures 03 June      / Landskrona v GAIS/ Match Odds",
                    "grossBetAmount": 0,
                    "marketName": "Match Odds",
                    "marketType": "O",
                    "placedDate": "2018-06-07T09:27:58.000Z",
                    "selectionId": 130432,
                    "selectionName": "Landskrona",
                    "startDate": "0001-01-01T00:00:00.000Z",
                    "transactionType": "ACCOUNT_CREDIT",
                    "transactionId": 0,
                    "winLose": "RESULT_ERR"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841762387",
                "itemDate": "2018-06-07T09:14:03.000Z",
                "amount": -0.9,
                "balance": 1000051.3,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":0.0,\"betSize\":0.0,\"betType\":\"B\",\"betCategoryType\":\"NONE\",\"commissionRate\":\"5%\",\"eventId\":102833966,\"eventTypeId\":7,\"fullMarketName\":\"GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd\",\"grossBetAmount\":18.0,\"marketName\":\"2m Hcap Hrd\",\"marketType\":\"O\",\"placedDate\":\"2018-06-06T16:37:13.000Z\",\"selectionId\":0,\"selectionName\":null,\"startDate\":\"2018-06-06T12:40:00.000Z\",\"transactionType\":\"ACCOUNT_DEBIT\",\"transactionId\":0,\"winLose\":\"RESULT_NOT_APPLICABLE\"}"
                },
                "legacyData": {
                    "avgPrice": 0,
                    "betSize": 0,
                    "betType": "B",
                    "betCategoryType": "NONE",
                    "commissionRate": "5%",
                    "eventId": 102833966,
                    "eventTypeId": 7,
                    "fullMarketName": "GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd",
                    "grossBetAmount": 18,
                    "marketName": "2m Hcap Hrd",
                    "marketType": "O",
                    "placedDate": "2018-06-06T16:37:13.000Z",
                    "selectionId": 0,
                    "startDate": "2018-06-06T12:40:00.000Z",
                    "transactionType": "ACCOUNT_DEBIT",
                    "transactionId": 0,
                    "winLose": "RESULT_NOT_APPLICABLE"
                },
                "itemClass": "UNKNOWN"
            },
            {
                "refId": "10841762387",
                "itemDate": "2018-06-07T09:14:03.000Z",
                "amount": 18,
                "balance": 1000052.2,
                "itemClassData": {
                    "unknownStatementItem": "{\"avgPrice\":10.0,\"betSize\":2.0,\"betType\":\"B\",\"betCategoryType\":\"E\",\"commissionRate\":null,\"eventId\":102833966,\"eventTypeId\":7,\"fullMarketName\":\"GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd\",\"grossBetAmount\":0.0,\"marketName\":\"2m Hcap Hrd\",\"marketType\":\"O\",\"placedDate\":\"2018-06-06T16:37:13.000Z\",\"selectionId\":4700101,\"selectionName\":\"Catchin Time\",\"startDate\":\"2018-06-06T12:40:00.000Z\",\"transactionType\":\"ACCOUNT_CREDIT\",\"transactionId\":0,\"winLose\":\"RESULT_WON\"}"
                },
                "legacyData": {
                    "avgPrice": 10,
                    "betSize": 2,
                    "betType": "B",
                    "betCategoryType": "E",
                    "eventId": 102833966,
                    "eventTypeId": 7,
                    "fullMarketName": "GB / Uttox  6th Jun/ 13:40 2m Hcap Hrd",
                    "grossBetAmount": 0,
                    "marketName": "2m Hcap Hrd",
                    "marketType": "O",
                    "placedDate": "2018-06-06T16:37:13.000Z",
                    "selectionId": 4700101,
                    "selectionName": "Catchin Time",
                    "startDate": "2018-06-06T12:40:00.000Z",
                    "transactionType": "ACCOUNT_CREDIT",
                    "transactionId": 0,
                    "winLose": "RESULT_WON"
                },
                "itemClass": "UNKNOWN"
            }
        ],
        "moreAvailable": false
    }
}

 

 

...