Stefan, which charting components do you use in your app? I'm currently using ZedGraph because it mostly does the job and is free, but doesn't look quite as 'polished' as yours. Just curious!
Member of: Diybetfairbots Forum.
No posts received thumbs up, next time you see a good one, give some respect and thumb it up.
Re: Possibly a silly question
September 23, 2009 by bennean
I use this (C#) library. It's free and the source code is available. Down side is that I had to fix a bug in the Relative Strength Index (RSI) code. I can give anyone the updated code if they're interested.
Re: Horse Finishing Position Abbreviations
August 28, 2009 by bennean
Cheers Birchy, those make sense, I like your thinking.
Amazingly, the Timeform API is free (at least, for now). Vossie's project is C# based, but because the API is all HTTP/json based it would be easy to adapt to php, ruby, java etc. It implements the following calls:
- GetFutureMeetings
- GetActiveRaces
- GetRacecourse
- GetTopTrainers
- GetTopJockeys
- GetRacecard
- GetHorsePerformanceAll
- GetJockeyPerformanceAll
- GetTrainerPerformanceAll
- GetMeetingsOnDate
- GetRaceList
- GetRaceResults
- GetLastRun
- BetfairMarketToRaceMatching
Example:
http://form.horseracing.betfair.com/timeform?&key=horse_performance_all&horse_code=00284089&page_sz=999&page_no=0
The full C# project can be found here:
http://forum.bdp.betfair.com/showthread.php?t=340&highlight=timeform
Horse Finishing Position Abbreviations
August 28, 2009 by bennean
Hi guys, I'm currently using Vossie's Timeform API Project (which is great) for horse racing and am using an API call to get each horse's past race information. I like the API because it avoids some nasty Racing Post screen scraping (sorry Birchy, I know you're a scraping fan!). Anyways, some of the 'beaten by' fields contain abbreviations that I'm not familar with.
So for example, I know ns=nose, hd=head, nk=neck,sh=shoulder...but what do dh and ds mean? Not really a bot question per se but I'm sure one of guys will know the answer.
PS. I'm finding the Adam Heathcote thing highly entertaining, it still continues to rumble on...
Re: How's everyone doing?
July 12, 2009 by bennean
I wish!
I'm struggling on with my bot. Every new strategy I try seems to make money for a few days then has a big loss which wipes out all the profit (and more!).
Have you seen this, I thought it was interesting...
http://dynamicnotions.blogspot.com/
Re: API request XML - hand rolled
May 18, 2009 by bennean
Now you've got me wanting to do some benchmarking!
Re: API request XML - hand rolled
May 18, 2009 by bennean
Do you realise that Visual Studio will do all the work for you if you point it at the WSDL uri (https://api.betfair.com/global/v3/BFGlobalService.wsdl)
Do you really find hand-rolling XML fun? Wierd!
Re: API Lite - what's the difference?
May 2, 2009 by bennean
Luckily I was only doing some light testing, so it was only about £5. But still, I think the term 'free API' is a misnomer!
Re: API Lite - what's the difference?
April 27, 2009 by bennean
While we're on the subject I thought it would be useful to mention that I got stung with data charges in March using getMUBets. The reason was (and I quote):
"Yes, the spikes are due to you calling getMUBets with marketId = 0.
These calls count as five data requests, compared to one data
request if you were to specify the marketId in the getMUBets request."
Re: Selection Ids
January 30, 2009 by bennean
Sorry guys, didn't realise this had been answered on a previous thread. Re. changing selectionIds; BF don't like making our lives too easy, do they?
Selection Ids
January 29, 2009 by bennean
Does anyone know if Selection Ids are absolutely unique?
For example, if Kauto Star has selectionId 123456 in race X, can any other selection ever re-use id 123456?
And if Kauto Star appears in another race (Y), will he keep sectionId 123456, or will he get another (new and unique) selectionId?
This is probably documented somewhere but I'm damned if I can find it...and it affects my data model!
Re: What would you do with Full Access?
January 27, 2009 by bennean
And the betfair side of it is happy to have more than one API call in progress with the same token at the same time?
-austinpodhorzer
yep, I have four threads (prices, volumes, bets and keepalive) all concurrently using the same session token, no probs at all.
Re: What would you do with Full Access?
January 27, 2009 by bennean
I've just checked and that's the way I've coded it. Every API request uses the session token from my original login (loginResp.header.sessionToken). I'm kinda glad, I thought I was going insane! That's the magic of Stella ;-)
Re: What would you do with Full Access?
January 27, 2009 by bennean
What you say makes a whole lot of sense, I just can't remember how I coded it up. I'll check tonight, but we may be looking at a good of example of coding whilst under the evil influence of Stella Artois!
Re: What would you do with Full Access?
January 27, 2009 by bennean
If you only 'login' to the API once you only have one 'session' and therefor can only have one call in progress at a time. So if you want multiple threads to be able to access the API simultaneously then you have to login multiple times and manage multiple header tokens
-austinpodhorzer
Is that really true? I have several threads running (one for prices, one for volumes, one for bets and one for keepalive) and they all 'share' one session. As long as the header token is protected (to be thread-safe), then what's the problem? I've never seen a threading problem with my bot - have I just been lucky?
Re: What would you do with Full Access?
January 20, 2009 by bennean
I know what you mean, there is a lot of hoo-ha about BI, trouble is, I'm trying to use an OLAP tool to analyze my data (ad-hoc slice and dice, trend analysis etc.) and it has to be told what the dimensions and measures are...I'm new to OLAP but I'll work it out! My rationale is that once data is in a cube, it's a lot easier to play with. But I guess vanilla SQL would do the trick if you know what you're looking for (but I don't - yet!)
Re: Recent changes to forum
January 19, 2009 by bennean
Young'un? Why, thank you, that's the nicest thing anyone's said to me all day!
PS. for info...
http://betting.betfair.com/horse-racing/betting-strategy/racing-betting-reverse-labouchre-staking-120808.html
Re: What would you do with Full Access?
January 19, 2009 by bennean
S' funny you should mention it. My bot saves tons of data to a database(e.g. every price every second, for every UK horse race), but am stillworking on a way to analyze it all. I'm currently using a relationaldata model (happy to publish the model), but think I need a datawarehouse schema (because of the volume of data)...but haven't a clue what the fact tables are, letalone the dimensions and measures. All of the DW examples I've seen arealong the lines of your more typical products & sales...
Are there any BI gurus out there? It's got me stumped at the moment! Ithas to be akin to trend analysis in financial markets (but look at themess they got into!)...
Re: Recent changes to forum
January 19, 2009 by bennean
Hi all,
My tuppence worth; I agree with Paul, I'd rather see quality over quantity on here. The last thing you want is idiots like me sticking their oar into every post. This is an excellent forum, I have a gander at least twice a day because I find it so interesting. I contribute when I can, but because I'm still a newbie when it comes to betting and betting strategies that I find I'm often out of my depth! I'm a C# programmer by trade and am willing to help out with C# programming issues, but you all seem to hate Microsoft and so use Perl, Python and Ruby instead! :-0
I find the actual programming of bots quite straightforward; it's the strategy I struggle with - and (not surprisingly) that's one thing people here are reluctant to share. For what it's worth, I'm currently experimenting with a reverse labouchere strategy and am losing money! I've tried all sorts over the last 18 months and have blown about £1000 so far...not too bad, and it's been fun but I just wish I could make a consistent profit, even if it was just for a week or two!
Andy
Re: API errors
December 10, 2008 by bennean
Nope sorry, left my bot running all day Monday and today and everything was fine except for a couple of getTradedVolume API errors and a "underlying connection was closed: A connection that was expected to be kept alive was closed by the server" error around 16.30.
Andy
Re: Finding the optimum odds to close a position.
November 18, 2008 by bennean
I divide the potential profit by the latest price...here is my (C#) code
If I have an opening back position (the size is 'stakeToRecover'), I place a lay bet of size stakeAdjustment:
stakeAdjustment = CalcStake(averageBetBackPrice, currentLayPrice, stakeToRecover);
If I have an opening back position, I place a backbet of size stakeAdjustment:
stakeAdjustment = CalcStake(averageBetLayPrice, currentBackPrice, stakeToRecover);
private static double CalcStake(double price1, double price2, double originalStake)
{
double profit = CalcProfit(price1, price2, originalStake);
double adjustedStake = Math.Round(originalStake + (profit / price2), 2);
if (adjustedStake < MinStake)
{
adjustedStake = MinStake;
}
return adjustedStake;
}
private static double CalcProfit(double price1, double price2, double originalStake)
{
double profit = Math.Round((price1 - price2) * originalStake, 2);
return profit;
}
Does that make sense?! Theres probably a more efficient way of doing it, but this does the job for me.
Re: API status?
November 12, 2008 by bennean
Back up now. My bot did not handle the outage very well, puked with a load of HTTP status 404: Not Found errors.
I guess my error handling needs beefing up.
Re: Automatic Exchange Betting, Colin Magee
October 31, 2008 by bennean
Where did you buy it from? Cheapest on Amazon seems to be £39.89. If I could get it for £30 that might sway me to buy it. I will probably regret it, but it has piqued my curiosity!
Re: Automatic Exchange Betting, Colin Magee
October 30, 2008 by bennean
Fred, is that the only strategy covered in the book? Not sure if it's just me, but for £40 I would expect a bit more...
