Calling Captain Sensible

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

Calling Captain Sensible

Postby rave154 » Mon Apr 21, 2008 6:55 am

Hi,

currently in my humble App, to get the prices data etc for a market i am using ...

GET 'http://uk.site.sports.betfair.com/betting/api/json/getPartialMarketData.do?mi=123456'

i got the above url by following what IE does when using the BF website.

is there an equivelent GET & url that uses the
GetCompleteMarketPricesCompressed ??

Many thanks
rave154
 
Posts: 19
Joined: Mon Apr 21, 2008 6:46 am

Postby PeteB » Mon Apr 21, 2008 9:04 am

Have a look at what ie does when you view the graph pop-up - all the getcompletemarketpricescompressed data is on there - it looks to update much more often than it used to now as well - think there may still be a small delay, but not much.
PeteB
 
Posts: 258
Joined: Tue May 23, 2006 12:13 pm

Postby Captain Sensible » Mon Apr 21, 2008 11:27 am

Basically what Pete says Rave, you could use the graph page for the complete market prices

http://uk.site.sports.betfair.com//bett ... onId=53452

Trouble is you'd be calling it at least once per runner and unless you were logged in the prices would be delayed due to the rcent data charges.

Any reason why you don't use the free API for getcompletemarketpricescompressed ? Unless you're hammering the site for quick updates I'd amend your code to use the free APi as it's simple enough to use and proably more stable than url scraping.

I just use php for my homegrown bots as I don't really worry about how they look and the php soap stuff is easy to use and more importantally very easy to make quick changes
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Postby rave154 » Mon Apr 21, 2008 7:42 pm

Captain & pete,

thanks for your replies,

the only reason that im not using the API is because my current App was written a fair while ago ( 3 years )... in Delphi, using plain old Http requests mimicking IE.

In the Last day or two, i have played with importing the API WSDL file into delphi and have come across numerous problems ( as have most people who have attempted the same thing btw )... so i am hesitant to switchj, so i just wanted to check if there "was" a way to do it in plain old HTTP.......before committing to the API.

thanks
rave154
 
Posts: 19
Joined: Mon Apr 21, 2008 6:46 am

Postby rave154 » Mon Apr 21, 2008 7:44 pm

PS to my last post...


i was under the impression, that the GetCompleteMarketPricesComplete... returned the best 3 back & lay prices & amounts for ALL runners (plus some info on the event, amount matched etc )...all in one long string delimited with ~... so perhaps we have crossed lines here?.
rave154
 
Posts: 19
Joined: Mon Apr 21, 2008 6:46 am

Postby Captain Sensible » Mon Apr 21, 2008 9:35 pm

getCompleteMarketPricesCompressed was the enhanced version of getMarketPricesCompressed in that it included all the available depth of runner prices and odds i.e not just the three prices available in getMarketPricesCompressed.

Not sure what info you're looking for but might be worth you checking out

http://uk.site.sports.betfair.com/betti ... ata.do?mi=

as that holds more info than the partialdata one, non runners,runner names etc again it's just a json file which are easy enough to parse via php and i guess delphi probably has some json library too.

The getfullmarketdata is called upon on first loading a market as it populates all the runner names and non runner info still only has prices for the best three though.

Is there any data in particular you're trying to scrape ? The website url's don't send too much info and if you need the r4's or last price matched,deeper depth than 3 you'll have to get them runner by runner using

http://uk.site.sports.betfair.com//bett ... onId=53452
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Postby Captain Sensible » Mon Apr 21, 2008 9:50 pm

rave, might be worth you checking out the bdp site and maybe posting in the delphi forum as you may get a reply or some kind soul send you a working delhi snippet for the api

http://bdpsupport.betfair.com/ics/forum ... oryID=1654

I guess a lot depends on what your apps doing as I never switched to the api until I needed to as I was happy using the scraping stuff I already had. It rally is worth taking the effort to switch though as once you've a couple of routine running all te other api stuff is a piece of cake and the amount of info you can grab in one call using getCompleteMarketPricesCompressed makes it worth the effort. php was a pain with the session cookies etc and now they're delayed prices if you're not logged in i.e sending the session cookies it makes sense to use the free api
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Postby rave154 » Mon Apr 21, 2008 9:53 pm

