Go Back   Developer Program Forum > Developers Program > Announcements

Announcements Developers program announcements

Thread Closed
 
Thread Tools Display Modes
  #1  
Old 08-20-2012, 03:47 PM
Betfair Developers Program Betfair Developers Program is offline
Senior Member
 
Join Date: Oct 2008
Posts: 192
Default The Next Sports Exchange API is Coming

Betfair is hard at work on the next version of the Betfair Sports Exchange API. It’s been a long time since we made any significant changes to the API and we know there is lots of pent up demand for some new features, etc.

As you may know, Betfair has been busy re-building the underlying infrastructure of the Sports Exchange. The Betfair.com website has had a facelift and is now powered by a new set of internal services. The next version of the Betfair Sports Exchange API is going to be built on top of these new services.

The goals for the new API are:

  • Simple things should be simple, complex things should be possible
  • The best way to build an interface to the Exchange
  • Anything you can do in a Betfair built interface can be built on the API
  • Build a modern web API (HTTP/JSON)
  • Fix the missing features in the API (compared to the Website)
  • Satisfy some long-standing feature requests
  • Access to the same data
  • Access to the same products (Sports Exchange, Sportsbook, etc)
  • Easy to use and easy to learn

There are a number of specific enhancements and new features planned for the API based on the above goals, but we wanted to highlight three today:
  1. Virtual Prices. The new API will return the same price data as the website.
  2. No more SOAP. The new API is RPC/JSON. You can request data with an HTTP GET to a url like "api.betfair.com/v001/listMarkets/ and get a response like:

    Code:
    ...
        "availableToBack" : [
                          {
                            "price" : 21,
                            "size" : 4.06
                          },
                          {
                            "price" : 17.5,
                            "size" : 3.62
                          },
                          {
                            "price" : 1.05,
                            "size" : 3.68
                          }
  3. Easier to get the data you need. The new API combines public market data (like market prices) with private market data (i.e., you're matched and unmatched bet status) in a single response.

We don’t have a definitive release date for the new API. However, we are hoping to begin letting people kick the tyres sometime in the next few months. We will be posting more information about the upcoming API when we’re closer to a release date, including documentation and sample code.

Let us know what you think of these changes! Please post any comments here in the BDP Forum.

Last edited by MarkL; 08-21-2012 at 11:59 AM Reason: Typo
  #2  
Old 08-20-2012, 07:29 PM
Toy Toy is offline
Junior Member
 
Join Date: Aug 2012
Posts: 4
Default

Excellent, can't wait!
  #3  
Old 08-21-2012, 09:13 AM
AlgoTrader AlgoTrader is offline
Senior Member
 
Join Date: Mar 2012
Posts: 520
Default

The best thing I ever saw in this forum! Guys you do an exellent job! JSON is much simpler and shorter, so we may say goodbye to many XML complexities!
__________________
Betfair Bots Made Easy
https://github.com/AlgoTrader/betfair-sports-api/wiki

Last edited by AlgoTrader; 08-21-2012 at 09:15 AM
  #4  
Old 08-21-2012, 09:21 AM
AlgoTrader AlgoTrader is offline
Senior Member
 
Join Date: Mar 2012
Posts: 520
Default

Now, as my euphoria is calming down, may I ask you several questions:

1) Will the old API work in parallel with the new one or will be discontinued after a transition period?

2) What will happen to throttling of the FreeAPI with the new API?

3) How about request data charges of both Free and Paid API with the new API?

4) Will you provide specs to developers so that they can update products early?

I aware that you may not have answers to all those questions
__________________
Betfair Bots Made Easy
https://github.com/AlgoTrader/betfair-sports-api/wiki
  #5  
Old 08-21-2012, 11:33 AM
MarkL MarkL is offline
BDP Team
 
Join Date: Oct 2008
Posts: 347
Default

Hi,

I'll try to answer as best I can...

Quote:
Originally Posted by AlgoTrader View Post
1) Will the old API work in parallel with the new one or will be discontinued after a transition period?
Yes, we expect API 6 to be supported for at least 18 months after the official release of the next API version. As there will be a transition from SOAP to JSON, we expect some people will need a while to move to the new version.

Quote:
Originally Posted by AlgoTrader View Post
2) What will happen to throttling of the FreeAPI with the new API?
3) How about request data charges of both Free and Paid API with the new API?
There is likely to continue to be some for of throttling. There will almost certainly be different API subscription levels, as there are currently. However, I can't say exactly what they will be or if they will be different to the current levels.

For the Data Request Charge, the primary purpose of the charge is to manage load levels. The new API will have different load limits, etc, so I expect we will revisit the data request charge.

Also, as the new API will let you request more data in a single request, the current DRC structure may not make sense.

