Forums

General Betting

Welcome to Live View – Take the tour to learn more
Start Tour
There is currently 1 person viewing this thread.
The Investor
06 Oct 10 23:03
Joined:
Date Joined: 05 Jun 06
| Topic/replies: 13,471 | Blogger: The Investor's blog
Please read below.

Does anyone know how I can get this information outside of using the API, or is the API the only way to go?

In Announcements - > Markets of the Forum I can find the football
matches that will go in play during the week:
http://community.betfair.com/markets/go/thread/view/94118/25834553/Live_and_In-Play_Football_Matches_This_Week

I would like to know how to get the url links for a certain set of
markets that will go in play for each game I am interested in.

I can manually navigate to the relevant markets and find on the rules
tab at the bottom: Linking directly to this market
http://sports.betfair.com/Index.do?mi=101796406&ex=1&origin=MRL (this
url is for Albania v Bosnia - Correct Score). I could do this for each
market, but this is extremely slow and requires a lot of work when
done for a large number of markets every day.

Let's say I want to know the url for the Match Odds market for all
games going in play on 8 October. There are nearly 40 games going in
play that day. Is there a way I can quickly get the links to all match
odds markets for this date?

As I often have dozens of markets open in my browser window at the
same time, loading them by searching for markets or navigating through
the menu takes up a lot of time every day. If I had access to links, I
could load them in my browser automatically with a script saving a lot
of time.


Thanks in advance!
Pause Switch to Standard View Important Betfair Market Loading...
Show More
Loading...
Report The Investor October 8, 2010 12:38 PM BST
ttt
Report Escapee October 8, 2010 4:14 PM BST
Investor,

This would probably be possible using Java Script/JSON and or AHK ( AutoHotKey )

Actually the more I think about it AHK would be the way to go.
Report The Investor October 8, 2010 4:56 PM BST
Escapee, the problem is getting the url's in the first place. I don't see how it can be done simply outside the API. The way I get them currently involves me navigating manually to the relevant market by using the 'search markets' box and noting the url at the bottom of the rule tab.

Having looked at it I can't see how AHK could replicate that? Thanks for mentioning it though, as it could still be useful for other things. Currently I use something called uber-options for my Logitech Keyboard which accomplishes something similar I believe (though not as powerful).
Report Escapee October 8, 2010 5:23 PM BST
I've only heard of AHK, and not actually used it myself but your question kindled my inquisitive nature and I've just spent 45 minutes researching it ( that'll be £50 please [;)] )
It appears that AHK supports regular expression searching of web pages in some form and hence anything that you do systematically but manually ( i.e. go to one page look at the URL and open it ) can be done automatically.

Does Betfair Lite still exist ?  I looked into parsing that a couple of years ago and it was fairly easily achievable ( in that its all text and links with no or little graphic content )


I don't know your IT skill level but if you've got some then AHK would probably get you to what you wanted.
Report The Investor October 9, 2010 1:49 AM BST
Thanks again Escapee.

I didn't think about Betfair lite.
I can see it working, but I think it would be quite complicated

Let's say I want to load the following matches, taken from.
http://community.betfair.com/markets/go/thread/view/94118/25834553/Live_and_In-Play_Football_Matches_This_Week

Saturday 9th October
12:00    Italy U19 v Faroe Islands U19
12:00    Gungoren Belediye v Akhisar Belediye
12:15    Brighton v Bournemouth
13:00    Banik Sokolov v Sparta Prague
13:00    Hameenlinna v RoPS
13:00    TPV v FC Viikingit
13:00    St Patricks v Bohemians
14:00    Bulgaria U19 v Rep of Ireland U19
14:00    Dundalk v Sligo Rovers


Automatically navigate to Markets  > Soccer - Fixtures > Fixtures 09 October 

A list of games will come up, and for each game it will drill down and find the markets I am interested in.

Starting with Italy U19 v Faroe Islands U19 Correct Score
https://lite.betfair.com/Market.do?s=000009101815733x1z

It will take the market ID minus the zero's and the first "9", "x1z" is replaced by "&ex=1&origin=MRL"
to create. http://sports.betfair.com/Index.do?mi=101815733&ex=1&origin=MRL  which is then loaded in the relevant tab.

My IT skills aren't good enough to do this myself, but I am looking for someone to create this. Doing it this way would leave me reliant on betfair lite though, and if Betfair change the structure, everything would stop working.

Do you think I should just go the API route, or is it worthwhile pursuing this method?
Report The Investor October 9, 2010 1:50 AM BST
the url that is created is.
http://sports.betfair.com/Index.do?mi=101815733&ex=1&origin=MRL
Report Larry Lab Rat October 9, 2010 9:04 AM BST
I don't know if this is well known, but any search you can do on the site can be turned into an RSS feed:
http://search.betfair.com/ResultsRSS.do?query=match%20odds%20soccer

Or you can launch the site with that search:
http://sports.betfair.com/?searchTerm=match%20odds%20soccer

The in-play coupons are another way to find in-play markets for one day (but maybe not what you're after if you're just looking for markets IDs but would at least save a lot of navigating). Find them here:
http://sports.betfair.com/?searchTerm=in%20play%20coupon

Today's footy coupon:
http://sports.betfair.com/Index.do?ci=11495032&ex=1&origin=MRL
Report Escapee October 9, 2010 2:16 PM BST
Do you think I should just go the API route, or is it worthwhile pursuing this method?

I think any method you choose will have its pros and cons.

The API, for instance, Doesn't have a "Going in play" function so you'd have do to some coding external to the API anyway. But on the plus side, you get to work with a procedural Computer language so adding things like automatic betting would be alot easier.


But based on sticking pretty much to your original specifications I would guess that the whole thing could be written in 100-300 lines of AHK code( depending on data source of the inplay markets, larry has mentioned a few good ones ).

Ultimately, there are many ways to do this but for a stand alone program that enables you to just press a key and open up a few markets AHK seems the top choice to me.


If you could think of a way to make this mutually beneficial then.....
Report The Investor October 9, 2010 6:22 PM BST
Thanks a lot Larry! The RSS feed information especially could prove very useful for me.

Escapee, what do you think would be a fair price to pay to have this developed?

I should mention that I have 6 monitors to view markets, with six browser windows open, so it is important that each market loads on the correct browser window and tab.
Report Chilly the Dog October 10, 2010 1:55 PM BST
Escapee, it's probably no more than a day's work for an experienced betfair api coder to knock up a tool to generate market view URLs from a list of market names (you grab all the markets from the api for the given days then search for the titles and grab their IDs, then generate the URL). In fact, a day is generous for someone who has used the BF API before. I could probably do it in an hour or two, but Im not for hire, sadly :)
Report The Investor October 10, 2010 3:11 PM BST
I've played around with this myself, and using autohotkey and the windows 7 commmand where you press the Windows + shift to move stuff across screens, I can load 6 browser windows on six screens, open notepad, and open the list of matches for the day. with one keystroke.

