Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 44 Next »

In order to use the Betting & Accounts API, you need to have an Application Key. The Application Key identifies your API client.  Two App Keys are assigned to a single Betfair account, one live App Key and one delayed App Key for testing.

You must pass the Application Key with every HTTP request. You do this by setting the HTTP header with the value of the key assigned by Betfair.

X-Application: APP_KEY_ASSIGNED

Commercial Usage

Please note: App Key generation is for personal betting purposes only. All data/API usage in any commercial context must be approved by Betfair. Please see the following licensing information for further details (https://developer.betfair.com/default/api-s-and-services/sports-api/sports-overview/)

How to Create An Application Key

You can create an Application Key for your Betfair account using the Accounts API Visualiser and createDeveloperAppKeys operation

  1. Click on the Accounts API Visualiser link.
  2. Select the createDeveloperAppKeys operation from the list of Operations on the top left hand side of the visualiser.
  3. Enter a sessionToken in the 'Session Token (ssoid)' text box.  You can find instructions on how to find your sessionToken via your browser here.
  4. Enter your Application Name in the 'Request' column.  The Application Name can be any name of your choice, but like your Betfair username, must be unique.
  5. Press Execute at the bottom of the 'Request' column.

Two Application Keys will then be created and displayed in the Developer Apps column of the Visualiser, one of which will be a Delayed Application Key (see details below)

Please note: the X-Application header is not required when using the createDeveloperAppKeys or the getDeveloperAppKeys service.

 

We are aware that when using some browser versions to create App Keys the Visualiser throws an UNEXPECTED_ERROR when requesting createDeveloperAppKeys. Using an alternative browser/s should resolve this problem.

Delayed Application Keys

The createDeveloperAppKeys service will assign two Application Keys (App Keys) to your Betfair account.

One 'live' App Key and one 'delayed' App Key. A delayed App Key is displayed as 'Version 1.0-DELAY' via createDeveloperAppKeys/getDeveloperAppKeys

  • The delayed App Key returns delayed price data and does not allow betting transactions to be performed (placeOrders,replaceOrders,updateOrders, cancelOrders)  Attempting to use these operations with a delayed App Key will result in the PERMISSION_DENIED error.

  • The delayed App Key must be used for development and any functional testing that doesn't require the use of live data for the purpose of betting*
  • The delayed App Key must also be used in simulation/practice applications where the facility to bet into live Betfair markets is not available.
  • The delayed App Key does not return traded volume data 'totalMatched' via listMarketBook.

* Historical Data is additionally made available for testing and analysis purposes. Please see the App Directory for further information on these services.


  • No labels