article-image

Perform Consumer API guide

0
0
Clock IconJun 25, 2024

Perform Consumer Feed API guide(Betting)

Find scheduled fixtures, and get live sports data via our Consumer API and receive data over a WebSocket connection , so you can create your own data visualisations.

Overview

Here, we provide an overview of the live data feed API enabling subscribers to load sport, event and live data pertaining to available fixtures. This document is intended for a technical audience with JavaScript development skills.

Updated 14 January 2019 (v1.3): Added X/Y coordinates for the line-up output message
Quick links

Access Restrictions

Access to the data feed and getToken call will be restricted by one of these two available methods: whitelisted IP addresses or referrer security.

  • IP address - users wishing to restrict access by IP address should provide IP addresses or an IP range to Perform so that we can add these to our whitelist and configure your account.
  • Referrer-based security (CORS) - users who do not want to provide a set of IP addresses to Perform can instead provide us with a list of domains to whitelist. In this case, it is not necessary to provide a list of servers.
 

Fixture Schedules in the Content Catalogue (/mcc) feed (replaces Event List XML)

To access the live data stream you will need to pass the unique fixture id/mccItem id. This ID can be found, along with other information about the event, in the Master Content Catalogue (/mcc) feed. The Content Catalogue feed will return fixtures scheduled up to 14 days in advance. As we frequently add fixtures, we recommended that you call it often, for example, every 30 minutes.

Note - users of the legacy Event List XML feed:
In earlier versions of our Consumer API integration guide, we recommend getting a list of forthcoming schedules from our Event List XML feed. However, for Watch & Bet 2.0 the Event List is superceded by Perform Feeds Master Content Catalogue (/mcc) - this is also used by partners who have integrated with our live streams.
We recommend using the Content Catalogue (MCC) to look up fixtures (events); it contains the essential information you need, such as the UUID for the fixture/match/event. You can see how the Event List XML and Content Catalogue compare in our Migration Guide.

This feed represents all fixtures that will be available in the visualisation. It returns this metadata as mccItems. Each mccItem in the response comprises fixture and asset elements, which contain the scheduled start date, fixture UUID and the linked contestants (such as teams), sport, and competition. You can also use this information to filter the fixture list further.

Example requests for live data and fixture schedules

The Content Catalogue feed is RESTful - you can access the feed via a URL and return data in XML, JSON, or JSONP. Make a GET request to the /mcc endpoint over HTTPS, in UTF-8 format.

You can get fixtures with a scheduled start date/time that is up to 14 days ahead of or before the date of your request. To do so, use the fx.nDy or fx.fDt query parameter. Only fixtures within the specific date range are returned. You can sort results by the start date/time. Data assets are locale-neutral and always returned. To filter the feed by criteria such as the Sport or Country, pass the UUID to the appropriate parameter: fx.sprt (Sport) | fx.ctst (Contestant)

Get fixtures and data assets scheduled for the same day and by Sport UUID or Contestant UUID:

In this example, the request returns only fixture and live data metadata for all Soccer fixtures scheduled for the date of the request. The Sport UUID for Soccer is 289u5typ3vp4ifwh5thalohmq.

It is sorted according to fixture date and time (_ord=fx.fDt), in ascending order (_ordSrt=asc). Therefore, items at the top of the feed are fixtures with the earliest start times that day. For example, fixtures scheduled to start at 10:00 (UTC) will be higher up than those starting at 11:00.

GET https://wab.performfeeds.com/mcc/{outletAuthKey}/?_rt=b&_fmt=json&_fldGrp=mcc.a,mcc.b&fx.sprt=289u5typ3vp4ifwh5thalohmq&_ord=fx.fDt&_ordSrt=asc
Get fixtures - by number of days (fx.nDy):

To specify a date range by the number of days ahead of/before the request date, pass an integer in [<-14,14>] to the fx.nDy parameter (0 is invalid). Example: fx.nDy=-1 returns fixtures from the current and previous day, and fx.nDy=1 returns those for the current day. Here, the request is for fixtures scheduled 14 days ahead of the current date.

GET https://wab.performfeeds.com/mcc/{outletAuthKey}/?_rt=b&_fmt=json&_fldGrp=mcc.a,mcc.b&fx.sprt=289u5typ3vp4ifwh5thalohmq&_ord=fx.fDt&_ordSrt=asc&fx.nDy=14

Get fixtures - by start date to end date (fx.fDt):
To get fixtures scheduled within an exact date/time range, use the fx.fDt parameter and specify two dates, or to/from any date (*) to another (in XSD or milliseconds since the epoch). Here, the request is for fixtures between 08 December 2016 and 20 December 2016.

GET https://wab.performfeeds.com/mcc/{outletAuthKey}/?_rt=b&_fmt=json&_fldGrp=mcc.a,mcc.b&fx.sprt=289u5typ3vp4ifwh5thalohmq&_ord=fx.fDt&_ordSrt=asc&fx.fDt=[2016-12-08T00:00:00Z TO 2016-12-20T00:00:00Z]
Caution - fx.nDy parameter: Do not pass '0' as a value (fx.nDy=0); otherwise, you will receive an error because it does not specify a date/range. Do not use + as it is not a valid operator and will cause an error (10202). Example: fx.nDy=1 is valid, but fx.nDy=+1 is not.

Content Catalogue feed - Request Parameters and Values (/mcc)

The example requests include the following elements, and required and key optional parameters.

Basic URL: https://wab.performfeeds.com/mcc/{outletAuthKey}/?{queryParameters}

Element/URL ParameterDescription and accepted values
https://
wab.performfeeds.com/mcc
Required. Protocol, base domain and MCC endpoint (/mcc) to access fixture and livestream asset metadata in the Content Catalogue. We only support https.
{outletAuthKey}Required. Outlet Authentication Key. An alphanumeric UUID supplied to each outlet by Perform. Requests made without a valid key will be rejected.
{queryParameters}Required. Query parameters. Query the feed and control the returned content, format and page size. You must specify all required parameters and valid values.
_rt={mode}Required. Operating mode / request type (query parameter). Value: b (B2B). If omitted, the default feed behaviour is B2C mode and you may receive an error.
_fmt={dataFormat}Recommended. Data format (query parameter). Values: xml | json | jsonp (requires _clbk query parameter). If you do not specify _fmt, it is XML (default).
_fldGrp={fieldGroupMask}Required. Field group/mask (query parameter). Values: see the example requests and _fldGrp. Returns metadata associated with the {fieldGroupMask} specifier value, including details of fixtures (such as ID, date/time, sport and competition) and assets (such as type, livestream or fastdata, and ID). Example values:
• mcc.a - returns all key fields including Allowed Country Codes (attribute allowedCountryCodes)
• mcc.b - returns all key fields including Blocked Country Codes (attribute blockedCountryCodes)
• fx.idnt.{supplierName} - returns identifier metadata (holds supplierName and own fixture id)
Example: fx.idnt.RB = RunningBall. If a fixture is not linked to the specified supplier, it is returned without identifier metadata. You cannot use the ID to get a livestream or data; it is supplied to help partners who have already mapped to the supplier to integrate their systems.
_ord={fieldMask}Optional. Ordering (query parameter) - the data field to use as the criteria by which to order the feed.
Values: abbreviation of a field mask, such as fx.fDt (fixture date and time).
_ordSrt={sortOrder}Optional. Sort order (query parameter) of the feed. It is only valid when passed with the _ord parameter and a field value in a request. Values: asc (ascending) or desc (descending).
fx.fDt=[{date TO date}]Optional. Fixture date and time range (query parameter). Value: in XSD (YYYY-MM-DDTHH:MM:SSZ) or milliseconds (since the epoch). Examples:
• [xsd:dateTime TO xsd:dateTime] or [xsd:dateTime TO *] or [* TO xsd:dateTime]
• [milliseconds TO milliseconds] or [milliseconds TO *] or [* TO milliseconds]
fx.nDy={numberDays}Optional. Fixture date range - by day (query parameter) - number of days ahead of/before the request date. Value: integer in the range [<-14,14>] (0 is invalid). Examples (using a current date of 2017-02-13):
• fx.nDy=1 (same day). Equivalent: fx.fDt=[2017-02-13T00:00:00Z TO 2017-02-13T23:59:59Z]
• =2 (today to tomorrow). Equivalent: fx.fDt=[2017-02-13T00:00:00Z TO 2017-02-14T23:59:59Z]
• =-1 (today to yesterday). Equivalent: fx.fDt=[2017-02-12T00:00:00Z TO 2017-02-13T23:59:59Z]
fx.sprtOptional. Sport (filter Fixtures by Sport UUID). Value: Sport UUID. See the Sport UUID table.
Caution:
If you do not pass any query parameters in the request URL, you may receive an error or limited data from the response. While some query parameters are optional, you should always specify the following query parameters (and valid values) to ensure that your requests are successful and return fixture and asset metadata, of the asset language(s) and in the response format, which you require: _rt, _fmt, _fldGrp, as.lang

Example request response

Here, the response is for fixtures scheduled for the same day. On success, the HTTP status code in the response header is 200 (OK). The body contains mccItems (fixtures and assets) scheduled for the current day, sorted by fixture date and time, and ascending order - instead of default sorting (descending, by asset lastUpdateTime). This means that fixtures at the top of the feed are those scheduled to start earlier in the day. On error, the body contains an error code.
For JSONP, successful and failed requests return status code 200. If you receive an error, see Error codes.

For this mccItem, "Nice v Reims", the fixture metadata includes its date, time and unique fixture ID (54csvtpw8hip1eiv65bp4uuy9). The asset element confirms the fixture is covered by data (asset type).

Example response (JSON):
{
   "mccItem": [
      {
         "name": "Nice v Reims",
         "type": "urn:perform:mfl:fixture",
         "fixture": {
            "id": "54csvtpw8hip1eiv65bp4uuy9",
            "date": "2016-04-22",
            "time": "19:00:00",
            "sport": {
               "id": "289u5typ3vp4ifwh5thalohmq",
               "value": "Soccer"
            },
            "competition": {
               "id": "dm5ka0os1e3dxcp3vh05kmp33",
               "code": "FRA",
               "value": "Ligue 1"
            },
            "contestant": [
               {
                  "id": "3c3jcs7vc1t6vz5lev162jyv7",
                  "value": "Reims"
               },
               {
                  "id": "bx0cdmzr2gwr70ez72dorx82p",
                  "value": "Nice"
               }
            ]
         },
         "asset": [
            {
               "id": "1kc73cm2uhwjw12fp59ark7lo9",
               "name": "Nice v Reims",
               "type": "urn:perform:livestream",
               "urn": "urn:perform:livestream:1kc73cm2uhwjw12fp59ark7lo9",
               "lastUpdateTime": "2016-04-11T13:25:06Z",
               "allowedCountryCodes": "AE AF AG AI AL AM"
            },
            {
               "id": "ej9cnyc2lmczfeshz1np86ynd",
               "type": "urn:perform:fastdata",
               "urn": "urn:perform:fastdata:ej9cnyc2lmczfeshz1np86ynd",
               "lastUpdateTime": "2015-04-13T12:30:27Z"
            }
         ]
      }
   ]
}
Example response (XML):
<mcc xmlns="http://www.performgroup.com/ns/pf/mcc/get">
   <mccItem id="54csvtpw8hip1eiv65bp4uuy9" name="Nice v Reims" type="urn:perform:mfl:fixture">
      <fixture id="54csvtpw8hip1eiv65bp4uuy9" date="2016-04-22" time="19:00:00">
         <sport id="289u5typ3vp4ifwh5thalohmq">Soccer</sport>
         <competition id="dm5ka0os1e3dxcp3vh05kmp33" code="FRA">Ligue 1</competition>
         <contestants>
            <contestant id="3c3jcs7vc1t6vz5lev162jyv7">Reims</contestant>
            <contestant id="bx0cdmzr2gwr70ez72dorx82p">Nice</contestant>
         </contestants>
      </fixture>
      <assets>
         <asset id="1kc73cm2uhwjw12fp59ark7lo9" name="Nice v Reims" type="urn:perform:livestream" urn="urn:perform:livestream:1kc73cm2uhwjw12fp59ark7lo9" lastUpdateTime="2016-04-11T13:25:06Z" allowedCountryCodes="AE AF AG AI AL AM"/>
         <asset id="ej9cnyc2lmczfeshz1np86ynd" type="urn:perform:fastdata" urn="urn:perform:fastdata:ej9cnyc2lmczfeshz1np86ynd" lastUpdateTime="2015-04-13T12:30:27Z"/>
      </assets>
   </mccItem>
</mcc>
 

Content Catalogue feed - Response field attributes and values (/mcc)

The response contains the following fields when mcc.a or mcc.b is passed to the _fldGrp query parameter in the request URL.
The MCC schema can be found at: http://wab.performfeeds.com/schema/mcc/xsd/1.0/catalogue-get.xsd