Then I can copy & paste a match and use it as a RSS search.
The links that pop I then drag and drop onto other screens.

This is already saving me time, but I still need to load the markets manually.

If you are interested in automating this, you can reach me on

theinvestorbf @ g m a i l . c o m
Report The Investor October 10, 2010 9:27 PM BST
Surprisingly, I got some very helpful tips here, yet nothing on the developers forum ConfusedLaugh
Report Escapee October 11, 2010 12:17 PM BST
@Chilly the Dog

I think you are being a bit flippant and/or naive if you reckon you can get from user outline of requirements to tested finished program in a day let alone an hour or two.


I wasted the first 15 minutes of your 'hour or two' reading and thinking about Investors initial outline.
By the end of that 15 Minutes I'd concluded that what he probably actually wanted was to be able to just press a key and load the next 'X' number of 'Y' type of Football Markets into 'X' number of tabs of an internet browser, that also had the attributes of being In-Play or going In-Play soon. ( You do not seem to have come to the same conclusion so maybe I'm wrong ).

I spent another 10 or 15 minutes of analysis in relation to what various approaches could be taken to achieve what I percieved to be the actual requirement.

Weighing up the various pros and cons I came up with AHK as the likely top choice.
But as I have never programmed in AHK Script I spent another 45 minutes researching the language to check on its viability for such a project.

So there you are, I'm already 1 hour 15 minutes into your 2 hour allotted timescale and I Haven't even got to the start of the UserProgrammer dialog process yet. Where the outline is discussed and tightened up into requirements. And the cost, benefit and feasibilty of additional ( or lesser ) functionality is explored.
I envisage this process alone would require a few hours, especially
if you take into consideration the medium in which it will likely be conducted.


Knock it up in an hour or two ? nice one superman.

Maybe I'm just too 'old school'
Report Escapee October 11, 2010 12:23 PM BST
@Chilly the Dog
Ignore my last post, sorry I seem to have gotten out of the grumpy side of the bed this morning.
Report Escapee October 11, 2010 12:54 PM BST
@investor

Am I correct in concluding from your outline that what you actually want is:

To be able to just press a key and load the next 'X' number of 'Y' type of Football Markets into 'X' number of tabs of an internet browser, that also have the attributes of being In-Play or going In-Play soon.


Something like:
Start Firefox
Login to Betfair
Press F1
6 further tabs open up with the correct score market for any game ( upto 6 )  that went in-play in the last hour or is going in play in the next hour.
Report The Investor October 11, 2010 8:35 PM BST
Escapee, I have a list of in play matches, taken from the thread given above.
I want a subset of those matches loaded, because when there for instance 18 games on at the same time, I can't load them all as it will crash my browser.

My idea was that for security reasons, I will log into betfair manually before running the program. It will open six browser windows and position them across my six screens (I have done this bit with autokey).

For each match I have selected or loaded in a configuration file or whatever, it will load CS, Total Goals, HT Score, Over 4.5 goals, 5.5 and 6.5 in suck a way that each browser windows contains all the same market types(for different games) and each tab number contains a market for the same game (tab 4 on each browser window contains a market for the same game).

I hope this is clear?

Ideally there will be some flexibility (ability to alter standard markets, and to open 4 or 5 browser instances instead of 6 (due to memory / processor constraints and data request charges) when viewing 15+games simultaneously.
Report Escapee October 12, 2010 4:43 PM BST
Investor,

All that faffing arround with intermediary files to create a subset of todays matches seems very un-user-friendly.

And also I think using the thread as a data source of todays matches is really not the way to go as it doesn't contain any Match ID's.


In Summary, creating an application exactly as you've specified is beginning to lose my interest.........


But its not all Bad News

I Could ammend my own API application to launch a Firefox Browser with 6 sub markets of the match you selected.

I've already made some ammendments to it menu to give you an idea of how it would look and work.

here is a link to a picture of it.

http://tinypic.com/r/2d7ydc5/7


I think it would remove 99% of your hassle in opening up a zillion number of pages/browsers/markets.



Let me know if your interested.
Report Escapee October 12, 2010 4:45 PM BST
Not sure if I made it clear but if you clicked on 10 different matches then 10 different browsers would open up each with 6 ( or how ever many ) sub markets for that match.
Report The Investor October 13, 2010 10:05 PM BST
Hi Escapee, I'm definitely interested.

The only thing I would add, is that I have  6 browser windows open and games are displayed on different tabs, so the number of games affects the number of tabs rather than windows.

So if I am only viewing one match, there will still be 6 browser windows (all with just one tab). If I am viewing 5 matches, there will be six browser windows with 5 tabs each.

I have a little app that controls all the browser windows simultaneously in such a way that if I press for instance CTRL+5, it takes me to the fifth tab of all firefox browser windows, which will then show me six markets for a particular game.

Is that screenshot from an app you created yourself from scratch?

P.S. If it's useful for you, I can send you the code I used to do some simple browser manipulation in AHK. As I have six monitors, I'm not sure you'll be able to see it in action though.
Report Fred! October 14, 2010 1:10 AM BST
If you can generate a good income doing what you do with all these markets open at the same time and so on, then it could be worth investing in better tools rather than cobbling stuff together.

A bespoke API application would surely be far more efficient and effective - e.g. it could simultaneously refresh prices across your 6 market group the moment you switch to a different event (perhaps highlighting any prices that have changed since you last looked) - much better than a bunch of tabs refreshing randomly every 20 seconds or so. Plus no data request charges if you don't bet. Without the website bloat you would have more room on-screen for more related markets or even charts.

Might be worth getting a quote or two.
Report Escapee October 14, 2010 1:13 AM BST
The only thing I would add, is that I have  6 browser windows open and games are displayed on different tabs, so the number of games affects the number of tabs rather than windows.

So if I am only viewing one match, there will still be 6 browser windows (all with just one tab). If I am viewing 5 matches, there will be six browser windows with 5 tabs each.


oh buggerooney! It seems so obvious now you mention it but I had totally failed to see it working that way round, and wrongly assumed 1 browser = 6 markets of the same match.

I say 'oh bugger' because I have done a little automation* with Internet Explorer and it was a technical nightmare, very fragile and prone to memory leaks 'n crashes.

In the solution I put to you I could have just fired off the browser and forgot about it.

What you want shouldn't really need full on automation of the browser but it will be a bit more difficult than fire and forget.
I'll have to do a bit of research/testing on the methods and problems, I'll get back to you later when have a better grasp of it.

I guess this is a good point to check on the browser. Are you happy to use Mozilla Firefox as the target browser?
This is kind of important because if I have a logged on betfair session in a firefox browser and then start another firefox browser and navigate it to betfair, I am automatically logged on in that new browser, where as if I do the same thing with two Internet explorers, I am not automatically logged on in the second IE.
So I'm kind of relying on A) you're happy with firefox and B) you get the same behaviour with multiple firefox browsers as I do.
Could you confirm A and B as soon as possible so I'm know I'm not going down the wrong route again.

