API Demo Tools

API Demo Tools

What are Demo Tools?

Demo tools are available for the Betfair Exchange API for both the Betting and Accounts API.  The Demo Tools can be used by developers to allow quick experimentation and interaction with the production API system. 

Betting API Demo tool - https://apps.betfair.com/visualisers/api-ng-sports-operations/

Accounts API Demo tool - https://apps.betfair.com/visualisers/api-ng-account-operations/

Why Use Demo Tools?

  • All existing API operations are available

  • Easily experiment with the parameters for your API queries.

  • Build sample requests and interact with the API directly requests and responses are output to the JavaScript debug console.  

    For example, using Google Chrome, you can open the Javascript console using the shortcut Ctrl+Shift+J to display output as below. The same shortcut can also be used with Mozilla Firefox.

Please note that the Demo Tools are provided as-is, and are intended solely as a testing resource

Obtaining a Session Token for the Demo Tools

There are several ways that you can obtain a session token for the visualiser:

Using the pre-populated session token from the website

The Demo Tools will populate the session token field with the value of a session token found in your browsers cookie store for the Betfair.com website.   Login to www.betfair.com (betfair.it/betfair.es/betfair.se/betfair.ro/betfair.dk) (via a separate browser tab) and refresh the demo tools page to automatically input the Session Token field

Manually adding the ssoid (session token) from the website cookie

  1. Access Betfair.com / Betfair.it / Betfair.es and log in as usual.

Using Google Chrome you can inspect and copy the session directly from the browser by doing the following:

  1. Press Ctrl+Shift+J 

  2. Select Application > Cookies >  www.betfair.com/au/it/es/se/dk

  3. Copy the value for the cookie with name ssoid

  4. Paste this value into the demo tool text box called Session Token.

  5. Click on CreateDeveloperAppKeys in the demo tool and enter your required Application Name (this must be unique and must not contain your Betfair username).

  6. Click Execute at the bottom of the demo tool page. You should then see the Application Name created on the right-hand-side column of the demo tool underDeveloper Apps.

Login using the API Endpoint login request

Make a POST request using a tool such as Postman following the instructions via Interactive Login - API Endpoint

Examples of Demo Tools Usage

Please see some example of how to use the Demo tools in the steps below:

1. Request All eventTypes using listEventTypes


2. Request all events for EventTypeId 1 (Soccer)

3. Request all markets for a specific eventId using listMarketCatalogue

4. Request prices for a specific marketId (EX_BEST_OFFERS & EX_TRADED) using listMarketBook - Please note:  click on the '?' under Market Book on the right hand side to reveal the Market Details pop up.