Visualisers
...
Table of Content Zone | ||
---|---|---|
| ||
What are Demo Tools?Demo tools are available for the |
...
Betfair Exchange API |
...
...
You can access the tools via the following links:
...
The Demo Tools can be used by developers to allow quick experimentation and interaction with the production API system. Betting API Demo tool - https://docs.developer.betfair.com/visualisers/api-ng-sports-operations/ Accounts API Demo tool - https://docs.developer.betfair.com/visualisers/api-ng-account |
...
...
...
This visualiser is used by the API developers to allow quick experimentation with the API. As new features become available in API-NG, our aim is to extend the visualiser to support these new features to help with rapid adoption of the added functionality.
Info | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Please note that the visualiser's are provided as-is, and is intended solely as a testing resource. There are a number of useful features to the visualiser:
|
...
|
1. Borrowing a website session ssoid cookie
a. Visit http://www.betfair.com in your browser and log into the website as you would to use the website.
Please note that for other regions, please substitute betfair.com with your equivalent domain. e.g. betfair.it or betfair.es.
b. Once logged in, retrieve the value of the ssoid cookie using the method for your browser:
Google Chrome:
Visit chrome://settings/cookies and search for betfair.com. There should be a large number of cookies for betfair.com, select the "ssoid" cookie and copy the conte, which is your session token.
Mozilla Firefox:
Right click to the left of the betfair.com header logo on the betfair.com page and select "View Page Info" from the context menu. Then select the "Security" tab, then select "View Cookies". You can sort this list alphabetically by clicking on the Cookie Name header. You can view the content of the "ssoid" cookie, this is your session token.
Internet Explorer:
Paste the following into the browser url bar when you have logged into the Betfair site and have the Betfair page open: javascript:alert(document.cookie)
Copy the contents of the box with CTRL+C and then paste into an editor with CTRL+V. Look for the ssoid=SOME_VALUE; definition. The session token is the token between "ssoid=" and ";" and does not include the equals sign immediately after ssoid or the semi-colon at the end.
Other Browsers:
Please search for the specific instructions for viewing the cookies of your browser on the internet. The Session token is always under the betfair.com domain (or your regional equivalent) and is named ssoid.
2. Using the API-NG Interactive login sample
If you already have an application key, download SampleAPI.exe, which is a compiled version of the sample interactive login code which is described in the documentation here, with the source from the API-NG Sample code github repo.
...
Using the pre-populated session token from the websiteThe 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) (via a seperate browser tab) and refresh the demo tools page to automatically input the Session Token field Manually adding the ssoid (session token) from the website cookieUsing Google Chrome you can inspect and copy the session directly from the browser by doing the following: Login using the API Endpoint login requestMake a POST request using a tool such as Postman following the instructions via Interactive Login - API Endpoint Examples of Demo Tools UsagePlease 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. Please noteThe Demo Tools are provided as-is, and is intended solely as a testing resource. The demo tools interact directly with the Betfair API production system and not a testbed/sandbox environment.
|