*Automation: Formerly known as OLE Automation, geek speak for one program taking control of another thru it's COM interface and message pump.
( a right faqin mish mash of badly documented, poorly implemented MS pap )




Is that screenshot from an app you created yourself from scratch?

Yea, my first ever attempt at C++ ( or indeed any program on a PC ), So its not nearly as slick as the masterpiece that is the 'Geeks Toy'.
It uses the 'Free API' and works pretty much as a standard betfair interface with a few extra knobs and whistles ( some slightly out of tune if truth be told ). And it has Autobet mode(s) which does what it says on the tin basically.


Anyway, I'll look into the actuality of the now so obvious browser layout you want and get back to you.
Could you confirm A & B above, thanks.
Report Rocket to the FACE October 14, 2010 1:33 AM BST
Fred! Joined: 21 Aug 08
Replies: 87 14 Oct 10 01:10   
If you can generate a good income doing what you do with all these markets open at the same time and so on, then it could be worth investing in better tools rather than cobbling stuff together.

A bespoke API application would surely be far more efficient and effective - e.g. it could simultaneously refresh prices across your 6 market group the moment you switch to a different event (perhaps highlighting any prices that have changed since you last looked) - much better than a bunch of tabs refreshing randomly every 20 seconds or so. Plus no data request charges if you don't bet. Without the website bloat you would have more room on-screen for more related markets or even charts.

Might be worth getting a quote or two.

 
^^

One feature of geeks toy that I really like is how the box will flash when a bet is matched in it. It makes it very easy to visualise what is happening if you have several markets open at once and tells you what has happened without you having to interpret any numerical information. Far superior to the standard interface (which, as Escapee also noted, needs to be refreshed manually if you want any semblence of live information).
Report Rocket to the FACE October 14, 2010 1:37 AM BST
Sorry, it was Fred who pointed it out.
Report FINE AS FROG HAIR October 14, 2010 1:56 AM BST
I think I'll stick with my abacus.
Sorry Investor just being my usual facetious self.
I do know when I'm totally out of my depth, and the content of this thread is absloutely unfathomable to me.
Sure hope it's worth all the time and effort.
Dinosaurs rule OK !
Report The Investor October 14, 2010 10:16 PM BST
Fred,

Thanks a lot for your suggestion.
I'm sure an API app could be more effective, with less data requests, and it would be faster too.
A couple of questions for you:

1) Is the API as reliable as the website? Sometimes it goes down.
2) Wouldn't this be far more involved than what I am suggesting? As you have an idea of what I require, could you give a rough estimate of what I should expect to pay doing it this way?

Escapee, the answers to a and b are yes. I use firefox, and only need to log in once per firefox session, any new browser windows or tabs where I navigate to betfair are logged in automatically. If I close firefox completely, I am logged out.
Report Fred! October 15, 2010 1:04 AM BST
The API is very reliable. I think blips on the API get mentioned more because trading software tends to highlight issues whereas the website could go down for many seconds at a time or be intermittent and you could easily be none the wiser that it ever happened.

It would be more involved yes, you'd have more things to decide on and specify, but you would hopefully then have your ideal interface. A regular API developer would likely have a basic framework that already meets your requirements (ie do the same as the web interface), a specialised market selection tool and running 6 windows shouldn't be too much effort. If you stuck with the same developer you could also easily get things added on as you thought of them in the future.

When it comes to costs I have no idea whatsoever. If it was going to help me make £x thousand a week for the foreseeable future then it would be worth at least x to me. I'm sure a developer reading this could give you a rough idea.
Report FINE AS FROG HAIR October 15, 2010 2:01 AM BST
"If it was going to help me make x thousand per week-----"
A pretty big if.
Report The Investor October 15, 2010 2:09 AM BST
Escapee seems like he could do it quite quickly.
Perhaps I'll start with a browser app and develop documentation for an API solution to be implemented at a later stage.

This thread has already helped me even without real automation, as I have now changed my homepage from.
http://soccer.betfair.com/
to.
http://search.betfair.com/ResultsRSS.do?query=

Which means I can open dozens of tabs instantly (my browser crashes If I open say 60 tabs simultaneously onto soccer.betfair.com as it is quite heavy).

And using a simple Autohotkey script, that I created using a combination of modified examples and autoscriptwriter.

Like you say Fred, at the moment it's very much a case of cobbling things together.

