By:
ttt
|
By:
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. |
By:
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). |
By:
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. |
By:
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? |
By:
the url that is created is.
http://sports.betfair.com/Index.do?mi=101815733&ex=1&origin=MRL |
By:
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 |
By:
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..... |
By:
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. |
By:
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 :)
|
By:
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 |
By:
Surprisingly, I got some very helpful tips here, yet nothing on the developers forum
|
By:
@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' |
By:
@Chilly the Dog
Ignore my last post, sorry I seem to have gotten out of the grumpy side of the bed this morning. |
By:
@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. |
By:
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. |
By:
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. |
By:
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.
|
By:
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. |
By:
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. |
By:
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. |
By:
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). |
By:
Sorry, it was Fred who pointed it out.
|
By:
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 ! |
By:
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. |
By:
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. |
By:
"If it was going to help me make x thousand per week-----"
A pretty big if. |
By:
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). |
By:
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. |
By:
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. |
By:
Investor, you've got mail;
|
By:
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. |
By:
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 ? |
By:
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. 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 |
By:
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
|
By:
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 ) |
By:
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. |
By:
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. |
By:
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.
|