Element/AttributeDescription
<mccItem>parent element containing all fixture and asset metadata about the single fixture
attributes: "name", "type", "id"
elements: <fixture> and <assets>
... nameattribute: name of the fixture (sometimes its contestants are also named here)
... typeattribute: item type - always a fixture (urn:perform:mfl:fixture)
... idattribute: unique ID of the item - the value is the same as the fixture id in the fixture element
<fixture>element: contains all fixture metadata
attributes: "id", "date", "time"
sub-elements: <sport>, <competition>, <contestants>
... idattribute: unique ID of the fixture - matches the mccItem id. Also known as the MFL Fixture UUID
... dateattribute: scheduled fixture start date (UTC format)
... timeattribute: scheduled fixture start time (UTC format)
... <sport>sub-element: contains the ID and name of the Sport
...... idattribute: unique ID of the Sport
...... (value)string value: name of the Sport
... <competition>sub-element: contains id (UUID), name and country attributes for the Competition
...... idattribute: unique ID of the Competition
...... codeattribute: country code of the Competition (for example: US for USA and ESP for Spain)
...... (value)string value: name of the Competition (for example: Tercera Division)
... <contestants>sub-element contains <contestant> sub-elements for each Contestant in the fixture
...... <contestant>sub-element: contains id attribute and name value of a Contestant in the fixture
......... idattribute: unique ID of the Contestant (the same ID represents the Contestant across Perform Feeds)
......... (value)string value: name of the Contestant (for example, San Fernando CD)
<assets>attribute: contains <asset> sub-elements and metadata for each asset linked to the fixture
... <asset>sub-element: contains attributes for id, name, type, urn, lastUpdateTime. For the "livestream" type, it will contain attributes for allowedCountryCodes and blockedCountryCodes
......... idattribute: unique ID of the asset, such as live data or a livestream.
......... (value)string value: name describing the asset
......... typeattribute: the type of asset, either urn:perform:livestream (livestream) or urn:perform:fastdata (data). To authorise a user to access a livestream in the OAuth API, specify the asset type in the scope: scope=livestream
......... urnattribute: URN of asset. A concatenation of the "type" and "id" values from the asset element it belongs to. Example: urn:perform:livestream:1kc73cm2uhwjw12fp59ark7lo9
......... lastUpdateTimeattribute: the last update time of the asset, in international date format (YYYY-MM-DDTHH:MM:SSZ)
......... allowedCountryCodesattribute: countries in which the livestream asset is available, as space-separated codes (for example: AU GB US). It is only returned if mcc.a is passed to _fldGrp in the request
......... blockedCountryCodesattribute: countries in which the livestream asset is not available, as space-separated codes (for example: AU GB US). It is only returned if mcc.b is passed to _fldGrp in the request

Content Catalogue feed - Error codes and explanations

Perform error codeHTTP codeExplanation
n/a200Successful request. No error.
10000500An unexpected error has occurred. Verify that the URL, Outlet Authentication Key, query parameters and format are correct, and then try again. We supply your Outlet Authorisation Key to you when we setup your account. Contact us if you continue to receive the error.
10001404Page not found. You may have requested a page that does not exist. Only mccItems with a fixture start date that is within a range of 14 days ahead of or before the current date will be returned.
10010404Outlet does not exist. Incorrect or missing Outlet Authentication Key or mandatory character (? or _).
• Make sure you have specified the correct Outlet Authentication Key. A unique key is supplied to each outlet when we first confirm your account is active. Contact us if the error continues.
• Check for incorrect or missing characters. A ? must be specified before the first query parameter in the URL: ?{queryParameters}. The _ (underscore) prefix is mandatory for some query parameters, such as _rt and _fmt.