I'm limited not only by data requests (which only apply on days with a lot of games that are all low quality, meaning low turnover / profit expectancy per market), but also by browser capacity. Firefox doesn't utilise the power of multicore processors, and if I have anything over about 70 markets open in my browser there is a risk of it crashing. Furthermore, due to memory leak, I need to restart my browser every 3 hours or so.

Firefox is much better than IE though (for me at least) and google chrome is still a bit buggy in my experience (although it is much faster, so it may make sense switching).
Report Fred! October 15, 2010 11:08 AM BST
FAFH, don't need to worry about the if. The Investor knows how to profit and good software will improve his efficiency. If the software didn't meet his specifications then he wouldn't have to buy it.

When you open multiple tabs your browser allocates resources to each and every one, whether you're looking at the tab or not - some people have PCs that apparently struggle with one copy of betfair open never mind 70! A simple, mostly text based API application shouldn't tax a modern (or indeed ancient) PC in the slightest, the number of loaded markets won't affect performance either - though you would need to make it clear to the developer if all loaded markets need to be monitored or just the set currently on display.

Frankly I'm surprised you haven't been offered a quote already Investor, your needs seem quite straightforward.
Report Escapee October 15, 2010 1:54 PM BST
After an overly long and pretty much fruitless google seession I failed to find any 'elegant' ways of firefox automation and or control. It seems that this is prevented by design in order to remove a bunch of the security issues that Internet Explorer has.

But I can kind of kludge it and rely on the behaviour of "firefox -new-tab url" loading a new tab on the browser with focus.



Taken from a earlier post, Are these the markets you want ?
1) Correct Score
2) Total Goals
3) HT Score
4) Over 4.5 goals
5) Over 5.5 goals
6) Over 6.5 goals


And a final recap of the specifications before I start coding:

An API application which functions pretty much like the standard betfair interface, but with an extra menu option: "Soccer - Firefox Launcher"

The "Soccer - Firefox Launcher" menu option will show a list of all todays Football Matches.( as shown on this image http://tinypic.com/r/2d7ydc5/7 )

The first time a football match is selected from the list:
Six Firefox browsers will be launched, each with one tab containing a betfair market for the football match selected, from the list of markets I have set out above.

Second and subsequent selections of matches from the list:
The 6 firefox browsers will each be loaded with an additional tab containing a betfair market for the newly selected match.

The browsers are to be organised so that:
The 6 browsers each contain multiple tabs of a single type of market from the list.
e.g. Browser1 will only have 'Correct Score Markets' for each of the matches selected, Browser2 will only have 'Total Goals Markets' etc etc...

The tabs are to be organised so that:
All the different markets for the same match will appear at the same tab position on the browsers.
e.g.
Browser1-Tab1 will contain Correct Score market for match 'A',
Browser1-Tab2 will contain Correct Score market for match 'B', etc etc.
Browser2-Tab1 will contain Total Goals market for match 'A',
Browser2-Tab2 will contain Total Goals market for match 'B', etc etc.


I Think that just about covers it, Please agree to those specifications or point out anything you think I have ommitted or any other issues you have.



Security:
In a previous post you mentioned ( quite wisely ) a point or two concerning  security.
I want to make this quite clear to you some of the security implications of this solution so you have enough info to make a balanced decision.

This solution requires access to the Betfair API to gain a list of the market ID's of all the markets that you might require loading to firefox browsers.
As a result of this API access requirement, you will need to log on with your username and password details through this proposed API application.

So that in turn means that if I ( or anyone who provided a solution designed as specified ) were an evil scammer, I could write in code that passes on your personal details, empty your account and retire to the Bahamas.

I'm not trying to allay your fears here, ( in fact I'm probably doing the opposite ) And I'm reasonably certain that you'd probably be aware of such things anyway. But just in case you weren't, I thought the issue worth airing.
In conclusion: Any program you put on your computer can have security implications, Any program that you type in your personal details to and grant internet access to, even more so.


So I ask you to:
A) Confirm the specifications I have set out. ( or ammend them )
B) Think about the security issues I raised, decide if you trust me enough and if so confirm that I should proceed to produce the application.


Fitting it in arround other commitments, I would guesstimate deivery arround the middle or latter part of next week.
Report Escapee October 15, 2010 4:12 PM BST
Investor, you've got mail;
Report The Investor October 15, 2010 7:09 PM BST
That's correct Escapee.
Ideally the browser windows would also position themselves correctly across my screens. Currently I have done this with AHK, so it should be quite simple.

Just two things to consider:
1) It would be handy if the app worked in such a way that the user can select matches simultaneously rather than click: wait for markets to load, click: wait for markets to load, clik: wait for markets to load etc.
2) If matches are selected simultaneously the app would have to control how they are loaded based on the number: If there are let's say two matches loaded (6 browser windows with two tabs each), it can just do it instantly. If there are twelve matches loaded, the app needs to manage this to avoid the browser crashing.
Report FINE AS FROG HAIR October 15, 2010 7:55 PM BST
And to think that it was suggested to me on another thread that I should really get into IR betting.
If this is the level of computer handling skills it takes, I wouldn't stand a chance of competing on level terms.
Hope you don't mind, Investor et al, that I post occasionally on your thread with my non- computer age thoughts.
Just a bit of harmless relief from the overwhelming display on here of geekness, at its best ?
Report Escapee October 19, 2010 12:04 PM BST
Good News and Bad News

First the Good news
I've Got it working !

The Bad News
.... But it only works reliably with betfair lite. Using betfairs standard web pages leads to occasionally getting a market loading in the wrong browser.  Sad


Basically. my medium spec laptop is creaking under the strain of loading 6 betfair web pages simultainiously.

In layman's terms:
If I want to launch and control an Internet Explorer from a program, its possible to do so with quite firm control.
But with firefox this method is not available and the communication/control link is akin to shouting a conversation accross a crowded pub. When the noise level ( cpu usage ) gets above a certain level parts of the conversation get lost in the hubub.

Betfairs standard market web pages have a java applet or two which require a fair bit of CPU resources to load and also steals 'focus' intermittently whilst loading.
Loading 6 markets at the same time compounds these issues to the point of unreliability.
Whereas loading 6 betfair lite markets at the same time does not push the CPU so much and it all works fine.


