What is the API?
The BETDAQ Application Programming Interface is a set of webservice methods that can be called directly by custom software, allowing you to write stable applications that do not have a dependency on the BETDAQ website.It enables you to build your own customised interface. This could be your own front end or your own tool that utilises market information and places orders. The opportunities are endless. The BETDAQ API consists of read-only and secure methods. The read-only methods are generally accessible information while the secure methods are for account specific information.
How do I use the API?
You will need to build code that can call the web methods and that can understand the results that are returned. The good news is that most modern languages (.Net and Java for example) provide tools that will automatically build this code for you. We provide standards based files that these tools use.
The most important file is the WSDL file (Web Services Description Language). This file details the SOAP message formats that the web methods use. The BETDAQ WSDL file is here. Your programming environment should provide a tool that can download this file and generate “proxy” classes that can be used to access the web methods on the server. Every time the WSDL changes (which should not be often) you will need to update your web references so that the new proxy classes can be generated.
In the Visual Studio environment, it is easy to add Web references to your project:
Right click on the project in the solution explorer, and select “Add Web Reference..”
In the “URL” textbox, paste in the URL of the WSDL file given above and click “Go”. Visual studio will download the WSDL file. The wizard will indicate that it has found a service, and the “Add Reference” box will become active.
Fill in a sensible name in the “Add reference” text box – Something like “BETDAQAPI” is a good idea as this will be part of the namespace of the generated classes.
The dialog will close, and the proxy classes are now available for use. However, read on for how to generate security aware proxy classes..
Anytime the WSDL on the server is updated, you need only select the web reference in the solution explorer and select “Update Web Reference” and the proxy classes will be regenerated
Every request to the server must be accompanied by the Betdaq ExternalAPIHeader SOAP header. This has 4 attributes, and must accompany every request version:
This is used to identify the version of the API that you are working against. As we update the API over time, we will increment the version requirements. The server may reject requests that are for versions that it can no longer support. By submitting this field, we can make sure that you are interacting with the correct version of the API.
The external API supports a number of different languages, including Chinese. Use this field to receive translated data. Please refer to the WSDL to see the full list of available languages.
Use this attribute to specify the currency that you want money amounts to be converted to.
Use this attribute to specify your username.
Calls and Fees
|Call||Default Limits (per minute)||Standard API Limits (Per minute)|
Scalable commission structure: whereby the greater the proportions of offers you make that are taken by others, the lower your rate will be. Commission will continue to be charged on your market winnings from any single market.
The standard commission rate is 5 per cent, but you will be able to bring that down to as low as 2 per cent depending on your activity Take/Make % over a rolling 7 weeks period.
API Commission Scheme Information
How it works:
- Each week your Take/Make % over the previous seven weeks will be calculated and your commission rate will be updated on the scale shown below.
- Matched stake is calculated from Monday 00:00 to Sunday 23:59, and your implied commission rate updated on Wednesdays at 04:00
- Users with no activity over a 7 week period will be deemed to be 100% Take for their next active week.
Past 7 Weeks Take% = TakeMatchedStake /Matched Stake x 100/1
Scalable Commission Table
- New customers will able to apply for a fixed commission rate of 3% for a testing period of 7 weeks.
- Promotional commission offers are not available to API customers.
- TakeMatchedStake and TotalMatchedStake figures are returned by the API and details of the calls and information returned are in the Terminology section.
- Further Information on API Specification and Calls is available here!
All customers who wish to use BETDAQ via an API must accept the new commission structure and the amended terms and conditions.
Terminology & API Calls
Make & Take
- Make Bet, should the customer place a back bet of €1,000 on Slovenia @ 2.60 the customers bet would go up as an Offer. Should this offer later be matched by another user this bet will be a make bet.
- Take Bet, should the customer place a back bet of €1,000 on Slovenia @ 2.58 the customers bet would be matched immediately. This would qualify as a take bet.
- Partially Matched Bets, Should the user place a back bet of €2,000 on Slovenia @ 2.58. €1,000 of the customers bet would be “Take” and if the remaining sum of €1,000 is latter matched this part would be “Make”. Thus in this case the customer bet is 50% Take and 50% Make.
MatchedStake is the Backerstake of a bet when you are a backer or the Backerstake of the backer when you are the layer of a matched bet.
TotalMatchedStake = TakeMatchedstake & MakeMatchedstake or TotalForSideTakeStake & TotalForSideMakeStake.
TakeMatchedstake = totalForSideTakeStake Is the equivalent API returned figure for the Take volume of each matched bet and is returned from both the ListBootstapOrders and ListOrdersChangedSince API calls.
MakeMatchedstake = totalForSideMakeStake Is the equivalent API returned figure for the Make volume of each matched bet and is returned from both the ListBootstapOrders and ListOrdersChangedSince API calls.
We recognise that the move to a scalable market winnings commission structure will impact on those users who predominantly ‘Take’ offers to trade, but this impact can be reduced by adjusting the trading methodology to increase the proportion of ‘Make’ offers. We are determined to restructure the way we charge to motivate users to align their activities with the best interests of our business.