Make sure you have structured request URLs correctly. Example:
{protocol}://{domain}/{resource}/{outletAuthKey}?{queryParameters}
Note: {protocol}://{domain} represents: https://wab.performfeeds.com
10100500Feed Unavailable. The service is not available at this time. Wait a short time, and then try again. If the error persists, contact Perform.
10101500Feed Unavailable. The service is not available at this time. Wait a short time, and then try again. If the error persists, contact Perform.
10102503Feed Unavailable. Temporary error - wait a short time and then try again. If the error persists, contact Perform.
10200400Missing request parameter. A mandatory parameter has not been supplied. Ensure all mandatory parameters are supplied and correct. If you specify the format as JSONP, you must also specify the callback function in the URI or Accept Header: _fmt=jsonp&_clbk={callbackFunction}
10201562Unknown request parameter. A parameter has been supplied that does not exist in the /mcc feed. Check that the parameter and associated value exists for the feed, and that both are correct, and then try again. Note: The /mcc feed only supports requests in B2B mode (parameter-value of _rt=b. It does not support B2C mode.
10202400Invalid request parameter value. You have passed invalid values to a valid query parameter, or multiple values to a parameter that only supports one value per request. Check the values and try again. Possible reasons:
• Invalid value. Example: (0) in fx.nDy=0 (invalid). Valid: Integer in [<-14,14>]
• Missing character. Example: (.) in _fldGrp=mcca (invalid). Valid: mcc.a
• Extra character. Example: (+) in fx.nDy=+1 (invalid). Valid: fx.nDy=1
• Missing value. Example: If you specify the format as JSONP, you must also specify the callback function in the URI or Accept Header: _fmt=jsonp&_clbk={callbackFunction}
10203400Ambiguous/Invalid request parameters. The request is invalid for one or more of the following reasons:
• You have specified a parameter more than once in a request. Remove the duplicate parameter and try again.
• You have used a combination of query parameters in the same request which cannot be used together (they do not make sense). Example: Using both fx.nDy and fx.fDt together.
10204405Invalid request method. You are attempting to use POST with an endpoint that only accepts GET. Amend the method and try again.
10210415Unsupported format: _fmt parameter. Check the supplied format value is valid for the feed. If using the _fmt parameter in the URI check that a valid value has been specified. If a value has not been specified, then default format for the feed is used to determine the response body format. Note: Perform Feeds does not support the Accept header method.
10212400Unsupported mode: _rt parameter. The /mcc feed only supports requests in B2B mode (parameter-value of _rt=b. It does not support B2C mode (c). If a value is not supplied then B2C mode is used by default.
10214400Unknown field requested : _fld / _fldGrp parameter. The field mask specifier you have supplied to the _fld or _fldGrp is not recognised for this feed. Most Perform Feeds share a common set of format query parameters that generally, but not always, offer the same behaviour and functionality. Query parameters, values and behaviour can differ, so make sure that the field mask value you specified is correct for the feed you are attempting to call, as given in our guide.
10216400Invalid sorting: _ord, _ordSrt parameters. See _ord and _ordSrt for details.
• _ord defines which field(s) are used to sort results; make sure you pass a valid value - this is the field mask's abbreviated name.
• _ordSrt controls the sorting order of results in asc (ascending, default) or desc (descending) order, based on the field value passed to _ord; _ordSrt has no effect if _ord is not used.
10217400Invalid pagination: _pgNm, _pgSz parameters. The page number or page size is not available. Page size is controlled by the operating mode (see _rt parameter). Page number is determined by the page size and number of results available - try the request without these parameters to find out the number of results in the first page. Note: Specify a value of '1' or higher; '0' is not valid. See the _pgSz and _pgNm for details.
10219413Invalid size of parameter: _pgSz parameter. The specified page size exceeds the permitted maximum for the outlet. Page size is subject to a maximum of 1000 results per page (B2B requests). Otherwise, send the request without _pgNm or _pgSz.
10300403Feed Access Denied. Check that the feed is available within your subscription, and that you have specified the correct settings for the access URI, B2B mode referer type (_rt=b), and domains/IP addresses (for whitelisting).
10310401User not Authorised. You have not supplied a valid Outlet Authentication Key - your unique key is supplied to you when we first confirm your account is active. Make sure that a valid key is supplied in the HTTP request URI or in the Accept header. Contact us if you continue to receive this error or need to confirm your key.
10311401The length of the username field parameter exceeded. The username field parameter in the call to the Oauth feed cannot exceed 35 characters in length.
10320503Acceptable usage exceeded. Allow up to 30 minutes before sending further requests - if the error remains, contact Perform.
10400404No data found. Try again. If the error continues, it may be that no MCC items (fixtures and assets) match the combination of query parameters and values - attempt a call using different search criteria (try a simple call for testing purposes).
10401408Data request timeout. Request for specific data timed out. Try again. If the error continues, attempt a simple request to the feed (do not use many parameters and values).
10402503Data corrupt. Try again. If the error continues try a request for simple and different search criteria.
10501415Unsupported media format. Check the configuration.
10502412Missing character encoding. Declare the character encoding. Note: The API expects data to be UTF-8 encoded.
10503412Invalid feed enclosed in body.

Back to Top

 

Live Data Feed

The live data feed is delivered via WebSockets. A connection is opened using a provided socket server URL and unique security token passed as a query string parameter.

Tokens are provided for a single socket connection and reuse will result in disconnection or data starvation for existing connections using the same token, the token must also be used within 30 seconds.

Before you start: You will need a unique Customer ID and Customer Key to call the feed. We will provide you with these credentials - they are different to the Outlet Authorisation Key required for the /mcc feed. Requests will only be accepted from the whitelisted IP addresses supplied to Perform.

Get a token:
To obtain a token users must make a request to:

http://wab-visualisation.performgroup.com/getToken
Example getToken request (IP whitelisting):
http://wab-visualisation.performgroup.com/getToken?api=true&customerId=testcustomerid&customerKey=testCustomerKey&userId=testuniqueuserid&uuid=5vd97wfczhqit0si8s1j3psb0
Example getToken request (CORS):

If the CORS security method is in use (referrer-based security), the customerId and customerKey parameter-value pairs are not passed. In this case, an example call follows the following format.

http://wab-visualisation.performgroup.com/getToken?api=true&userId=testuniqueuserid&uuid=5vd97wfczhqit0si8s1j3psb0

getToken feed - Request Parameters and Values

Query parameterDescription and accepted values
apiRequired. API. Value: Must be set to true
customerId={yourCustomerId}Required - IP whitelisting method only. Customer ID. Value: Replace {yourCustomerId} with your unique ID, which we supply to you when we confirm your Consumer API setup details. Requests made without a valid ID will be rejected.
customerKey={yourCustomerKey}Required - IP whitelisting method only. Customer Key. Value: Replace {yourCustomerKey} with your key, which is unique to you - we supply it to you when we setup your account. Requests made without a valid key will be rejected.
uuid={fixtureUuid}Required. Match/Fixture UUID. Value: The UUID of the fixture/match which needs to be loaded. It is returned in the response when your application makes a successful request to our API for a schedule of fixtures/events.
  • MCC Master Content Catalogue (Stream Schedules) feed: This is the unique mccItem id or fixture id value. The id of the fixture element and its parent mccItem is always the same.
  • Event List XML (legacy Watch&Bet): Returned in the match element in the schedule data received from the /matches API call
userId={userId}Optional. User ID. Value: Replace {userId} with a value to help identify usage for tracking purposes. If end user is not required to log on then we suggest the value is, for example, the application name, portal name, or website address, or any any unique string which will allow us to track the progress of the user throughout the session and identify the request.

Example response - success:

If a successful call is made to the /getToken API, the response contains a token. The example below is for JSON.

{
  "token":"81b35dc55c83a02d1957e7d9fda30f6c2b4db27b6b",
  "socketServerUrl":"socketserverurl.performgroup.com"
}

Example response - error:

If an unsuccessful call is made to the /getToken API, then the following response may be returned as the value of the error property.

{"error":"103"}
Note: If you encounter an error, only the error property will be present.

getToken feed - Error codes and explanations

Error codeExplanation
101A token has not been authorised. This is the default error response from the /getToken feed.
102No socket server is available to assign to a token, thus a token cannot be generated. Contact Perform.
103The fixture/match UUID sent in the token request could not be matched to an existing ID in the fixture schedule.
104Either a parameter or value for customerId, customerKey, userid, or sportid has not been supplied or cannot be derived from the request origin.
105An error occurred generating the token. Contact Perform.
HTTP 403Contact Perform to ensure that the correct whitelisting method is enabled.

Using the token in a WebSocket connection

Once a valid token has been obtained this can be used to connect to the provided socket server.

This example HTML contains the /getToken call and JavaScript code required for connecting to a socket server via a WebSocket.

<html>
  <head>
    <script src="http://wab-visualisation.performgroup.com/socket.io/socket.io.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script  type="text/javascript">
      function connectToDataFeed(args) {
          console.log("in");
          var url = "http://wab-visualisation.performgroup.com/getToken?&api=true&userId=k4fr3h34u34&uuid=d53gggs6eg3j4";
          console.log(url);
          $.ajax({
              type: "GET",
              url: url,
              success: function (data) {
                  try {
                      var tokenContainer = JSON.parse(data);
                      if (tokenContainer.error) {
                          console.log(tokenContainer.error);
                      }
                      else {
                          var socketConnectionUrl = 'http://' +
                              tokenContainer.socketServerUrl +
                              '?token=' + tokenContainer.token;
                          console.log(socketConnectionUrl);
                          var apiSocket = io.connect(socketConnectionUrl, {
                              'reconnect': true,
                              'reconnection delay': 5000,
                              'max reconnection attempts': 100,
                              'force new connection': true
                          });
      
                          apiSocket.on('message', function (data) {
                              console.log(data);
                          });
      
                          apiSocket.on('error', function () {
                              console.log("Error in socket");
                          });
                      }
                  }
                  catch (err) {
                      console.log(err.message);
                  }
              }
          });
      }
      function enterFixtureId() {
          var customerId = prompt("Please enter customer id", "")
          var customerKey = prompt("Please enter customer key", "")
          var provider = prompt("Please enter provider[uuid]", "")
          var fixtureId = prompt("Please enter fixtureId:", "");
          var args = {};
          args[provider] = fixtureId;
          args.customerId = customerId;
          args.customerKey = customerKey;
          connectToDataFeed(args);
      }
            
    </script>
  </head>
  <body onload="enterFixtureId()">
  </body>
</html>
        

Back to top

 

On Connect Responses

Here, you can find find the possible responses to the WebSocket connection request.

On Connect ResponseDescription
SubscribeReceiptThis is a message sent when a successful connection is made at the data server, the data object defines the system ID of the fixture and the channel subscribed to.
{SubscribeReceipt : 1234567, Message: "Subscribe request received for 1234567", data : {Topic : 1234567, LiveUpdates : 'true'}}
TokenTransferredThis is a notification that the token assigned to this connection has been reused by another connection. In this instance no further updates will be sent via this connection.
{TokenTransferred : <<TOKEN>>, Message: "Token transferred to another connection"}
If this error is received, check that a unique token is generated for each connection, otherwise the original connection will be “evicted” when you attempt to reuse the token
Advisory
{   Advisory : true,   Message : "Message Broker is offline."   }
This will indicate that the message broker is currently offline, if the connection remains open and the message broker comes back online live data updates will be received.
SYSM
{"SYSM":{"D":"\/Date(1376935507114+0100)\/","ID":330453,"M":"Game cancelled. Unfortunately we cannot offer this game anymore.","MID":401}}
If a match that is requested has been cancelled a system message will be received.

Back to top

 

MLU messages

The JSON message container for all messages sent via the API is the MLU (Match Live Update), the first message received will contain data relating to the current status of the event including lineups, head2head data, historical data and team kit: these data objects are defined in the following table.

Here, we provide a sample MLU JSON object received from the WebSocket.

Note: Not all properties are displayed here. In all messages, "ID" refers to the system ID of the current fixture.
{
   "MLU": {
      "ID": 364274,
      "HT": "Lokomotivi Tbilisi",
      "AT": "Dila II",
      "EN": "439",
      "CPT": 2858737,
      "CR": "true",
      "SCH": "0",
      "SCA": "2",
      "EID": 2049,
      "TSID": 8,
      "PSID": "3",
      "L": "Pirveli Liga",
      "SN": "Soccer",
      "SI": 1,
      "STA": "Saguramoas sapekhburto kompleksi",
      "WBID": "0",
      "ST": {},
      "T": [],
      "TK": [],
      "FORM": {},
      "H2H": {},
      "TD": {},
      "LU": {},
   }
}

Here is a sample of a MLU message with all elements displayed. To save space, when a property value is an array we've only included the first element.

  • [] indicates an array object
  • {} indicatesa JavaScript object
{
    "MLU": {
        "ID": 366597,
        "UUID": "0",
        "WBID": "0",
        "HT": "Alashkert II",
        "AT": "Ararat II",
        "EN": "791",
        "CPT": 5249534,
        "CR": "true",
        "SCH": "2",
        "SCA": "1",
        "EID": 262,
        "Z": "FK3R",
        "RE": "790",
        "TSID": 8,
        "PSID": "3",
        "L": "First League",
        "SN": "Soccer",
        "SI": 1,
        "STA": "Kasakhi Marzik",
        "ST": {
            "AT": "25:30",
            "CR": "1:0",
            "DAT": "21:10",
            "F": "6:8",
            "FK": "9:11",
            "SB": "3:0",
            "SH": "5:1",
            "SHG": "2:1",
            "SHT": "1:1"
        },        
        "T": [
            {
                "CP": 135305,
                "EID": 1026,
                "EN": "30",
                "I": "1",
                "M": 3,
                "P": "1"
            },
            {
                "CP": 143547,
                "EID": 2066,
                "EN": "32",
                "I": "1",
                "M": 3,
                "P": "1"
            }
        ],
        "TK": [
            {
                "C1": "ff0000ff",
                "C2": "ff0000ff",
                "D": "0",
                "IHT": true,
                "P": "ff0000ff",
                "S": "ffffffff"
            },
            {
                "C1": "ffff0000",
                "C2": "ffff0000",
                "D": "0",
                "P": "ff000000",
                "S": "ff000000"
            }
        ],
        "H2H": {
            "HST": [
                {
                    "ID": 1522063,
                    "DT": "2013-09-07",
                    "TM": "13:00:00",
                    "H": 4,
                    "A": 0,
                    "T": "A"
                }
            ],
            "MS": [
                {
                    "CNT": 1,
                    "HT": {
                        "W": 1,
                        "L": 0,
                        "D": 0,
                        "G": 4
                    },
                    "AT": {
                        "W": 0,
                        "L": 1,
                        "D": 0,
                        "G": 0
                    }
                }
            ]
        },
        "FORM": {
            "HS": {
                "AL": {
                    "AS": 1.6428571428571428,
                    "AC": 1.2857142857142858,
                    "FS": 0,
                    "CR": 0,
                    "LH": 0,
                    "LF": 0
                },
                "HO": {
                    "AS": 2.2857142857142856,
                    "AC": 1,
                    "FS": 0,
                    "CR": 0,
                    "LH": 0,
                    "LF": 0
                },
                "AW": {
                    "AS": 1,
                    "AC": 1.5714285714285714,
                    "FS": 0,
                    "CR": 0,
                    "LH": 0,
                    "LF": 0
                }
            },
            "AS": {
                "AL": {
                    "AS": 2.3,
                    "AC": 1.8,
                    "FS": 0,
                    "CR": 0,
                    "LH": 0,
                    "LF": 0
                },
                "HO": {
                    "AS": 2.4,
                    "AC": 1.5,
                    "FS": 0,
                    "CR": 0,
                    "LH": 0,
                    "LF": 0
                },
                "AW": {
                    "AS": 2.2,
                    "AC": 2.1,
                    "FS": 0,
                    "CR": 0,
                    "LH": 0,
                    "LF": 0
                }
            },
            "HM": [
                {
                    "ID": 1522094,
                    "DT": "2013-11-04",
                    "H": 2,
                    "A": 1,
                    "T": "A",
                    "LN": "First League",
                    "TN": "Banants II"
                }
            ],
            "AM": [
                {
                    "ID": 1522093,
                    "DT": "2013-11-04",
                    "H": 0,
                    "A": 0,
                    "T": "H",
                    "LN": "First League",
                    "TN": "Mika II"
                }
            ]
        }
    }
}

The following table details all possible properties of the MatchLiveUpdate (MLU) object and describes their meaning.

MLU JSON Property NameDescription
IDThe ID used by the data feed
WBIDThe Watch and Bet ID
UUIDThe ID, as taken from the Master Fixture List (returned in the Content Catalogue /mcc schedule feed and Event List feed).
KOKick-Off time in UTC format. Example: "/Date(1383919200000+0000)/"
HTHome Team name
HTLAHome Team three-letter abbreviation
ATAway Team name
ATLAAway Team three-letter abbreviation
ENEvent Number – it increases incrementally with each message sent via the data service
CPTCurrent playtime of the game in milliseconds – the values correlate with minute
CRclockRunning is important for sports where the clock is interrupted permanently (basketball), but may also change if a game is in a paused state
Set to "true" when the game clock is running and game time (currentPlaytime) is counting up or down
SCHScore Home - see property "H" for team name
SCAScore Away - see property "A" for team name
EIDEvent Code ID. See the Event Code IDs section for the respective sport
PIPlayer-In substitution
POPlayer-Out substitution
JIJersey-In substitution
JOJersey-Out substitution
ZThe sport-specific Zone code describing the area of the field where the event has taken place. See section: Zone Information
RERelated Events – used when events are cancelled or to provide follow-up event and player information for events, including free kicks, goals and corner events
STAThe stadium/venue for the fixture
SIThe Sport ID (sportid) for the fixture
SNThe sport name for the fixture
TSIDThe current state the game is in. For example, "first half" when a soccer game is in the first 45 minutes of its regular playtime. See section: Ticker State IDs
PSIDThe play state ID. See section: Play State IDs
LThe League/Competition for the fixture
PIDPlayer ID for the related event
PNPlayer name for the related event
JNJersey Number for the related event
NBA (Basketball)Indicates that the game is played under NBA rules (Basketball)
IPFIndicates that In-Play Facts are available for this game and to your outlet. In-Play Facts is an add-on and is not available to everyone by default. Contact Perform for more information.
ST{}
(Soccer)
Statistics - MLU property containing statistics for the current fixture (see the next section). Values: Home|Away
 O  Offside
 SH  Shots
 F  Fouls
 SHW  Shots Woodwork
 FK  Free Kicks
 BA  Break Aways
 DAT  Dangerous Attacks
 AT  Attacks
 YC  Yellow Cards
 RC  Red Cards
 SHG  ShotsOnTarget
 SHB  ShotsOffTarget
 SUB  Substitutions
 CR  Corners
 SB  Shots Blocked
 GK  Goal kicks
 P  Penalties
 SHT  Score at Half Time
 SFT  Score at Full Time
 SETHT  Score at Half Time in Extra Time
 SETFT  Score at Full Time in Extra Time
 SPSFT  Score after penalty shootout
ST{}
(Basketball)
Statistics - MLU property containing statistics for the current fixture (see the next section). Values: Home|Away
 TI  Technical Foul
 PB  Player Back
 PI  Player Injured
 PF  Personal Foul
 DQP  Disqualified Player
 P1  Single Points Scored
 P2  Double points scored
 P3  Triple points scored
 FT1  Single free throws awarded
 FT2  Double Free throws awarded
 FT3  Triple free throws awarded
 MFT  Missed free throws
 F  Fouls
 FO  Fouled Outs
 TO  Timeouts
 B  Balls
 SQ1  Score 1st Quarter
 SHT  Score 2nd Quarter
 SQ3  Score 3rd Quarter
 SFT  Score Full time
ST{}
(Ice Hockey)
Statistics - MLU property containing statistics for the current fixture (see the next section). Values: Home|Away
 TI  Technical Foul
 PS  Penalty Shots
 SH  Shots
 FW  Faceoffs Won
 OS  Offsides
 IC  Icings
 TO  Timeouts
 PR  Penalty Runnings
 AT  Attacks
 SP1  Score 1st Period
 SP2  Score 2nd Period
 SP3  Score 3rd Period
ST{}
(Volleyball)
Statistics - MLU property containing statistics for the current fixture (see the next section). Values: Home|Away
 AE  Aces
 BK  Blocks
 ER  Errors
 KL  Kills
 OT  Outs
 PT  Points
 PP  Penalty points
 PY  Penalties
 EX  Expulsions
 DN  Disqualifications
 SE  Service Errors
 SS1  Score after set 1
 SS2  Score after set 2
 SS3  Score after set 3
 SS4  Score after set 4
 SS5  Score after set 5
 SGS  Score after golden set
 ST  Sets
 TT  Timeouts
T{}Timeline - MLU property containing the Timeline of events that occurred prior to the connection for the current fixture (see the next section)
 EID  Event Code ID
 EN  Event Number
 M  Minute
 CP  Current Playtime
 I  Instance of this event type
 SL  Scoreline when this event occurred
 PN  Player Name
 JN  Jersey Number
 PI  Player In
 PO  Player Out
 JI  Jersey In
 JO  Jersey Out
TK[]Team Kits - MLU property containing an array of Team Kits for the current fixture (see the next section)
 {}  MLU.TK array element
  TID Team ID
  IHT Is Home Team (Boolean) – set to true if sent for home team
  D Design pattern of the jersey:
0 = plain
1 = striped horizontal
2 = striped vertical
3 = bar horizontal
4 = bar vertical
  C1 Colour 1, 4-byte color value
Bytenumber:
4 : Alpha
3 : Red
2 : Green
1 : Blue
  C2 Colour 2, 4-byte color value
Bytenumber:
4 : Alpha
3 : Red
2 : Green
1 : Blue
  S Socks, 4-byte color value
Bytenumber:
4 : Alpha
3 : Red
2 : Green
1 : Blue
  P Pants, 4-byte color value
Bytenumber:
4 : Alpha
3 : Red
2 : Green
1 : Blue
FORM{}Form (Historical Statistics data) - MLU property containing historical form data for the current fixture (see the next section)
 HS{}
AS{}
  FORM property
HS = Home Statistics Average | AS = Away Statistics Average
  AL{}
HO{}
AW{}
 MLU.FORM.HS | MLU.FORM.AS property
AL = Overall | HO = Home | AW = Away
All Sports  ASAverage Goals Scored
All Sports  ACGoals Conceded
Soccer  FSAverage First to Score
Soccer  CRAverage Corners
Soccer  LHAverage Leading at Half Time
Soccer  LFAverage Leading at Half Time and Full Time
Basketball  FTAverage Free Throws
Ice Hockey  SRSaves Rate
Ice Hockey  FTGFirst Three Goals rate
Volleyball  WFSLeading all sets
 HM[]
AM[]
  Form (Historical Match data) MLU.FORM.HS property containing an array of historical match data:
HM = Home Matches | AM = Away Matches
  {} Content of MLU.FORM.HM | MLU.FORM.AM array
   IDGSM match ID
   DTGame Start
   AAway Score
   HHome Score
   TGame type (Home/Away)
   LNLeague/Competition Name
   TNTeam/Competitor Name
H2H{}   Form (Head-to-Head data) - MLU property containing historical data on fixtures between the current teams for the current fixture
 HST[]  MLU.H2H property containing an array historical half time scores between the two teams
  {} Content of MLU.H2H.HST array
   IDSystem fixture ID
   DTDate of the fixture
   TMKick-off time of the fixture (UTC)
   HHome score
   AAway score
   TH = Current Home team was at home
A = Current Away team was at home
 MS{}  MLU.H2H property
  CNT MLU.H2H.MS property
  HT{}
AT{}
 MLU.H2H.MS property containing statistics for the head-to-head:
HT = Home team | AT = Away team
   WGames won
   LGames lost
   DGames drawn
   GGames scored
TD{}   Team data - MLU property containing team data for the current fixture
Soccer /
Ice Hockey
HG[]
AG[]
  Goals - MLU.TD property containing an array of objects relating to the goals scored by the Home/Away team
  {} Content of MLU.TD.HG | MLU.TD.AG array
   PLPlayer name
   GGames scored
   GPGAverage goals per game
Soccer /
Ice Hockey
HA[]
AA[]
  Assists - MLU.TD property containing an array of objects relating to the goals scored by the Home/Away team
  {} Content of MLU.TD.HV | MLU.TD.AV array
   PLPlayer name
   AAssists
   APGAverage assists per game
Soccer /
Basketball
HV[]
AV[]
  Win Rate - MLU.TD property containing an array of objects relating to most valuable player on the Home/Away team
  {} Content of MLU.TD.HV | MLU.TD.AV array
   PLPlayer name
   POPosition
   WRThe win rate for the team when this player was playing
BasketballHP[]
AP[]
  Points - MLU.TD property containing an array of objects relating to points scored by the Home/Away team
  {} Content of MLU.TD.HP | MLU.TD.AP array
   PLPlayer name
   PPoints
   PPGPoints rate
BasketballHF[]
AF[]
  Free Throws - MLU.TD property containing an array of objects relating to free throws by the Home/Away team
  {} Content of MLU.TD.HF | MLU.TD.AF array
   PLPlayer name
   FFree throws
   FTFree throw Tries
   FRFree throw Rate
VolleyballHA[]
AA[]
  Aces - MLU.TD property containing an array of objects relating to aces by the Home/Away team
  {} Content of MLU.TD.HA | MLU.TD.AA array
   PLPlayer name
   AAces
   APGAces rate per game
VolleyballHK[]
AK[]
  Kills - MLU.TD property containing an array of objects relating to kills by the Home/Away team
  {} Content of MLU.TD.HK | MLU.TD.AK array
   PLPlayer name
   KKills
   KPGKills rate per game
LU{}Line-Ups MLU.TD property containing Line-Up (LU) data for the current fixture
 HLU[]
ALU[]
HSUB[]
ASUB[]
  HLU = Home team line-up
ALU = Away team line-up
HSUB = Home team Subs line-up
ASUB = Away team subs line-up
  {} Content of MLU.LU.*LU array
   XX-coordinate - see Line-up message X/Y coordinates
   YY-coordinate - see Line-up message X/Y coordinates
   PLPlayer name
   PNPlayer number
   POPlayer position
 RF[]   
  {}  
   RFThe referee's name/official's name
   TPThe official's role type. Values include:
MN = main | AT = assistant | FO = Fourth Official
Line-up message X/Y coordinates
AttributeValue and description
"X" coordinate output
GKGoalkeeper
D1Base defensive line
D2Between the D1 and the DM
DMDefensive midfield line
AMAttacking midfield line
AAttacking line
MBase midfield line
"Y" coordinate output
CLCentre left
CCentre
CRCentre right
RRight

Back to top

 

Zone Information - Soccer and Ice Hockey

A sport-specfic zone code describes the area of the field where the event has taken place for all sports that have zone, such as Soccer or Ice Hockey. Zones exist in both halves of the field, so the direction is determined by the teamId, such as the team taking the free kick is attacking at this end.

The figure below shows zone information for Soccer, with the codes used in Z property of the MLU.

Zone Information for Soccer

Zone ID Descriptions - Soccer
Zone IDDescription
FK1A free kick in the penalty box
FK2A mid-field free kick
FK3LA free kick in the left wing
FK3RA free kick in the right wing
FK4A free kick inside the halfway line
FK5A free kick behind the halfway line
CR LA corner to the left of the goal
CR RA corner to the right of the goal
 

Zone Information for Ice Hockey

Zone ID Descriptions - Ice Hockey
Zone IDDescription
IH_Z1Bully Zone 1
IH_Z2LBully Zone 2 Left
IH_ZRBully Zone 2 Right
IH_Z3LBully Zone 3 Left
IH_Z3RBully Zone 3 Right
IH_Z4Bully Zone 4

Back to top

 

Soccer Event Mapping Information

Soccer Event Code ID List
Event Code IDDescription
0Start first half
1Stop first half
2Start second half
3Stop second half
4Start first half extra time
5Stop first half extra time
6Start second half extra time
8Start penalty shoot out
9Stop penalty shoot out
10Start first half, kickoff: Home
11Start first half, kickoff: Away
12Start second half, kickoff: Home
13Start second half, kickoff: Away
14Start first half extra time, kickoff: Home
15Start first half extra time, kickoff: Away
16Start second half extra time, kickoff: Home
17Start second half extra time, kickoff: Away
18Start penalty shoot out, first pen: Home
19Start penalty shoot out, first pen: Away
20Stop game
129Danger
132Injury break
133Players are coming out
134Player coming out
135National anthem singing
136Shake hands
137Flip coin
138Minute of silence
139Prize giving ceremony
140Photo taking
141Game about to start
142Penalty missed
143Possible red card
144Possible penalty
145No red card
146No penalty
147Retake penalty
148Restart game (after break in play, such as an injury)
149Game suspended
197Updating score (update started)
198Score updated (update finished)
207Possible free kick
208No free kick
209Referee ball
256Cancel last sent
257Clear events
258Game conditions change
260Extra time
261Scorer
262Zone information
276Start game clock
277Stop game clock
278Adjust game clock
279Scorer correct statistics
280Period score confirmation
283Substitution update
285Player data confirmed
513System message
515Scout offline
516Connection problems
520Lineup changed
524Jersey colours changed
1024Attack - Home
1025Corner - Home
1026Dangerous attack - Home
1027Dangerous free kick - Home
1028Free kick - Home
1029Goal - Home
1030Cancel goal - Home
1031Penalty - Home
1032Red card - Home
1033Shot - Home
1034Yellow card - Home
1039Shot on target - Home
1040Shot off target - Home
1041Shot woodwork - Home
1042Foul - Home
1043Offside - Home
1044Kick-off - Home
1045Yellow/red card - Home
1046Cancel yellow/red card - Home
1047Cancel red card - Home
1048Cancel yellow card - Home
1049Cancel penalty - Home
1050Cancel corner - Home
1051Safe - Home
1052Danger - Home
1053Goal kick - Home
1054Throw in - Home
1055Substitiution - Home
1056Dangerous shot - Home
1058Shot blocked - Home
1059Retake penalty - Home
1060Missed penalty - Home
1062Possible penalty - Home
1066Possible corner - Home
1067No corner - Home
2048Attack - Away
2049Corner - Away
2050Dangerous attack - Away
2051Dangerous free kick - Away
2052Free kick - Away
2053Goal - Away
2054Cancel goal - Away
2055Penalty - Away
2056Red card - Away
2057Shot - Away
2058Yellow card - Away
2063Shot on target - Away
2064Shot off target - Away
2065Shot woodwork - Away
2066Foul - Away
2067Offside - Away
2068Kick off - Away
2069Yellow/red card - Away
2070Cancel yellow/red card - Away
2071Cancel red card - Away
2072Cancel yellow card - Away
2073Cancel penalty - Away
2074Cancel corner - Away
2075Safe - Away
2076Danger - Away
2077Goal kick - Away
2078Throw in - Away
2079Substitution - Away
2080Dangerous shot - Away
2082Shot blocked - Away
2083Retake penalty - Away
2084Missed penalty - Away
2085Possible penalty - Away
2090Possible corner - Away
2091No corner - Away

Back to top

 

Basketball Event Mapping Information

Basketball Event Code ID List
Event Code IDDescription
0Start first half
1Stop first half
2Start second half
3Stop second half
31Start 1st quarter
32Start 2nd quarter
33Start 3rd quarter
34Start 4th quarter
35Start overtime
36Stop quarter
37Stop overtime
101Stop 1st quarter
102Stop 2nd quarter
103Stop 3rd quarter
104Stop 4th quarter
129Danger
135National Anthem Singing
138Minute of silence
39Prize-giving
157Timeout
158Retake free-throw
159No free-throw
160Players warming-up
161Final call to the courts by referees
171Players are introduced
1723-minute warning by referee
178Possible free-throw
197Updating score (update started)
198Score updated (update finished)
256Cancel last sent
257Clear events
258Game conditions change
261Scorer
276Start game clock
277Stop game clock
278Adjust game clock
279Scorer correct statistics
280Last period score confirmation
285Player data confirmed
513System message
515Scout offline
516Connection problems
520Lineup changed
524Jersey colours changed
10932 Points - Home team
10943 Points - Home team
1096Foul - Home team
1097Fouled out - Home team
1099Free throw - Home team
11002 free throws - Home team
11011 point - Home team
1102Timeout - Home team
1108Ball - Home team
11103 free-throws - Home team
1111Cancel 1 point - Home team
1112Cancel 2 point - Home team
1113Cancel 3 point - Home team
1114Missed free-throw - Home team
1115Disqualified player - Home team
1116Tech./Int. foul - Home team
1117Personal foul - Home team
1122Player injured - Home team
1123Player back in game - Home team
1127Point confirmation - Home team
21172 points - Away team
21183 points - Away team
2120Foul - Away team
2121Fouled out - Away team
2123Free throw - Home team
21242 free throw - Away team
21251 point - Away team
2126Timeout - Away team
2132Ball - Away team
21343 free throws - Away team
2135Cancel 1 point - Away team
2136Cancel 2 point - Away team
2137Cancel 3 point - Away team
2138Missed free-throw - Away team
2139Disqualified player - Away team
2140Tech./Int - Away team
2141Personal foul - Away team
2146Player injured - Away team
2147Player back in game - Away team
2151Point confirmation - Away team

Back to top

 

Ice Hockey Event Mapping Information

Ice Hockey Event Code ID List
Event Code IDDescription
18Start penalty shoot out, first pen: home
19Start penalty shoot out, first pen: away
35Start overtime
37Stop overtime
60Start 1st period
61Stop 1st period
63Stop 2nd period
64Start 3rd period
65Stop 3rd period
128Safe
132Game suspended – player injured
133Players are coming out
134*Players are lined up
135National anthem singing
136Shake hands
137Flip coin
138Minute of silence
139*Prize giving ceremony
140Photo taking
141Game about to start
142Penalty missed
144Possible penalty
146No penalty
147Retake penalty
148Restart game (after break in play, such as an injury)
149Game suspended
150Next scorer
157Timeout
160Players warming up
171Players introduction
174Possible suspension
175No suspension
187Point under investigation
195Faceoff
197Updating score (update started)
198Score updated (update finished)
207Possible free kick
212Faceoff done
213Faceoff undecided
256Cancel last sent
257Clear events
258Game conditions change
282Time adaptation
524Jersey colours changed
1474Danger - Home
1475Goal - Home
1476Penalty shot - Home
1477Missed penalty shot - Home
1478Retake penalty shot - Home
14792-minute penalty - Home
14805-minute penalty - Home
148110-minute penalty - Home
1482+2 minute penalty - Home
1483+10 minute penalty - Home
1484Game misconduct penalty - Home
1485Shot - Home
1487Faceoff won - Home
1488Offside - Home
1489Icing - home
1490Timeout - Home
14922-minute penalty over - Home
14935-minute penalty over - Home
1494Cancel goal - Home
1495Cancel penalty shot - Home
1496Cancel 2-minute penalty - Home
1497Cancel 5-minute penalty - Home
1499Game misconduct penalty - Home
1500Penalty running - Home
1501Penalty running over - Home
1502Goalkeeper off - Home
1504Goalkeeper on - Home
1505Attacking half - Home
1508+5 minute penalty - Home
1509Cancel +2 minute penalty - Home
1510Cancel +5 minute penalty - Home
1511Cancel 10 minute penalty - Home
1512Cancel +10 minute penalty - Home
2499Goal - Away
2500Penalty shot - Away
2501Missed penalty shot - Away
2502Retake penalty shot - Away
25032-minute penalty - Away
25045-minute penalty - Away
250510-minute penalty - Away
2506+2 minute penalty - Away
2507+10 minute penalty - Away
2508Game misconduct penalty - Away
2509Shot - Away
2511Faceoff won - Away
2512Offside - Away
2513Icing - Away
2514Timeout - Away
25162-minute penalty over - Away
25175-minute penalty over - Away
2518Cancel goal - Away
2519Cancel penalty shot - Away
2520Cancel penalty shot - Away
2521Cancel 5-minute penalty - Away
2523Cancel game misconduct penalty - Away
2524Penalty running - Away
2525Penalty running over - Away
2526Goalkeeper off - Away
2528Goalkeeper on - Away
2529Attacking half - Away
2532+5 minute penalty - Away
2533Cancel +2 minute penalty - Away
2534Cancel +5 minute penalty - Away
2535Cancel 10 minute penalty - Away
2536Cancel +10 minute penalty - Away

Back to top

 

(Beach) Volleyball Event Mapping Information

(Beach) Volleyball Event Code ID List
Event Code IDDescription
41Start 1st set
42Start 2nd set
43Start 3rd set
44Start 4th set
45Start 5th set
46Stop set
128Safe
129Danger
132Game suspended – player injured
134Players are lined up
135National anthem singing
136Shake hands
137Flip coin
138Minute of silence
139*Prize giving ceremony
141Game about to start
157Timeout
160Players warming up
171Players introduction
187Point under investigation
197Updating score (update started)
198Score updated (update finished)
199Technical timeout
216Statistics confirmation
217Warming-up at the net
218Possible disqualification
219No disqualification
256Cancel last sent
257Clear events
258Game conditions change
524Jersey colours changed
1408Service - Home
1409Kill - Home
1410Block - Home
1412Out - Home
1413Error - Home
1414Error - Home
1417Service error - Home
1418Penalty - Home
1419Expulsion - Home
1420Disqualification - Home
1421Point - Home
1422Timeout - Home
1423Set - Home
1425Cancel penalty - Home
1426Cancel expulsion - Home
1427Cancel disqualification - Home
1428Cancel point - Home
1429Serve in - Home
1431Point confirmation - Home
1432Penalty point - Home
1433Unknown point - Home
2432Service - Away
2433Kill - Away
2434Block - Away
2436Out - Away
2437Error - Away
2438Ace - Away
2441Service error - Away
2442Penalty - Away
2443Expulsion - Away
2444Disqualification - Away
2445Point - Away
2446Timeout - Away
2447Set - Away
2449Cancel penalty - Away
2450Cancel expulsion - Away
2451Cancel disqualification - Away
2452Cancel point - Away
2453Serve in - Away
2455Point confirmation - Away
2456Penalty point - Away
2457Unknown point - Away

Back to top

 

Play State IDs

Play State IDDescription
0Open
1Finished
2Cancelled
3Running
4Suspended
5Abandoned

Back to top

 

Ticker State IDs

Play State IDDescription
0Invalid State
1Not Started
2Rt First Half
4Rt Pause
8Rt Second Half
16Finish
32Finish Rt
64Ot First Half
128Ot Pause
256Ot Second Half
512Finish Ot
1024Penalty Shootout
2000Quarter break
20011st Quarter
20022nd Quarter
20033rd Quarter
20044th Quarter
2005Overtime
2006Overtime break
2100Set break
21011st set
21022nd set
21033rd set
21044th set
21055th set
2150Golden set
2300Period Break
23011st Period
23022nd Period
23033rd Period
2005Overtime
2006Overtime Break
2300Period Break

Back to top

 

Cricket Feed Information

Here, you will information on the fields and values that are returned from the following data feeds:

Feed CodeFeed NameDescription
C2Score CardEssentially, it serves as a live scorecard and the feed is updated after every ball.
It details: Team details and IDs, Venue details; Match status or result; Innings by innings scores; Key match data.
C50Ball-by-BallA live ball-by-ball account of every collected action after each ball throughout the duration of the match.
It details: Batting; Bowling; Fielding details per ball.
C51Event NotificationProvides a warning that an event might happen rather than logging events after they have taken place. This is a time-critical Fastpath feed used for betting customers and is not intended for media publication.
It details: Innings information (latest scorec etc.); Striking batsman; Betting alert information; External conditions (weather/light).

Cricket: C2 Feed (Score Card)

The C2 feed essentially serves as a live scorecard feed which is updated after every ball. It details: Team details and IDs, Venue details; Match status or result; Innings by innings scores; Key match data.

Here, you can find an explanation of the response fields and data you can expect to see.

NestingCricketMatchSummary
DescriptionThe root element of the Cricket Match Summary related fields
Attributetimestamp
DescriptionThe time of file generation
Data typeString
ValuesDynamic - date and time in format YYYYMMDDThhmmss+hhmm
NestingCricketMatchSummary/Innings
DescriptionThe parent element which nests information on each match innings
Attributeid
DescriptionUnique innings ID
Data typeInteger
Values1 = 1st innings
2 = 2nd innings
3 = 3rd innings
4 = 4th innings
5 = 1st innings of Super Over
6 = 2nd innings of Super Over
 
Attributebatting_team_id
DescriptionUnique Opta ID
Data typeInteger
ValuesDynamic
 
Attributebowling_team_id
DescriptionUnique Opta ID
Data typeInteger
ValuesDynamic
 
Attributedeclared
DescriptionTeam declaration or not
Data typeInteger
Values0 = No | 1 = Yes
 
Attributedl_overs
DescriptionThe revised number of overs in a Duckworth Lewis match. This will only appear for D/L matches
Data typeInteger or decimal
ValuesDynamic
 
Attributedl_target
DescriptionThe revised target in a Duckworth Lewis match - this will only appear for D/L matches
Data typeInteger
ValuesDynamic
 
Attributefollow_on
DescriptionWhether the team followed on or not
Data typeInteger
Values0 = No | 1 = Yes
 
Attributeforfeited
DescriptionWhether the team forfeited or not
Data typeInteger
Values0 = No | 1 = Yes
 
Attributeovernight_runs
DescriptionOvernight runs scored
Data typeInteger
ValuesDynamic
 
Attributeovernight_wickets
DescriptionOvernight wickets taken
Data typeInteger
ValuesDynamic
NestingCricketMatchSummary/Innings/Batsmen
DescriptionRoot element containing statistical information on each of the batsmen
NestingCricketMatchSummary/Innings/Batsmen/Batsman
DescriptionRoot element of each individual batsman
Attributeovernight_wickets
DescriptionOvernight wickets taken
Data typeInteger
ValuesDynamic
 
Attributeid
DescriptionUnique Opta ID
Data typeInteger
ValuesDynamic
 
Attributeballs_faced
DescriptionNumber of balls faced by the batsman
Data typeInteger
ValuesDynamic
 
Attributebowled_by
DescriptionUnique bowler ID
Data typeInteger
ValuesDynamic
 
Attributecaught_by
DescriptionUnique fielder ID involved in the fielding action. This can be a catch, run out or stumping
Data typeInteger
ValuesDynamic
 
Attributeday
DescriptionBatting day number when the batsman came to the crease
Data typeInteger
Values1 = Day 1
2 = Day 2
3 = Day 3
4 = Day 4
5 = Day 5
 
Attributedismissal_id
DescriptionThe way in which the batsman was dismissed
Data typeInteger
Values* -1 = yet to bat
0 = not out
1 = bowled
2 = caught and bowled
3 = caught
4 = handled the ball
5 = hit ball twice
6 = hit wicket
7 = LBW
8 = obstructing the field
9 = retired hurt
10 = retired out
11 = run out
12 = stumped
13 = timed out
14 = caught (sub)
15 = E31 run out (sub)
16 = absent hurt
17 = retired not out
18 = stumped (sub)
 
Attributefours_scored
DescriptionThe number of boundary fours scored by the batsman
Data typeInteger
ValuesDynamic
 
Attributehow_out
DescriptionText decription of dismissals
Data typeString
ValuesDynamic
 
Attributeminutes
DescriptionThe amount of time in minutes the batsman has been at the crease
Data typeInteger
ValuesDynamic
 
Attributenon_strike
DescriptionThis value will be displayed as '1' if the batsman is the non striker
Data typeInteger
ValuesDynamic
 
Attributeon_strike
DescriptionThis value will be displayed as '1' if the batsman is on strike
Data typeInteger
ValuesDynamic
 
Attributeorder
DescriptionBatsman number in the batting order
Data typeInteger
ValuesDynamic
 
Attributeruns_scored
DescriptionThe number of runs the batsman has made during the innings
Data typeInteger
ValuesDynamic
 
Attributesixes_scored
DescriptionThe number of sixes scored by the batsman
Data typeInteger
ValuesDynamic
NestingCricketMatchSummary/Innings/Bowlers
DescriptionRoot element of each of the bowlers
NestingCricketMatchSummary/Innings/Bowlers/Bowler
DescriptionRoot element of each individual bowler
Attributeid
DescriptionUnique Opta ID
Data typeInteger
ValuesDynamic
 
Attributeballs_bowled
DescriptionThe number of legal balls the bowler has delivered
Data typeInteger
ValuesDynamic
 
Attributedot_balls
DescriptionThis is the total number of dot balls a bowler acheived in their individual spell of bowling
Data typeInteger
ValuesDynamic
 
Attributemaidens_bowled
DescriptionThe number of maidens (overs with no score), the bowler has executed
Data typeInteger
ValuesDynamic
 
Attributeno_balls
DescriptionNumber of no balls bowled in the innings
Data typeInteger
ValuesDynamic
 
Attributenon_strike
DescriptionThis will denote the previous bowler
Data typeInteger
Values1 = (if that bowler was the previous)
 
Attributeon_strike
DescriptionThe current bowler
Data typeInteger
Values1 = (if bowling)
 
Attributeorder
DescriptionOrder in which the bowlers bowled
Data typeInteger
ValuesDynamic
 
Attributeovers_bowled
DescriptionThe number of overs the bowler has bowled
Data typeInteger
ValuesDynamic
 
Attributeruns_conceded
DescriptionThe number of runs the bowler has conceded
Data typeInteger
ValuesDynamic
 
Attributewickets_taken
DescriptionThe number of wickets taken by that bowler
Data typeInteger
ValuesDynamic
 
Attributewides
DescriptionThe number of wide deliveries conceded by that bowler
Data typeInteger
ValuesDynamic
NestingCricketMatchSummary/Innings/Extras
DescriptionRoot element of extra information
Attributebyes
DescriptionTotal number of byes
Data typeInteger
ValuesDynamic
 
Attributeleg_byes
DescriptionTotal number of leg byes
Data typeInteger
ValuesDynamic
 
Attributeno_balls
DescriptionTotal number of no balls
Data typeInteger
ValuesDynamic
 
Attributepenalties
DescriptionTotal value of penalty runs
Data typeInteger
ValuesDynamic
 
Attributetotal_extras
DescriptionTotal number of extras
Data typeInteger
ValuesDynamic
 
Attributewides
DescriptionTotal number of wide deliveries
Data typeInteger
ValuesDynamic
NestingCricketMatchSummary/Innings/FallofWickets
DescriptionRoot element of the fall of wicket table
NestingCricketMatchSummary/Innings/FallofWickets/FallofWicket
DescriptionRoot element showing fall of wicket information
Attributeorder
DescriptionFall of wicket number
Data typeInteger
ValuesDynamic
 
Attributeover_ball
DescriptionOver and ball number when the wicket fell
Data typeInteger
ValuesDynamic
 
Attributeplayer_id
DescriptionOpta player ID
Data typeInteger
ValuesDynamic
 
Attributeruns
DescriptionNumber of runs the team has at the fall of wicket
Data typeInteger
ValuesDynamic
NestingCricketMatchSummary/Innings/Total
DescriptionRoot element of the innings total
Attributeovers
DescriptionTotal number of overs bowled
Data typeInteger
ValuesDynamic
 
Attributeruns_scored
DescriptionTotal number of runs scored
Data typeInteger
ValuesDynamic
 
Attributewickets
DescriptionTotal number of wickets taken
Data typeInteger
ValuesDynamic
Note: The elements and attributes below in the Retirements table will only appear once a substitution has taken place. Otherwise they won't appear in the feed.
NestingCricketMatchSummary/Innings/Retirements
DescriptionRoot element of retirements
NestingCricketMatchSummary/Innings/Retirements/Retirement
DescriptionRoot element showing all retirement information
Attributeorder
DescriptionFor an on-going retirement, this should be the number of wickets lost at the time of retirement. For a returning batsman it should be the wicket number prior to when the batsman returned. For example, if batsman no. 4 comes in at fall of wicket 2, he is then injured and retires, so the order is 2. Then the #5 batsman is dismissed and he returns so the order is 3 when he comes back. There is the possibility that 2 people could retire hurt on the same wicket. Use the over and the day and time to work out the correct order.
Data typeInteger
ValuesDynamic
 
Attributeover_ball
DescriptionOver and ball number at the time of retirement or returned as appropriate
Data typeInteger
ValuesDynamic
 
Attributeplayer_id
DescriptionOpta player ID
Data typeInteger
ValuesDynamic
 
Attributeruns
DescriptionNumber of runs the team has at the time of retirement
Data typeInteger
ValuesDynamic
 
Attributewickets
DescriptionThe number of team wickets fallen at the time of retirement
Data typeInteger
ValuesDynamic
 
Attributeruns_scored
DescriptionThe scope of the batsman upon retiring
Data typeInteger
ValuesDynamic
 
Attributeretirement
DescriptionThis denotes the batsman has retired
Data typeInteger
Values0 = batsman has returned
1 = batsman has retired
 
Attributedismissal_id
DescriptionThe way in which the batsman retired
Data typeInteger
Values9 = retired hurt
17 = retired not out
 
Attributetime
DescriptionThe time the batsman retired or the time the batsman came back in
Data typeString
ValuesDynamic - a time, in the format hh:mm:ss
NestingCricketMatchSummary/MatchDetail
DescriptionRoot element showing all key match information
Attributeaway_batting_bonus
DescriptionThe number of batting bonus points the away team has accumulated in a match
Data typeDecimal
ValuesDynamic
 
Attributeaway_bowling_bonus
DescriptionThis is the number of bowling bonus points the away team has accumulated in a match.
Data typeDecimal
ValuesDynamic
 
Attributeaway_team
DescriptionAway team name
Data typeString
ValuesDynamic
 
Attributeaway_team_id
DescriptionOpta away team ID
Data typeInteger
ValuesDynamic
 
Attributecompetition_id
DescriptionOpta unique comp ID
Data typeInteger
ValuesDynamic
 
Attributecompetition_name
DescriptionCompetition name
Data typeString
ValuesDynamic
 
Attributedescription
DescriptionGame description, for example: "1st Test", "4th ODI", "T20"
Data typeString
ValuesDynamic
 
Attributedl
DescriptionAttribute to denote whether a Duckworth Lewis match is being played
Data typeInteger
Values0 = not a DL affected match
1 = Denotes a Duckworth Lewis match is in operation
 
Attributegame_date
DescriptionDate the match is played
Data typeString
ValuesDynamic - a date, in the format YYYY-MM-DD
 
Attributegame_date_time
DescriptionA UTC time code, giving the date and time of the fixture
Data typeDynamic
ValuesDate/Time - in the format YYYY-MM-DDThh:mm:ssTZD
 
Attributegame_id
DescriptionUnique game ID
Data typeInteger
ValuesDynamic
 
Attributegame_time
DescriptionGame start time
Data typeString
ValuesStart time - in the format hh:mm:ss
 
Attributegame_type_id
DescriptionUnique game type ID - this is used to group matches
Data typeInteger
Valuesid = name
1 = Test
2 = ODI
3 = Twenty20
4 = Domestic Test
5 = Domestic One Day
6 = Domestic Twenty20
7 = Non-Official Test
8 = Non-Official One Day
9 = Non-Official Twenty20
 
Attributegmt_offset
DescriptionThe difference in minutes related to GMT eg 780 is 780 minutes ahead of GMT
Data typeInteger
ValuesDynamic
 
Attributehome_batting_bonus
DescriptionThis is the number of batting points the home team has accumulated in a match.
Data typeDecimal
ValuesDynamic
 
Attributehome_bowling_bonus
DescriptionThis is the number of bowling points the home team has accumulated in a match.
Data typeDecimal
ValuesDynamic
 
Attributehome_team
DescriptionHome team name
Data typeString
ValuesDynamic
 
Attributehome_team_id
DescriptionOpta ID of the home team
Data typeInteger
ValuesDynamic
 
Attributematch_day
DescriptionCurrent day of the match which is populated only once the game starts
Data typeInteger
ValuesDynamic
 
Attributenumber_days
DescriptionMaximum number of days the match is scheduled to last
Data typeInteger
ValuesDynamic
 
Attributeresult
DescriptionThe result of the match in a text string format
Data typeString
ValuesDynamic
 
Attributeresult_id
DescriptionID related to the match result
Data typeInteger
Values0 = no result
1 = home win
2 = draw
3 = away win
4 = tied
5 = level scores draw
6 = abandoned
7 = none
 
Attributestatus_id
DescriptionThe ID related to the match status
Data typeInteger
Values0 = prematch
1 = in play
2 = tea
3 = lunch
4 = between innings
5 = stumps
6 = rain delay
7 = bad light
8 = crowd trouble
9 = pitch condition
10 = result
11 = abandoned
12 = floodlight failure
13 = play suspended unknown
14 = start delayed
15 = drinks
16 = super over
17 = dinner
 
Attributetoss
DescriptionOutcome of the toss as a text description
Data typeString
ValuesDynamic
 
Attributeman_of_the_match_1
DescriptionThe ID of the man/women of the match awarded by official sources. This attribute will be suppressed if not available. Release date 22nd October 2014.
Data typeInteger
ValuesDynamic - this information should be available across the following competitions:
All international cricket (Test, ODI and T20I)
IPL
CLt20
Women's internationals (Test, ODI and T20I)
NatWest t20 Blast
Big Bash
 
Attributeman_of_the_match_2
DescriptionThe ID of the secondary man/women of the match (if jointly awarded) decided by official sources. This attribute will be suppressed if not available. Release date 22nd October 2014.
Data typeInteger
ValuesDynamic - this information should be available across the following competitions:
All international cricket (Test, ODI and T20I)
IPL
CLt20
Women's internationals (Test, ODI and T20I)
NatWest t20 Blast
Big Bash
 
Attributeman_of_the_series_1
DescriptionThe ID of the man/women of the series awarded by official sources. This attribute will be suppressed if not available. Release date 22nd October 2014.
Data typeInteger
ValuesDynamic - this information should be available across the following competitions:
All international cricket (Test, ODI and T20I)
IPL
CLt20
Women's internationals (Test, ODI and T20I)
NatWest t20 Blast
Big Bash
 
Attributeman_of_the_series_2
DescriptionThe ID of the secondary man/women of the series awarded by official sources. This attribute will be suppressed if not available. Release date 22nd October 2014.
Data typeInteger
ValuesDynamic - this information should be available across the following competitions:
All international cricket (Test, ODI and T20I)
IPL
CLt20
Women's internationals (Test, ODI and T20I)
NatWest t20 Blast
Big Bash
 
Attributeman_of_the_series_name_1
DescriptionThe name of the first man/women of the series awarded by official sources (only displayed if this player doesn't appear in this match, otherwise suppressed). Release date 22nd October 2014.
Data typeString
ValuesDynamic - this information should be available across the following competitions:
All international cricket (Test, ODI and T20I)
IPL
CLt20
Women's internationals (Test, ODI and T20I)
NatWest t20 Blast
Big Bash
 
Attributeman_of_the_series_name_2
DescriptionThe name of the second man/women of the series awarded by official sources (only displayed if this player doesn't appear in this match, otherwise suppressed). Release date 22nd October 2014
Data typeString
ValuesDynamic - this information should be available across the following competitions:
All international cricket (Test, ODI and T20I)
IPL
CLt20
Women's internationals (Test, ODI and T20I)
NatWest t20 Blast
Big Bash
 
Attributetoss_decision
DescriptionTo determine who will bat or field first. In English County Cricket in 2016 there will now be an uncontested toss. This allows the away team the opportunity to bowl first without the need for a coin toss. If they decline then the coin toss will take place as before. No other comp has yet adopted this ruling and it remains on a trial basis.
Data typeString
Values"Field" | "Bat" | "Uncontested"
 
Attributetoss_team_id
DescriptionThe unique Opta ID of the team who made the toss decision. If there is an uncontested toss, this will be the id of the fielding side
Data typeInteger
ValuesDynamic
 
Attributetotal_overs
DescriptionTotal number of overs
Data typeInteger
ValuesDynamic
 
Attributevenue_id
DescriptionUnique Opta venue ID
Data typeInteger
ValuesDynamic
 
Attributewin_margin
DescriptionThis denotes the margin of victory. This will work in conjunction with the win_type_id above. This will be entered post match when the result established.
Data typeInteger
ValuesDynamic
 
Attributewin_type_id
DescriptionThe ID to denote the win type - this will be entered post match when the result established
Data typeInteger
Values1 = runs
2 = wickets
3 = innings
4 = forfeit
5 = super over
6 = bowl off
 
Attributemin_overs_remaining
DescriptionThis will display the number of overs left in the day. Once the number of overs is set at the start of the day, this value will count down to zero. Please note this is only available for game_type_id 1, 4, 7 and 10
Data typePositive decimal
ValuesDynamic
 
Attributehome_team_twenty20_known_name
DescriptionThe known name of the Home team playing in the domestic T20 tournament.
Note: Team names can differ across competitions so you should account for all instances.
This value will be populated for domestic T20 tournaments and will be suppressed if no alternative name is relevant (to be added 30th Jan 2017)
Data typeString
ValuesDynamic
 
Attributeaway_team_twenty20_known_name
DescriptionThe known name of the Away team playing in the domestic T20 tournament.
Note: Team names can differ across competitions so you should account for all instances.
This value will be populated for domestic T20 tournaments and will be suppressed if no alternative name is relevant (to be added 30th Jan 2017)
Data typeString
ValuesDynamic
>
NestingCricketMatchSummary/MatchDetail/Officials
DescriptionRoot element showing all official information
Attributeofficial_1_first_name
DescriptionForename of 1st umpire
Data typeString
ValuesDynamic
 
Attributeofficial_1_id
DescriptionOpta ID of 1st umpire
Data typeInteger
ValuesDynamic
 
Attributeofficial_1_initials
DescriptionInitials of the 1st umpire
Data typeString
ValuesDynamic
 
Attributeofficial_1_last_name
Descriptionsurname of 1st umpire
Data typeString
ValuesDynamic
 
Attributeofficial_1_umpire_type
DescriptionThis denotes the status of the 1st umpire.
Data typeString
Values"On Field" if official_1_id is set
 
Attributeofficial_2_first_name
DescriptionForename of 2nd umpire
Data typeString
ValuesDynamic
 
Attributeofficial_2_id
DescriptionOpta ID of 2nd official
Data typeString
ValuesDynamic
 
Attributeofficial_2_initials
DescriptionInitials of the 2nd official
Data typeString
ValuesDynamic
 
Attributeofficial_2_last_name
DescriptionSurname of 2nd umpire
Data typeString
ValuesDynamic
 
Attributeofficial_2_umpire_type
DescriptionThis denotes the status of the 2nd umpire
Data typeString
Values"On Field" if official_2_id is set
 
Attributeofficial_3_first_name
DescriptionForename of 3rd umpire
Data typeString
ValuesDynamic
 
Attributeofficial_3_id
DescriptionUnique Opta ID of 3rd umpire
Data typeInteger
ValuesDynamic
 
Attributeofficial_3_initials
DescriptionInitials of the 3rd umpire
Data typeString
ValuesDynamic
 
Attributeofficial_3_last_name
DescriptionThis denotes the status of the 3rd umpire where applicable. In usual circumstances this will be the video review umpire.
Data typeString
Values"Video" if official_3_id is set
 
Attributeofficial_4_first_name
DescriptionForename of 4th umpire
Data typeString
ValuesDynamic
 
Attributeofficial_4_id
DescriptionOpta ID of 4th umpire
Data typeInteger
ValuesDynamic
 
Attributeofficial_4_initials
DescriptionInitials of the 4th offcial
Data typeString
ValuesDynamic
 
Attributeofficial_4_last_name
DescriptionSurname of 4th umpire
Data typeString
ValuesDynamic
 
Attributeofficial_4_umpire_type
DescriptionThis denotes the status of the 4th umpire
Data typeString
Values"On Field" or left blank
Set to "Reserve" if official_4_id is set
 
Attributeofficial_5_first_name
DescriptionThis is the forename of the 5th official
Data typeString
ValuesDynamic
 
Attributeofficial_5_id
DescriptionOpta ID of 5th umpire
Data typeInteger
ValuesDynamic
 
Attributeofficial_5_initials
DescriptionInitials of the 5th umpire
Data typeString
ValuesDynamic
 
Attributeofficial_5_last_name
DescriptionSurname of 5th umpire
Data typeString
ValuesDynamic
 
Attributeofficial_5_umpire_type
DescriptionThis denotes the status of the 5th umpire. The 5th umpire will be the match referee where applicable.
Data typeString
ValuesSet to "" if official_5_id is set
 
Attributeofficial_6_first_name
DescriptionThis is the forname of the 6th official which will reflect the home scorer (released 1st May 2014)
Data typeString
ValuesDynamic
 
Attributeofficial_6_id
DescriptionThe unique Opta ID of the 6th official, the home scorer (released 1st May 2014)
Data typeInteger
ValuesDynamic
 
Attributeofficial_6_initials
DescriptionInitials of the 6th official, the home scorer (released 1st May 2014)
Data typeString
ValuesDynamic
 
Attributeofficial_6_last_name
DescriptionThe surname of the 6th official, the home scorer (released 1st May 2014)
Data typeString
ValuesDynamic
 
Attributeofficial_6_umpire type
DescriptionThis denotes the 6th official type, in this case the home scorer (released 1st May 2014)
Data typeString
ValuesHome Scorer
 
Attributeofficial_7_first_name
DescriptionThis is the forname of the 7th official, the away scorer (released 1st May 2014)
Data typeString
ValuesDynamic
 
Attributeofficial_7_id
DescriptionThe unique Opta ID of the 7th official, the away scorer (released 1st May 2014)
Data typeInteger
ValuesDynamic
 
Attributeofficial_7_initials
DescriptionInitials of the 7th official, the away scorer (released 1st May 2014)
Data typeString
ValuesDynamic
 
Attributeofficial_7_last_name
DescriptionThe surname of the 7th official, in this case the away scorer (released 1st May 2014)
Data typeString
ValuesDynamic
 
Attributeofficial_7_umpire_type
DescriptionThis denotes the official type, in this case the away scorer (released 1st May 2014)
Data typeString
ValuesAway Scorer
NestingCricketMatchSummary/MatchDetail/Venue
DescriptionRoot element showing all venue information
Attributevenue_city
DescriptionVenue city name
Data typeString
ValuesDynamic
 
Attributevenue_country
DescriptionVenue country name
Data typeString
ValuesDynamic
 
Attributevenue_id
DescriptionOpta venue ID
Data typeInteger
ValuesDynamic
 
Attributevenue_name
DescriptionVenue name
Data typeString
ValuesDynamic
NestingCricketMatchSummary/PlayerDetail
DescriptionRoot element of player detail
NestingCricketMatchSummary/PlayerDetail/Team
DescriptionRoot element showing all team information
Attributehome_or_away
DescriptionHome or Away team
Data typeString
ValuesDynamic
 
Attributeteam_id
DescriptionOpta team ID
Data typeInteger
ValuesDynamic
 
Attributeteam_name
DescriptionTeam name
Data typeString
ValuesDynamic
 
Attributehome_team_twenty20_known_name
DescriptionThe known name of the home team playing in the domestic T20 tournament. Please note that team names can differ across competitions so you should account for all instances. Note that this value will be populated for domestic T20 tournaments and will be suppressed if no alternative name is relevant (to be added 30th Jan 2017)
Data typeString
ValuesDynamic
 
Attributeaway_team_twenty20_known_name
DescriptionThe known name of the away team playing in the domestic T20 tournament. Please note that team names can differ across competitions so you should account for all instances. Note that this value will be populated for domestic T20 tournaments and will be suppressed if no alternative name is relevant (to be added 30th Jan 2017)
Data typeString
ValuesDynamic
NestingCricketMatchSummary/PlayerDetail/Team/Player
DescriptionRoot element showing all player information
Attributeid
DescriptionUnique Opta player ID
Data typeInteger
ValuesDynamic
 
Attributecaptain
DescriptionThis denotes that this player is the Captain - this value will be surpressed if the player is not the Captain
Data typeString
Values-1 will appear next to the Captain
 
Attributegame_player_id
DescriptionUnique Opta ID
Data typeInteger
ValuesDynamic
 
Attributekeeper
DescriptionDenotes the wicket keeper - if the player is not the wicket keeper this attribute won't be visible
Data typeString
Values"-1" if keeper
 
Attributeorder
DescriptionBatting order
Data typeInteger
Values1 to 13
 
Attributeplayer_first_name
DescriptionPlayer forename
Data typeString
ValuesDynamic
 
Attributeplayer_initials
DescriptionPlayer initials
Data typeString
ValuesDynamic
 
Attributeplayer_last_name
DescriptionPlayer surname
Data typeString
ValuesDynamic
 
Attributeplayer_middle_name
DescriptionThe middle name of the player
Data typeString
ValuesDynamic
 
Attributeplayer_name
DescriptionPlayer known name
Data typeString
ValuesDynamic
NestingCricketMatchSummary/CricketMatchSummary/SessionUpdates
DescriptionRoot element of the session
NestingCricketMatchSummary/SessionUpdates/session
DescriptionRoot element showing all session information
Attributeday
DescriptionDay number of the match
Data typeInteger
Values1 = Day 1
2 = Day 2
3 = Day 3
4 = Day 4
5 = Day 5
 
Attributeinnings
DescriptionInnings number of the match
Data typeInteger
Values1 = 1st innings
2 = 2nd innings
3 = 3rd innings
4 = 4th inning
 
Attributeovers
DescriptionTotal number of overs bowled at the change of status. This can also be a NULL value when a team is between innings or before the match has commenced
Data typeInteger
ValuesDynamic
 
Attributeruns
DescriptionTotal number of team runs at the change of status. This can also be a NULL value when a team is between innings or before the match has commenced
Data typeInteger
ValuesDynamic
 
Attributestatus_id
DescriptionThe status ID of the match at that time
Data typeInteger
Values0 = prematch
1 = in play
2 = tea
3 = lunch
4 = between innings
5 = stumps
6 = rain delay
7 = bad light
8 = crowd trouble
9 = pitch condition
10 = result
11 = abandoned
12 = floodlight failure
13 = play suspended unknown
14 = start delayed
15 = drinks break
16 = super over
17 = dinner
 
Attributetime
DescriptionTime at which the status information changed
Data typeString
ValuesTimestamp - in the format hh:mm:ss
 
Attributewickets
DescriptionTotal number of wickets at the change of status. This can also be a NULL value when a team is between innings or before the match has commenced
Data typeInteger
ValuesDynamic
NestingCricketMatchSummary/SessionUpdates/session/player
DescriptionRoot element showing all player information in a session
Attributeid
DescriptionOpta player ID for the batsman batting at the stage the session information has changed
Data typeInteger
ValuesDynamic
 
Attributeruns_scored
DescriptionThe not out batsmen's scores at the time of the session change. Only one batsman will be displayed if only one batsman is in
Data typeInteger
ValuesDynamic
Note: The elements and attributes below will only appear once a substitution has taken place. Otherwise they won't appear in the feed.
NestingCricketMatchSummary/SessionUpdates/session/Substitutes
DescriptionRoot element of substitutes in a session
NestingCricketMatchSummary/SessionUpdates/session/Substitutes/Substitute
DescriptionThe element showing all substitute information for a session
Attributeid
DescriptionThe unique Opta ID of incoming player replacing the substituted player
Data typeInteger
ValuesDynamic
 
Attributereplaced_player_id
Descriptionreplaced_player_id
Data typeInteger
ValuesDynamic
 
Attributeday
DescriptionDay number of the match when the change took place
Data typeInteger
Values1 = Day 1
2 = Day 2
3 = Day 3
4 = Day 4
5 = Day 5
 
Attributeinnings
DescriptionInnings number of the match. If the match ius between innings the value could be NULL
Data typeInteger
Values1 = Innings 1
2 = Innings 2
3 = Innings 3
4 = Innings 4
 
Attributeovers
DescriptionThe number of overs bowled in that innings when the sub was made. If no overs have been bowled the value will be Null. This will be expressed as Overs.Ball
Data typeString
ValuesDynamic
 
Attributetime
DescriptionTime at which the substitution was made
Data typeString
ValuesTimestamp - in the format hh:mm:ss

Back to top

 

Cricket: C50 Feed (Ball-by-Ball)

Here, you can find an explanation of the response fields and data you can expect to see.

Delivery Timings

Once a production environment is established between Opta and the subscriber, Opta will deliver this feed after every ball for all official county, international and IPL matches.

In every instance we strongly recommend that you consult the C1 fixtures file to denote the collection detail level of each match. Some matches that are initially designated as official are then often changed, which means they are not official.

File naming convention

C50 feed file naming convention: ballbyball-{gameID}-{inningsID}-{over#}-{ball#}.xml

Note: All fields below will be populated for all international (Test, ODI and T20) and IPL matches. However, the attributes listed in yellow are the fields that will be populated based on the collection from the English county cricket competitions as of the start of 2012, the ICC Women's World Cup in 2013 and the Australian Domestic comps as of 2015.
For information about how to deal with substitutes, penalties, retirements and status changes, see the new C50a feed if you wish to be notified about these extra events. The C50a feed is to be used in conjunction with the C50 feed.
NestingBallSummary
DescriptionRoot element of the Ball Summary related fields
Attributetimestamp
DescriptionThe timestamp of when the feed is generated
Data typeString
ValuesDynamic - a timestamp in the format YYYYMMDDThhmmss+0000
NestingBallDetail
DescriptionRoot element of the Ball Detail related fields
Attributeid
DescriptionUnique Opta ball number ID
Data typeInteger
ValuesDynamic
 
Attributeair_controlled
DescriptionWorks in conjunction with the field below. Whether the facing batsman hit the ball in the air in an controlled manner or not
Data typeInteger
Values0 = not in the air, or
1 = controlled
 
Attributeair_not_controlled
DescriptionWorks in conjunction with the field above. Whether the facing batsman hit the ball in the air in an uncontrolled manner or not
Data typeInteger
Values0 = not in the air, or
1 = controlled
 
Attributeappeal_id
DescriptionThe appeal ID number denoting whether the bowling team appealed or not
Data typeInteger
Values0 = no appeal, or
1 = appeal
 
Attributeappeal_type_name
DescriptionDenotes the outcome of the appeal
Data typeString
ValuesNot Out or Out
 
Attributeball_time
DescriptionTimestamp of the commencing of a bowler's run up, that is when he starts his run up
Data typeString
ValuesDynamic - a timestamp, in the format YYYY-MM-DD hh:mm:ss
 
Attributebatsman_hand
DescriptionDenotes whether a batsman is right or left-handed
Data typeString
Values"1" = right-handed, or
"2" = left-handed
 
Attributebatsman_id
DescriptionUnique Opta ID of the batsman
Data typeInteger
ValuesDynamic
 
Attributebatsman_name
DescriptionBatsman name
Data typeString
ValuesDynamic
 
Attributebatsman_runs
DescriptionThe total number of runs scored by the batsman off that ball
*Note: This is different from team runs
Data typeString
ValuesDynamic
 
Attributebatting_connection
DescriptionDenotes the ID which relates to the batting shot connection type. This works in conjunction with batting_connection_name below. Note: The values from 20-24 will be for county matches only
Data typeString
Values1 = Middled
2 = Missed
3 = Thick edge
4 = Outside edge
5 = Inside edge
6 = Top edge
7 = Bottom edge
8 = Padded
9 = Left
10 = Mis-timed
11 = Bat pad
12 = Hit pad
13 = None
14 = Leading edge
15 = Hit body
16 = Helmet
17 = Gloved
18 = Shoulders arms
19 = Well timed
20 = No shot
21 = Play + miss
22 = False shot
23 = Played
24 = Strong
25 = Missed (Leg Side)
26 = Play and Miss (Leg Side)
 
Attributebatting_connection_name
DescriptionDenotes the text value of the batting shot type connection. This works in conjunction with batting_connection above
Data typeString
ValuesMiddled
Missed
Thick edge
Outside edge
Inside edge
Top edge
Bottom egde
Padded
Left
Mis-timed
Bat pad
Hit pad
None
Leading edge
Hit body
Hit helmet
Gloved
Shoulders arms
Well timed
No shot
Play + miss
False shot
Played
Strong
Missed (Leg Side)
Play and Miss (Leg Side)
 
Attributebatting_feet
DescriptionThe Opta ID that relates to the type of foot movement of the batsman involved
Data typeString
Values1 = No movement
2 = Front foot
3 = Back foot
4 = Down the track
5 = Backs away
6 = Moves infront
7 = Ducked
8 = Swayed away
 
Attributebatting_shot_type
DescriptionThe Opta ID that relates to the shot type of the batsman
Data typeString
Values1 = No shot
2 = Drive
3 = Sweep
4 = Cut
5 = Slog-sweep
6 = Hook
7 = Upper cut
8 = Pull
9 = Glance
10 = Forward defensive
11 = Reverse sweep
12 = Backward defensive
13 = Worked
14 = Pushed
15 = Flick
16 = Steer
17 = Late cut
18 = Slog
19 = Fended
20 = Dropped
 
Attributebatting_team_id
DescriptionUnique Opta ID of the batting team
Data typeInteger
ValuesDynamic
 
Attributeboundary
DescriptionThis denotes whether the outcome of the ball resulted in a boundary
Data typeInteger
Values0 = no boundary, or
1 = boundary
 
Attributebowler_hand
DescriptionBowler handedness
Data typeInteger
Values1 = right-handed, or
2 = left-handed
 
Attributebowler_id
DescriptionThe unique Opta ID of the bowler bowling that ball
Data typeInteger
ValuesDynamic
 
Attributebowler_name
DescriptionThe known name of the bowler for the ball in question
Data typeString
ValuesDynamic
 
Attributebowler_runs_conceded
DescriptionThe number of runs the bowler conceded for the ball in question
Data typeInteger
ValuesDynamic
 
Attributebowling_detail
DescriptionThe Opta ID number relating to the delivery detail for the ball in question - this works in conjunction with the field below
Data typeInteger
Values1 = No movement
2 = Seam in
3 = Seam away
4 = Reverse swing
5 = Slower ball
6 = In swinger
7 = Away swinger
8 = Off cutter
9 = Leg cutter
10 = Off break
11 = Googly
12 = Arm ball
13 = Top spinner
14 = Chinaman
15 = Leg spinner
16 = Stock ball
17 = Quicker ball
18 = Doosra
19 = Slider
20 = Flipper
21 = Carrom ball
 
Attributebowling_detail_name
DescriptionThe text value relating to the bowling IDs above
Data typeString
ValuesNo movement
Seam in
Seam away
Reverse swing
Slower ball
In swinger
Away swinger
Off cutter
Leg cutter
Off break
Googly
Arm ball
Top spinner
Chinaman
Leg spinner
Stock ball
Quicker ball
Doosra
Slider
Flipper
Carrom ball
 
Attributebowling_from
DescriptionWhether the bowler on that ball bowls from over or around the wicket
Data typeInteger
Values1 = Over
2 = Round
 
Attributebowling_length
DescriptionThe length of that delivery in question. This works in conjunction with the bowling_length_name below
Data typeInteger
Values1 = Beamer
2 = Full toss
3 = Yorker
4 = Half volley
5 = Length ball
6 = Back of a length
7 = Short
8 = Half tracker
 
Attributebowling_length_name
DescriptionThe text value of the delivery in question - this works in conjunction with the bowling_length ID above
Data typeString
ValuesBeamer
Full toss
Yorker
Half volley
Length ball
Back of a length
Short
Half tracker
 
Attributebowling_line
DescriptionThe Opta ID number that relates to the bowling line of the delivery in question - this works in conjunction with the bowling_line_name
Data typeInteger
Values1 = Wide
2 = Outside off
3 = Off stump
4 = Middle stump
5 = Leg stump
6 = Down leg
7 = Wide down leg
 
Attributebowling_line_name
DescriptionThe text value relating to the bowling delivery line, which works in conjunction with the ID above
Data typeString
ValuesWide
Outside off
Off stump
Middle stump
Leg stump
Down leg
Wide down leg
 
Attributebowling_team_id
DescriptionUnique Opta team ID of the bowling team
Data typeInteger
ValuesDynamic
 
Attributebowling_type
DescriptionThe Unique Opta ID relating to the type of bowling delivery - this works in conjunction with the bowling_type_name below
Data typeInteger
Values1 = Fast seam
2 = Medium seam
3 = Off spin
4 = Leg spin
5 = Orthodox
6 = Unorthodox
 
Attributebowling_type_name
DescriptionThe text value relating to the type of bowling delivery for that ball being bowled in the match - this works in conjunction with the bowling_type ID value above
Data typeString
ValuesFast seam
Medium seam
Off spin
Leg spin
Orthodox
Unorthodox
 
Attributebye
DescriptionThe number of byes conceded by the fielding team on that ball
Data typeInteger
ValuesDynamic
 
Attributedecision_umpire_id
DescriptionThe unique Opta ID of the umpire who gave the decision
Data typeInteger
ValuesDynamic
 
Attributedismissal_id
DescriptionThe dismissal ID value - this works in conjunction with the dismissal_type_name value
Data typeString
Values"" = Null
0 = Not out
1 = Bowled
2 = Caught and bowled
3 = Caught
4 = Handled the ball
5 = Hit ball twice
6 = Hit wicket
7 = LBW
8 = Obstructing field
9 = Retired hurt
10 = Retired out
11 = Run out
12 = Stumped
13 = Timed out
-1 = Yet to bat
4 Caught (sub)
15 = Run out (sub)
16 = Absent hurt
 
Attributedismissal_player_id
DescriptionThe unique Opta ID of the dismissed player
Data typeString
ValuesNull
Not out
Bowled
Caught and bowled
Caught
Handled the ball
Hit ball twice
Hit wicket
LBW
Obstructing field
Retired hurt
Retired out
Run out
Stumped
Timed out
Yet to bat
Caught (sub)
Run out (sub)
Absent hurt
 
Attributedismissal_player_id
DescriptionThe unique Opta ID of the dismissed player
Data typeInteger
ValuesDynamic
 
Attributedismissal_type_name
DescriptionThe dismissal type value which works in conjunction with the dismissal_id value above
Data typeString
ValuesDynamic
 
Attributedisplay_ball_number
DescriptionThe ball number of the over - this may be < 6 if an umpire miscounts
Data typeInteger
ValuesDynamic
 
Attributefield_action_1_name
DescriptionThe action of the first player to attempt to field the ball on the specific ball in question. The action names from 'catch' downwards will be for county matches only
Data typeString
ValuesFielded
Mis-field
Dropped
Shy attempt
Run save
Overthrow
Direct hit
Stumping missed
Shy attempt (out)
Catch
Dropped catch
Run out
Run out attempt
 
Attributefield_action_2_name
DescriptionAs per field_action_1 for balls where a second player is involves in the fielding
Data typeString
ValuesDynamic
 
Attributefield_action_3_name
DescriptionAs above
Data typeString
ValuesDynamic
 
Attributefield_action_4_name
DescriptionAs above
Data typeString
ValuesDynamic
 
Attributefield_direction
DescriptionThe direction the ball is hit - this is a value between 0 and 360. For a right-handed batsman 0 = square of the wicket on the leg side, and values are measured in an anti-clockwise direction; therefore, wicket keeper = 90, point = 180, bowler 270. The same co-ordinate system is used for left-handers, so 0 = square on off side, and measurements are taken anti-clockwise from there.
Data typeInteger
Values0 - 360
 
Attributefield_magnitude
DescriptionCorresponds to the distance the ball travelled - we have provided the values which can be over 180 but the boundaries are registered as described
Data typeInteger
Values170 = the boundary to each side (3 and 9 o'clock)
180 = the boundary behind the bowler (6 o'clock)
160 = the boundary behind the wicket-keeper (12 o'clock)
 
Attributefield_position
DescriptionA string version of the position where the ball is fielded, using standard cricket terms
Data typeString
ValuesDynamic
 
Attributeas_keeper
DescriptionThis denotes whether the fielding action occurred when the fielder in question was wicket keeper (released 1st May 2014)
Data typeInteger
Values0 = not wicketkeeper, or
1 = as wicketkeeper
 
Attributefielder1_action_id
DescriptionThe unique Opta ID relating to a fielding action from the first fielder - the action names from 'catch' downwards will be for county matches only
Data typeInteger
Values1 = Fielded
2 = Mis-field
3 = Dropped
4 = Shy attempt
5 = Run save
6 = Overthrow
7 = Direct hit
8 = Stumping missed
9 = Shy attempt (out)
10 = Run Out Assist
11 = Caught
12 = Stumped
20 = Catch
21 = Dropped catch
22 = Run out
23 = Run out attempt
 
Attributefielder1_id
DescriptionThe unique Opta ID of the 1st fielder
Data typeInteger
ValuesDynamic
 
Attributefielder1_name
DescriptionThe name of the 1st fielder
Data typeString
ValuesDynamic
 
Attributefielder2_action_id
DescriptionThe unique Opta ID of the 2nd fielder involved in the fielding
Data typeInteger
ValuesDynamic
 
Attributefielder2_id
DescriptionThe name of the 2nd fielder involved in the fielding
Data typeInteger
ValuesDynamic
 
Attributefielder3_action_id
DescriptionThe unique Opta ID of the 3rd fielder involved in the fielding
Data typeInteger
ValuesDynamic
 
Attributefielder3_id
DescriptionThe name of the 3rd fielder involved in the fielding
Data typeInteger
ValuesDynamic
 
Attributefielder4_action_id
DescriptionThe unique Opta ID of the 4th fielder involved in the fielding
Data typeInteger
ValuesDynamic
 
Attributefielder4_id
DescriptionThe name of the 4th fielder involved in the fielding
Data typeInteger
ValuesDynamic
 
Attributefloodlit
DescriptionDenotes whether or not the ball was bowled under floodlights
Data typeString
Values0 = No, or
1 = Yes
 
Attributefoot_movement_name
DescriptionThe foot movement type of the batsman relating to the specific ball in question
Data typeString
ValuesNo movement
Front foot
Back foot
Down the track
Backs away
Moves infront
Ducked
Swayed away
 
Attributefree_hit
DescriptionIf the ball was a free hit or not
Data typeString
Values0 = No free hit
1 = Free hit
 
Attributegame_id
DescriptionThe unique Opta game ID assigned to each match
Data typeInteger
ValuesDynamic
 
Attributeinnings_id
DescriptionInnings ID number value can only be between 1-4
Data typeInteger
Values1 | 2 | 3 | 4
 
Attributelast_modified
DescriptionThis should be the same time as the timestamp but will increment when amendments are made to the ball
Data typeString
ValuesDate/Time, in the format YYYY-MM-DD hh:mm:ss
 
Attributeleg_bye
DescriptionDenotes the number of leg byes from that delivery
Data typeInteger
ValuesDynamic
 
Attributenew_ball
DescriptionDenotes whether the ball was new or not
Data typeInteger
Values0 = no new ball, or
1 = new ball
 
Attributeno_ball
DescriptionDenotes the number of no balls from that delivery
Data typeInteger
ValuesDynamic
 
Attributens_batsman_id
DescriptionThe unique Opta ID of the non strike batsman
Data typeInteger
ValuesDynamic
 
Attributens_batsman_name
DescriptionThe name of the non-strike batsman
Data typeString
ValuesDynamic
 
Attributeoutcome_id
DescriptionThe ID outcome of the delivery in question
Data typeInteger
Values0 = Null
1 = Out 1st umpire
2 = Out 2nd umpire
3 = Out 3rd umpire
4 = Not out 1st umpire
5 = Not out 2nd umpire
6 = Not out 3rd umpire
 
Attributeover_ball_number
DescriptionThe number of the ball within the over. This can be greater than 6.
Data typeInteger
ValuesDynamic
 
Attributeover_number
DescriptionThe number of the over within the innings for the ball in question
Data typeInteger
ValuesDynamic
 
Attributepower_play
DescriptionDenotes whether the ball was bowled in a powerplay or not
Data typeInteger
Values0 = No, or
1 = Yes
 
Attributepower_play_batting
DescriptionWhether or not the ball was part of a batting powerplay
Data typeInteger
Values0 = No, or
1 = Yes
 
Attributereferral_outcome
DescriptionThe outcome of any referral
Data typeInteger
Values0 = Not referred, or
1 = Out
2 = Not out
 
Attributeshot_type_name
DescriptionThe shot type played by the batsman from the specific ball in question
Data typeString
ValuesNo Shot
Drive
Sweep
Cut
Slog-sweep
Hook
Upper cut
Pull
Glance
Forward defensive
Reverse sweep
Backward defensive
Worked
Pushed
Flick
Steer
Late cut
Slog
Fended
Dropped
 
Attributeteam_runs
DescriptionThe number of runs scored by the team from the ball (this excludes extras) - to calculate team scores, extras should also be added
Data typeInteger
ValuesDynamic
 
Attributetimestamp
DescriptionA timestamp of the time the record was produced
Data typeString
ValuesDynamic - a timestamp in the format YYYYMMDDThhmmss+0000
 
Attributewide
DescriptionThe number of runs scored from wides from the delivery
Data typeInteger
ValuesDynamic
 
Attributedeleted
DescriptionThis ball has been deleted - this will be suppressed unless our ops team need to delete a ball with an incorrect record
Data typeInteger
Values1

Back to top

 

Cricket: C51 Feed (Event Notification)

Delivery Timings

Once a production environment is established between Opta and the subscriber, Opta will deliver the feed prior to the ball being delivered and should trigger on the following events:

  • Change to bowler
  • Change to batsman on strike
  • Fall of wicket
  • Change to overall match status (in play/not in play)
  • Change to powerplay status
  • Change to free hit status
  • Change to light setting
  • Change to weather setting
  • Change to field placing setting
  • Activation of any of the alerts
Note: There may also be instances whereby Opta will deliver the feed with a status to suspend betting. There are many scenarios where suspended betting will occur – some general examples include:
  1. Loss of connection to the database
  2. Slow internet connections
  3. Data corrections
  4. Delays
File naming convention

The file naming convention used for this feed is: C51-{gameID}.xml

Nestinggame_status
DescriptionRoot element of the event notification feed
Attributetimestamp
DescriptionThe timestamp of when the feed is generated
Data typeString
ValuesDynamic - a timestamp in the format YYYY-MM-DDThh:mm:ss
Nestinggame_status/game
DescriptionThe element showing key match information
Attributeid
DescriptionUnique Opta game ID
Data typeInteger
ValuesDynamic
 
Attributeinnings
DescriptionThe innings number
Data typeInteger
Values1 | 2 | 3 | 4
 
Attributetotal
DescriptionThe total number of runs in the innings for the batting team
Data typeInteger
ValuesDynamic
 
Attributewickets
DescriptionThe total number of wickets lost by the batting team at that moment in the innings
Data typeInteger
ValuesDynamic
 
Attributeovers
DescriptionThe number of completed overs in the innings
Data typeString
ValuesDynamic
 
Attributeballs
DescriptionThe number of completed legitimate deliveries in the over
Data typeString
ValuesDynamic
 
Attributein_play
DescriptionWhether play is currently taking place
Data typeString
Values0 | 1
Nestinggame_status/bowler
DescriptionThe element showing bowler information
Attributeid
DescriptionUnique Opta ID of the bowler who is expected to bowl the next ball
Data typeInteger
ValuesDynamic
 
Attributefield
DescriptionThe intent of the field placing
Data typeString
Valuesattacking | neutral | defensive
Nestinggame_status/batsman
DescriptionThe element showing batsman information
Attributeon_strike
DescriptionThe unique Opta ID of the batsman who will face the next ball
Data typeString
ValuesDynamic
 
Attributenon_strike
DescriptionThe unique Opta ID of the batsman who will be the non-striker for the next ball
Data typeString
ValuesDynamic
Nestinggame_status/alerts
DescriptionThe element showing alerts information
Attributeallow_betting
DescriptionOverall control of whether betting should be allowed. If conditions are suitable then 1 indicates bets can be takem but if 0 is displayed then bets should be suspended. The following reasons may contribute to this:
• Loss of connection to the database
• Slow internet connections
• Data corrections
• Delays
Data typeInteger
Values0 = No | 1 = Yes
 
Attributewicket
DescriptionThere is a significant chance of a wicket occurring. This would include video reviews, appeals, skied catches where applicable
Data typeInteger
Values0 = No | 1 = Yes
 
Attributeboundary
DescriptionThere is a signifcant chance of a boundary
Data typeInteger
Values0 = No | 1 = Yes
 
Attributebatsman_injury
DescriptionOne of the batsman appears to be injured
Data typeInteger
Values0 = No | 1 = Yes
 
Attributebowler_injury
DescriptionThe bowler appears to be injured
Data typeInteger
Values0 = No | 1 = Yes
 
Attributeball_in_progress
DescriptionThe bowler run up is in progress
Data typeInteger
Values0 = No | 1 = Yes
Nestinggame_status/other
DescriptionThe element showing other game details
Attributepowerplay
DescriptionThe next ball will be part of a powerplay
Data typeInteger
Values0 = No | 1 = Yes
 
Attributefree_hit
DescriptionThe next ball will be a free hit
Data typeInteger
Values0 = No | 1 = Yes
 
Attributelight
DescriptionA measure of the standard of the light
Data typeInteger
Values0-5 (where 0 = best light condition and 5 = worst light condition)
 
Attributeweather
DescriptionThe weather conditions best described from a set list
Data typeInteger
Values1 = Sunny
2 = Hot
3 = Overcast
4 = Cold
 
Attributemovement
DescriptionThe measure of how much the ball is moving in the air or off the pitch
Data typeInteger
Values0-3 (where 0 = least and 3 = most)
 
Attributebounce
DescriptionThe measure of how consistent the bounce is
Data typeInteger
Values0-3 (where 0 = consistent and 3 = inconsistent)

Back to top