To get it to work for standard betfair, I'm going to have to find a different method of controlling a firefox browser other than:
(CWnd*) m_pBrowser[i]->SetForegroundWindow();

I'm not optomistic about finding another method after spending 8 hours googling it already.




Feeling a bit glum about seemingly being so close to a solution but in reality, being quite far.

ho hum
Report Escapee October 19, 2010 12:08 PM BST
I suppose that if I left a 5 second gap between loading each market then it would work much more reliably, but then it would take 30 seconds to load the 6 browsers for each game
Report Escapee October 19, 2010 1:21 PM BST
After ammending and Testing, it does appear to work well with a 5 second gap between loading markets.


Investor, What do you think about it taking 30 seconds for each match ?

i.e. Select ( click on ) a match, it takes 30 seconds to load 6 markets before allowing you to select ( click on ) another match and repeating the process.


Or  betfair lite ? ( only about 4 seconds per group of 6 markets )
Report The Investor October 19, 2010 4:33 PM BST
Hi Escapee,

Seems like you got quite far with this.

the 5 second gap is fine.
Is there a way to select all the matches I am interested in together beforehand? That would free up a huge amount of time compared to having to sit and wait 30 seconds between loading each game.
Report Escapee October 19, 2010 7:04 PM BST
Seems like you got quite far with this.

Yea.. It's pretty much done.

But I'm not very happy with 30 seconds per match ( 6 markets )

Also, it doesn't have the extra capabilities you requested:
A) to select all the matches required before starting the loading process.
B) remember and position the browser windows.

It does everything else as per my spec outline though.




I'd need to cut out a few of existing features ( such as autobetting ) and half finished knobs 'n whistles from my API program before I ship you a version.

But as I'm not actually happy with 30 Second/match thing, Not happy with the very tenuous method of controlling firefox I'm using, and it doesn't have the extra bits you wanted, and I'm getting a little bit of cold feet syndrome over just giving away my API.

So I thought I'd explore a few other avenues tonight and see if I can resolve a few of these issues or if we should just go with what I've produced so far despite its drawbacks.


I'll get back to you tommorow after I've worked and slept on it.
Report The Investor October 19, 2010 7:33 PM BST
Sounds good. I think that if I was to load say 12 matches, it would need to wait a number of seconds between loading tabs once say 8+ matches are loaded anyway, to avoid the browser crashing.
Report Escapee October 20, 2010 8:54 PM BST
After more research, experimenting and thinking......

I've decided to stop work on the existing solution and ( if you want ) write a new program from scratch.

I think going with your idea: 'List of matches with checkboxes' and then launching all the browsers with the markets for the selected matches at 2-5 second intevals is the way to go.

I tried it with 6 matches ( 36 markets ) and it took about 2 1/2 minutes before they'd all loaded and the cpu usage dropped back. But I'd guess that 2 1/2 minutes is a lot shorter than the time it'd take you to load 36 markets manually and you'd just have to select the matches and press the 'Launch' button and leave it to cook your cpu.


For various reasons such as:
Ammending my own API to have checkboxes on the tree menu is a non-trivial task.....
Controlling firefox firmly and properly is nigh on impossible...
Launching all the required matches and markets from 1 click is better from the users perspective and the firefox control perspective ....
So I thought drop my API and write a dedicated solution.

I'll create a mock up of it and upload an image explaining its proposed functionality and features. ( probably do this after midnight )

And we'll take it from there.
Report FINE AS FROG HAIR October 20, 2010 11:14 PM BST
Hope your eggtimer is not running all the time on this, like when I ring up my "wolf" of a lawyer to ask him about anything.
Report The Investor October 21, 2010 12:26 AM BST
Great!
I look forward to seeing it in action.
Report Escapee October 21, 2010 12:52 AM BST
This is the new proposal.

http://oi53.tinypic.com/4fvg5j.jpg


If you look at the above image it will hopefully be fairly self explanatory.

I've mocked up two different ways of selecting the matches, I prefer option 'A' myself as it seems a clearer way of seeing what matches have been selected from Todays Fixtures.

Option 'B' is kind of how you asked for it, with checkboxes next to the fixture. ( I'm a bit blind and found the ticks a little hard to discern )


Each of the 6 browsers will be set out as per my previous spec.
i.e. Each browser will have one type of market, with a tab for each match selected.

The 6 browsers take about 12 seconds to launch with 6 matches selected.
However those 36 markets took about 2 1/2 minutes to load into all the browsers/tabs. The time taken is very much dependant on how powerful the PC is and the broadband speed.
Firefox will only use 1 processor of a multi processor PC, but I think you can alter some pipelining settings in about:config to gain a bit of multi tasking.



Anyway, What do yo think ?
Report Escapee October 21, 2010 12:52 AM BST
And what option ? either A or B ?
Report Rocket to the FACE October 21, 2010 1:09 AM BST
Wow, that's pretty impressive. Lucky you, Investor!

Escapee, if you'd like any work I'll send you an email and you can give me a quote.
Report The Investor October 21, 2010 1:13 AM BST
Nice clean layout!
Looking at this, I agree that option A is better.
Three points:

1) I notice a login at the top, does that mean I don't need to log in separately in the browser?
2) If it's easy to do, I would prefer the list to look like this:

11:30    Spain U19 v Armenia U19
14:00    Lithuania U19 v Israel U19
18:00    Anderlecht v AEK
18:00    Besiktas v Porto
18:00    CSKA Sofia v Rapid Vienna
etc.

In order of start time (with time showing), instead of alphabetically. That way, I can use the Football Market Launcher as my only frame of reference, and I no longer need to check the forum.

3) How will it handle games that are technically on tomorrow? For instance, if I want to load the following:
23:15    Avai v Emelec
00:30    New York Red Bulls v New England
01:00    Joe Public FC v Columbus
01:45    San Jose v Newells
will it allow me to do so?
Report Escapee October 21, 2010 1:16 AM BST
Thanks for the compliment Rocket 

what kind of work ?
Report Escapee October 21, 2010 1:42 AM BST
1) I notice a login at the top, does that mean I don't need to log in separately in the browser?