Captain,

All i require,

is the url for a GET, that returns..

the best 3 BET & LAY odds & amounts for all runners,

but.. i already thought i had that with my initial posted URL ( first post )..i wasa callling that URL once every 1/2 second, but for some reason i got an email brom betfair saying i was over the "20 per second limit"....hence my loooking for a different url.
rave154
 
Posts: 19
Joined: Mon Apr 21, 2008 6:46 am

Postby Captain Sensible » Mon Apr 21, 2008 9:55 pm

rave154 wrote:PS to my last post...


i was under the impression, that the GetCompleteMarketPricesComplete... returned the best 3 back & lay prices & amounts for ALL runners (plus some info on the event, amount matched etc )...all in one long string delimited with ~... so perhaps we have crossed lines here?.


Just read your original post rave and it seems you're looking for some url to retreive getCompleteMarketPricesCompressed via http, sadly the only way to request it is via the api and that means sending all the correct soap calls
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Postby Captain Sensible » Mon Apr 21, 2008 9:59 pm

rave154 wrote:Captain,

All i require,

is the url for a GET, that returns..

the best 3 BET & LAY odds & amounts for all runners,

but.. i already thought i had that with my initial posted URL ( first post )..i wasa callling that URL once every 1/2 second, but for some reason i got an email brom betfair saying i was over the "20 per second limit"....hence my loooking for a different url.


Was the email a standard job, they sent a lot of emails out to anyone using API apps like BA.
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Postby rave154 » Mon Apr 21, 2008 10:01 pm

to repeat, ( thanks for your replies btw cap )... an HTTP GET url....that returns the best 3 bet & lay prices (plus amounts available for those best 3 prices).....for all the runners............that "doesnt" ( for whatever reason it is ) exceed the 20 per second limit even though i was only calling the original request twice a second.

(thanks again)
rave154
 
Posts: 19
Joined: Mon Apr 21, 2008 6:46 am

Postby Captain Sensible » Mon Apr 21, 2008 10:27 pm

getPartialMarketData.do and getFullMarketData.do both return the top three prices on all runner sand each request will be treated as 1 request.

Might be worth checking your coding see if it's making more requests than it should or maybe you've had gruss running alongside making extra calls. Or like I said it might just be a warning email that betfair sent to all user of API apps like gruss's - just email them for your usage data as calling getPartialMarketData.do wil only count as 1 call
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Postby rave154 » Tue Apr 22, 2008 1:33 pm

Cap,

that might have been the case ( thinking back ).

anyway, im playing with Delphi 6 trying to import the wsdl...and its not liking it !!... and also toying with the idea of using Delphi 7 as a few peeps on the BF forum seem to have had success using it with the wsdl.

Thanks for your suggestions.
rave154
 
Posts: 19
Joined: Mon Apr 21, 2008 6:46 am

Postby rave154 » Tue Apr 22, 2008 4:29 pm

Captain, quick update....

I have changed to Delphi 7 and correctly imported the wsdl, i can see all the methods....CancelBets, GetMarketPrices, GetBetHistory, PlaceBets etc etc... BUT..
i can see no LOGIN or LOGOUT method ????

HAY-ULP me !
rave154
 
Posts: 19
Joined: Mon Apr 21, 2008 6:46 am

Postby rave154 » Tue Apr 22, 2008 8:16 pm

Captain, weird thing here..

as i said... my new Delphi 7 has correctly imported the wsdl and i can see all the methods with the exception of login & logout...

Since those methods and in fact ALL of the data comes from the wsdl i decided to check the raw xml of the wsdl as provided by betfair from ..

https://api.betfair.com/exchange/v5/BFE ... rvice.wsdl

I did a text search through this document and the word "login" is mentioned only once as part of an enum.

My question again then is.... how is delphi ( or any language for that matter ) supposed to generate methods for login & logout if they arent even in the XML of the wsdl in the first place !?
rave154
 
Posts: 19
Joined: Mon Apr 21, 2008 6:46 am

Next

Return to Discussion

Who is online

Users browsing this forum: No registered users and 102 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.