Quote:
Originally Posted by AlgoTrader View Post
4) Will you provide specs to developers so that they can update products early?
Most definitely. Also, rather than wait until we have a complete API, we are planning on releasing it in stages. I expect you'll be to find markets and query prices first, while still using API 6 to log in, for example.

Quote:
Originally Posted by AlgoTrader View Post
I aware that you may not have answers to all those questions
Thanks. We don't, but we're going to do our best to be as transparent as possible.

Cheers,
Mark
  #6  
Old 08-21-2012, 12:52 PM
AlgoTrader AlgoTrader is offline
Senior Member
 
Join Date: Mar 2012
Posts: 520
Default

Mark, thanks for the answers. I will support the new API in days after it goes publicly available (JSON is perfect format for serializing and deserializing objects).

More questions: will we say goodbye to "Compressed" methods? There are four compressed methods for now getAllMarkets, getMarketPricesCompressed, getCompleteMarketPricesCompressed and getMarketTradedVolumeCompressed.

JSON also may have some sort of "compression", for example
Quote:
[{
"price": 21,
"size": 4.06
},
{
"price": 17.5,
"size": 3.62
},
{
"price": 1.05,
"size": 3.68
}]
May be coded like
Quote:
[
[21, 4.06],
[17.5, 3.62],
[1.05, 3.68]
]
Hopefully, there will be no more "compression" and "smart encodings" like in my second example.

In SOAP we had *huge* overhead: open/close tag duplication, xsi:type's, ugly arrays encodings and too much of namespaces sex. The complex "compression" was invented to fight SOAP verbosity, I see no reasons to continue the battle any more.
__________________
Betfair Bots Made Easy
https://github.com/AlgoTrader/betfair-sports-api/wiki
  #7  
Old 08-21-2012, 12:57 PM
MarkL MarkL is offline
BDP Team
 
Join Date: Oct 2008
Posts: 347
Default

Quote:
Originally Posted by AlgoTrader View Post

In SOAP we had *huge* overhead: open/close tag duplication, xsi:type's, ugly arrays encodings and too much of namespaces sex. The complex "compression" was invented to fight SOAP verbosity, I see no reasons to continue the battle any more.
We don't have any plans to offer anything other than standard JSON responses, but we'll look into the "smart encoding" you mentioned.

As for the "compressed" responses of API 6, no I'm pretty confident we won't continue with that for the next API.
  #8  
Old 08-21-2012, 01:59 PM
AlgoTrader AlgoTrader is offline
Senior Member
 
Join Date: Mar 2012
Posts: 520
Default

Mark, thanks. The last question, will we see some standard JSON RPC protocol or there will be some proprietary solution?

The only JSON RPC protocol I know is JSONRPC (http://www.jsonrpc.org/specification). It's specification is just two A4 pages, it's the most perfect RPC spec I ever saw.

The keepAlive example will be like this:

request:
Code:
{
    "jsonrpc" : "2.0",
    "id": 1234567,
    "method": "keepAlive",
    "params": {
        "header": {
            "sessionToken": "PKdvAW+ruIAg0s769DeM+vxY=",
            "clientStamp": null
        }
    }
}
response:
Code:
{
    "jsonrpc" : "2.0",
    "id": 1234567,
    "result": {
        "header": {
            "errorCode": "OK",
            "sessionToken": "PKdvAW+ruIAg0s769DeM+vxY=",
            "minorErrorCode": null,
            "timestamp": 1231456803125
        },
        "minorErrorCode": null
    }
}
JSON is a huge step forward comparing SOAP+XML, but JSONRPC would be perfect.
__________________
Betfair Bots Made Easy
https://github.com/AlgoTrader/betfair-sports-api/wiki
  #9  
Old 08-21-2012, 02:35 PM
MarkL MarkL is offline
BDP Team
 
Join Date: Oct 2008
Posts: 347
Default

Quote:
Originally Posted by AlgoTrader View Post
JSON is a huge step forward comparing SOAP+XML, but JSONRPC would be perfect.
Well, then prepare for perfection.

We will support a mixture of transports, so you can make a call like /listMarkets?marketId=1.22100 and get back JSON, or make the same call using JSON-RPC and get back a JSON-RPC response.
  #10  
Old 08-21-2012, 03:15 PM
eddie93 eddie93 is offline
Junior Member
 
Join Date: Aug 2012
Posts: 2
Default

Is there any possibility in advance of this new API going live that you could put up a testing server that gives back example data ? i.e. data that's of the correct intended format but not linked to the actual live exchange.
Thread Closed

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 01:19 AM.


BETFAIR® and the BETFAIR LOGO are registered trade marks of The Sporting Exchange Limited. Data on Betfair website(s) (including pricing data) is protected by © and database rights. It may not be used for any purpose without a licence. © The Sporting Exchange Limited. All rights reserved.