This logs the program into the 'Free' API. ( not the same as the web interface )
You will need to have one firefox browser logged into a betfair session aswell, Prior to pressing 'Launch'. In order for the browsers launched by the program to exploit the 'shared cookie' behaviour of firefox and hence be logged on as well.




2) If it's easy to do, I would prefer the list to look like this:

11:30    Spain U19 v Armenia U19
14:00    Lithuania U19 v Israel U19
18:00    Anderlecht v AEK
18:00    Besiktas v Porto
18:00    CSKA Sofia v Rapid Vienna


Not Possible unfortunately Sad
I'd already thought of doing it that way ( and tried ) but due to the limitations of the 'free api': You can only put in 5 'getMarket()' requests per minute and the event Start time is returned from that call.( well it is for Horse Racing, not sure about football )
If you want to pay £200/Month for full API access then it can be done, but on the free api it would take 5 long minutes to get the info for 25 matches... only then could it produce 'todays matches' list.

*eventStartTime is also a data field returned from getEvents()
( which is what I use to get the market ID'd and has unlimited requests per minute) But although its documented as such, it only ever contains 01/01/01 00:00:00.


3) How will it handle games that are technically on tomorrow?
Currently it works out todays date and then gets the events for that date under 'Football - Fixtures'
If you want enhancements to this then I could look into it.
Report The Investor October 21, 2010 2:16 AM BST
ok
1) is fine.

2) I don't think it's an issue that it takes 5 minutes. For instance I could set the program to run at startup of the PC, so it will do it, or I could run the program the night before and let it 'slowly' grab the data it needs. I think the time the program spends on this is offset by not having to use another data source. If I've missed something here, let me know!

3) this is pretty minor anyway, if it's too much hassle, I can just load the late night games the old fashioned way Happy
Report pxb October 21, 2010 3:37 AM BST
Escapee, I also have a requirement that I am willing to pay for.

It's really quite a simple requirement, although how easy it is to implement in BF's API I don't know.

I want all the markets I have bets in listed in a single screen (scrolling is fine) ordered by start (kick off) time. For each market I want to see my current position and bets as well as the current best back and lay prices.

I realize showing current position (green/red) is problematic when there are more than say 3 outcomes (limited screen real estate), but markets with more than 3 outcomes can be excluded.

I would much prefer if the list were populated automatically, although I don't know if this is possible thru the BF API.

I'd have to think about whether manually populating the list is worth my while.

I don't need to be able to trade thru this screen, although if I could it would be a bonus.

Update frequency isn't an issue (every 30 seconds would be fine). I don't trade in play.

Essentially, my requirement is just to keep track of all the markets I have bets in and be notified when something of significance changes (a bet taken, change in back/lay prices, start time approaching).

If you want to take this further contact me at pxbradleyATgmailDOTcom
Report Escapee October 21, 2010 1:43 PM BST
pxb    "I also have a requirement that I am willing to pay for."

To create a high quality bespoke api program with ALL the abilities and features you've outlined..... You're probably into a minimum ballpark figure of £7,000 to £10,000 and I know plenty of people who would quote you the best part of £50,000 or more.

If all you required is a much simpler program that logged on to the api and then automatically launched a browser( and or tab ) with a standard betfair web page for each market you had a position on then the ball park figure ( depending on functionality ) would be arround the £1,000 mark.


Have you had a look at 'The Geeks Toy' ? It's and all round excellent program.
It wouldn't do what you want automatically, but it will display multiple markets ( and your corresponding positions/bets etc )
And It's free.


Bespoke software is expensive stuff, If the price doesn't put you off then I'm happy to do it.
Report Escapee October 21, 2010 2:25 PM BST
Investor

1)....

2) Your suggestions of:
A) Running the program  the night before wouldn't currently work as it only looks for matches for todays date.
B) Auto starting it when you boot up the PC has the problem of username/password to get over, although these could be encrypted in a file.

Off the top of my head.... If the thread you currently look at to get the times is pretty much the same URL day in day out
And the format of the information is stable..... then it might be possible to automatically parse it and extract the times 'n match them up to the fixture names that way.


3) I think ( but I haven't checked ) that the early morning matches problem probably doesn't exist.
I suspect that those matches take place on 'Todays Date' in local time and hence would appear under 'Todays Fixtures' depite being it actually tommorrow from our GMT point of view.
Report Ghetto Joe October 21, 2010 2:27 PM BST
Escapee have you considered using getAllMarkets with eventTypeIds 1 that'll give you all start times and associated markets that you should be able to link up with any info you've grabbed from getEvents
Report Fred! October 21, 2010 2:29 PM BST
I can't do it myself, but for those prices I'll happily arb bf forum and rentacoder Silly
Report Escapee October 21, 2010 2:52 PM BST
Thanks for the idea Joe, I'll look into it.

Fred, I can not and have no desire to, compete on price against people from countries where the average wage for a peasant is a bowl of rice.
Third world outsourcing has its pros and cons from a customers point of view.
Report Escapee October 21, 2010 3:33 PM BST
Investor, I seem to have locked myself out of email [>o]( or the server is down )
Tuesday sounds good.
Report The Investor October 21, 2010 3:38 PM BST
1)resolved

2)
A) I wouldn't have a problem running it at night after midnight.

B) Is this a safe thing to do? In any case, I could use the login details of a secondary account.

Off the top of my head.... If the thread you currently look at to get the times is pretty much the same URL day in day out
And the format of the information is stable..... then it might be possible to automatically parse it and extract the times 'n match them up to the fixture names that way.


Yes the format is stable. Of course it would be dependent on Betfair maintaining the thread. Occassionally there are problems with naming conventions. In that case I guess a dialog box could come up asking the user to input the time manually. Thinking about it, I'm going to send betfair an email (with an example next time there is an inconsistency), asking them to keep the team names consistent.

I'm looking at creating a spreadsheet that recognizes different names as the same team. example: Man Utd, Man United, Manchester United. I already have one that gives me profit per match (adding up PnL for Match Odds, Correct Score etc.)
As I also place bets with other bookies, I want to extend that to overall profit per match, rather than just profit per match on Betfair. That's why I need to look at naming conventions. I was thinking of doing this in a way where the user inputs these variations manually as he notices discrepancies. Then providing it as a tool for people that find it useful, who can then add their own variations to make it better. The tricky thing is that a name like 'atletico' could apply to about 10 different teams.


3) That's good if that's the case. That's also how they are displayed on the forum. For instance 01:45    San Jose v Newells is listed under Thursday 21 October.
But if I navigate to a market for that match, the event start time on the rules tab is listed as 2010-10-22 01:45
Report Escapee October 21, 2010 3:49 PM BST
I've just checked and San Jose v Newells is available under Todays Matches ( 21st Oct ), Which is what the program is looking for.
Report The Investor October 21, 2010 3:55 PM BST
that's 3) resolved then Happy
Report pxb October 21, 2010 4:11 PM BST
That's somewhat out my price range. I might have gone up to a thousand.

But thanks for the response.
Report pato October 21, 2010 5:07 PM BST
pxb, have a look at Bfexplorer PRO and tools it offers: My Bets which does exactly what you want for bets status monitoring.

The other tool is called: Close All Positions which monitors all your opened positions and adds possibility to hedge them all or selected group of markets just by one click.
Report Rocket to the FACE October 22, 2010 9:34 PM BST
Escapee, if you have a contact email I can send you a brief description and you can let me know if it's something you'd take on.
Report Escapee October 23, 2010 12:46 PM BST
Ok Rocket, you've got me intrigued enough.

I hope you'll understand the reasons if I put up an email adress I use for spam deflection:

nasalfluids at aol.com


I don't monitor this email adress so its advisable to post on here if and when you send an email to it, otherwise I might not see it for a month or two.
Report Fred! October 23, 2010 2:55 PM BST
I was fancying a diversion so I've had a crack at your simple tool Investor.

I've taken a different approach. I don't know how to write stand-alone applications so mine is web based.

Same as Escapee, I found a few issues with firefox. It's not easily possible to take control of its tabs, plus a few settings need to be set.

It might not work as it's dependent on configuration but here's my mock-up http://bit.ly/cz3Jd2   

The idea is that you open 7 browser windows and point them all to that address. You then choose which market type you want to show in each browser and choose a browser where you'll select events.
Report The Investor October 23, 2010 10:41 PM BST
Hey Fred, I had a quick look at this, and it seems to work. I'll have a look again later tonight when the games are done.

Escapee's app is practically done I think though. Interesting to see such different approaches. What method are you using to get the links Fred?
Report Fred! October 24, 2010 2:22 AM BST
I got the links using a combination of web scraping (to get the coupons) and API (to get the market variants). Took less than an hour to cobble that together in PHP as I already had some usable code and insight.

Making the interactive web page took a lot longer and was the interesting bit. Been ages since I last made a page. My presentation skills haven't improved any.
Report Baby Jesus October 24, 2010 11:56 AM BST
Fred, if that page http://community.betfair.com/markets/go/thread/view/94118/25834553/Live_and_... is static you should easily be able to avoid the API and just scrape the data, a few tick boxes to choose the matches then send the data through betfairs own search function on the site to pick out the markets you want

http://search.betfair.com/ExportSearchAction.do?documentDomain=betfair.com&query=teams and market
Report Baby Jesus October 24, 2010 11:57 AM BST
That page

http://community.betfair.com/markets/go
/thread/view/94118/25834553/Live_and_In-Play_Football_Matches_This_Week
Report Fred! October 24, 2010 6:35 PM BST
Hi BJ. I didn't want to use the forum page as it doesn't have marketids, I went for the coupons which I believe carry the same info. I used the API because GetAllMarkets gets everything in one hit.

It would be a lot more complicated and slow to get everything via betfair's market search - as is my script can create that page in less than a second.

At the end of the day it doesn't really matter though as it was just for my own amusement. I thought that Escapee was making a meal of things and that I could do better lol. I stand by my earlier thread input: this is a job for a multi-window bespoke API application, not multiple-multi-tabbed firefoxes!
Report Baby Jesus October 24, 2010 8:06 PM BST
Yep I kinda agree it seemed to be getting very overblown, only reason for mentioning the scraping route was it avoids using any logins and could be probably whacked up on any free webspace especially as betfair provide so many rss/xml feeds for all the football markets with associated marketIds etc
Report The Investor October 25, 2010 1:22 AM BST
The url is already out of date Sad

Changed from.
http://community.betfair.com/markets/go/thread/view/94118/25834553/Live_and_In-Play_Football_Matches_This_Week

to.
http://community.betfair.com/markets/go/thread/view/94118/26126045/Live_and_In-Play_Football_Matches_This_Week
Report The Investor October 25, 2010 2:01 AM BST
It looks good Fred, I waited with the reply, because I wanted to look at the app properly first (after the day's matches had finished). I tried it and it works, but for some reason I get some messages saying firefox prevented popup windows from opening on some occassions.

It's also difficult to see how it functions without the pages actually loading. Can you set it up to do that, or is that going to cause some kind of issue?

I think Escapee is doing a great job, and the end result should be that I simply select x games, and all the relevant markets are loaded. Doing it through an app like this is the fastest way I can imagine (while going through the browser).

After trying your web app in chrome as well, I found it works, but opens new windows for each market loaded rather than loading it in tabs.

I agree that ultimately this is as you call it "a job for a multi-window bespoke API application" (or multi-window and multi-tab). In any case, an app to control browser windows will be extremely useful both to give me ideas for further improvements, and as a future backup for when there are API issues.

It's quite a big step to move to the API, and getting that right is going to be more of a commitment.

One idea I've had already is to have a template for markets loaded.

Let's say I load the following as standard:
Screen 1: Correct Score
Screen 2: Total Goals
Screen 3: Half Time Score
Screen 4: Over/Under 1.5 Goals
Screen 5: Over/Under 2.5 Goals
Screen 6: Over/Under 3.5 Goals

If I load 8 matches, three of which are already in the second half, some of these aren't going to load properly. There could be a default setting when a market for a game is closed: go to [market type]

There could also be shortkeys so that with a simple keystroke, the layout of the screens for a selected match changes to

Screen 1: Correct Score
Screen 2: Total Goals
Screen 3: Match Odds
Screen 4: Over/Under 2.5 Goals
Screen 5: Over/Under 3.5 Goals
Screen 6: Over/Under 4.5 Goals


Which would be handy for instance if two goals are scored.

I'm sure there are plenty of ideas like this (suggestions welcome). When the problem of wasting time loading markets is overcome with a browser control app, I can look at what features an API app should have.
Report The Investor October 25, 2010 2:03 AM BST
By the way, I am experimenting with Betfair automation with a custom web-app in PHP.

Is this what you do Fred?
Report Fred! October 25, 2010 3:33 AM BST
lol mine only looks good because it uses dummy pages, makes it appear fast and responsive. I didn't use real betfair pages because I gave the link out on here - betfair servers take enough abuse as it is. To be honest, I haven't even tried real pages, not much point as I can't even overcome simple issues with firefox.

I think the app would probably have to be written as a firefox extension or embed the browser within itself in order to fully take control of firefox. That's out of my depth.

Your idea for further control over group mix and layouts sounds like it would be confusing in use to me, but that's all easily possible with a proper app.

Anyway, I tried and failed, I'll leave it to Escapee.

Yes, I'm into automation using PHP. I like tinkering with bots.
Report The Investor October 25, 2010 4:49 AM BST
Your idea for further control over group mix and layouts sounds like it would be confusing in use to me, but that's all easily possible with a proper app.

You mean confusing from the users perspective? Just something to speed things up. Market follow patterns (at half time the half time market is closed etc.) my idea would be to have swift reactions which are usually identical progammed into it. You don't think that's a good idea?


On a side note, I'm currently using an app that controls multiple browser windows simultaneously (example: press CTRL+2 and it goes to the second tab on all windows). This works quite well although it can take 2-3 seconds to switch tabs when there are loads open. This would probably also be faster if it was done as a firefox add-on instead. The current app basically imitates a user and makes firefox 'think' that someone is very quickly changing tabs manually.
Report Fred! October 26, 2010 12:27 AM BST
Yes confusing from users perspective I thought. I've changed my mind. It doesn't matter. It only has one user, you, and if it is programmed to behave how you want it to behave under changing market conditions then that's got to be good for you.
Report Trevh October 26, 2010 2:38 AM BST
PXB: I want all the markets I have bets in listed in a single screen (scrolling is fine) ordered by start (kick off) time. For each market I want to see my current position and bets as well as the current best back and lay prices.

PXB, which software do you use at the moment? Gruss does exactly what you have asked for and is a mere £6 per month! You can either open each event in a new window which will minimise across the top of the screen, or simply drag them from the menu bar on to the screen and they will all list exactly as you have described.
Report Escapee October 26, 2010 12:12 PM BST
Hi Fred,
I had a quick look at your web page and was quite impressed, Well maybe not visually but from a coders point of view you definitely possess some daemon skills and could easily outclass a lot of alledged programmers I know.
I tip my hat in respect to you sir....


In one post you mentioned 'I was making a meal of it' And baby jesus mentioned 'Yep I kinda agree it seemed to be getting very overblown', which I assume he is refering to the bespoke solution.

After getting over the initial dent to my pride, I realised that if two people were saying such things then in all likelyhood there was some substance to the matter.
Thinking about it further I summised that no one had actually critised my work for 20 years, and although I don't really understand what you both mean by those comments, It would be benefitial to me if I did. I might learn something.

So I would be greatful to you both if you would each expand on what you mean, where in your view have I err'ed in this process etc.
what have I made a meal of or overblown.

I shall take it on the chin and hopefully be a little wiser for it.


Many thanks in advance.
Report Fred! October 26, 2010 4:09 PM BST
Thank you for your compliment Escapee, I'm no daemon - I thought I could do better. I had a go. I failed.

My apologies for denting your pride. You need not take my comment seriously, I was being flippant as I just happened to have a quick and easy solution in mind using what I already knew.

I'm just an amateur coder, I'm ignorant of the correct and thorough steps that should be present in the software design process. However, I did think that you were steering the Investor away from what he wanted and more toward what you were able to easily provide. That's quite acceptable if you're doing it for free though.

It's a dirty project - bringing a PC to its knees - good luck :)
Report Rocket to the FACE October 29, 2010 9:57 AM BST
Hi Escapee, I've sent an email to your spam address.
Report Escapee October 29, 2010 11:34 AM BST
And I have replied Rocket.
Report Escapee October 30, 2010 2:52 PM BST
Investor, I have just emailed you the latest version.
Report Escapee October 31, 2010 11:08 AM GMT
Ignore V2, use V3 instead ( I just emailed it ).

I made an error in the date processing, v1 & v2 won't work for 1st to 9th of each month [smiley:crazy]

sorry about that
Report The Investor October 31, 2010 10:20 PM GMT
Great, it's looking good.
Report FINE AS FROG HAIR October 31, 2010 11:10 PM GMT
Investor
Just let us know if and when it all results in you making more money.
You know. The bottom line and all that stuff.
Btw I'm glad I don't even try to steal your modus operandi secrets off you, as I am accused by others of trying to do to them, as I honestly wouldn't understand them if I succeeded.
You strangely enough seem to be confident enough of yourself to answer most of my questions quite reasonably, pretty much all of the time.
I wonder why you are so relaxed about it all and certain others aren't.
Wouldn't be at all related perhaps to the fact that you are quietly succeeding in what you do and certain others aren't ?
Report Escapee November 1, 2010 10:45 AM GMT
FAFH,
I'm not sure this software will affect the bottom line much.
This program is designed to take the chore and time out of getting to work ( Rather than the work itself ).
In the same way that if someone who has walked 5 miles to work everyday and it took them over an hour. If they were then given a fast and comfortable car and a motorway which enabled them to get to work in a couple of minutes.
The car wouldn't affect thier 'bottom line' much, but would greatly reduce the overall bind of getting to work. Sure it might increase the bottom line abit as the hour no longer spent walking can be spent working and or one can pop back to the office adhoc for small bits of work with out the hour's cost of getting there.

Get a car IMHO.
Post Your Reply
<CTRL+Enter> to submit
Please login to post a reply.

Wonder

Instance ID: 13539
www.betfair.com