Lefora Free Forum

captain-sensible's Blog

Member For: 1 year, 5 months
Posts: 34

Member of: Diybetfairbots Forum.
Top Post By captain-sensible (most thumbs up):

No posts received thumbs up, next time you see a good one, give some respect and thumb it up.

Recent Posts by captain-sensible:

Re: Scraping the BF results page

October 1, 2009 by captain-sensible

Yep possible have a look at http://forum.bdp.betfair.com/showthread.php?t=340 written in c#

Timeform.NET is a complete .NET library written in C# 2008 that provides methods to access the data provided by http://form.horseracing.betfair.com, the library was written as an educational tool to assist developers interested in working with UK/Irish horse racing form, result data and JSON data sources, the library IS NOT a supported product.

All the JSON responses has been wrapped in objects to simplify working with them.


*** Available Methods ***

GetFutureMeetings GetActiveRaces GetRacecourse GetTopTrainers GetTopJockeys GetRacecard GetHorsePerformanceAll
GetJockeyPerformanceAll
GetTrainerPerformanceAll
GetMeetingsOnDate
GetRaceList
GetRaceResults
GetLastRun
BetfairMarketToRaceMatching New*

If you found this usefull, have a question or fixed a bug please post your findings here so we can share the knowledge!
Happy coding.


Re: scraping prevention

May 17, 2009 by captain-sensible

I'd agree with birchy I used to have problems like that when using flash+php to scrape sites and the prog was just returning cached data unless I was adding random numbers to the url to make the returned data unique.

Re: API Lite - what's the difference?

April 26, 2009 by captain-sensible

The light versions don;t return all the info the full calls do, think getMUBetsLite omits a lot of the date/time data. A lot of the stuff is probably irrelevant if you're already storing data in arrays so just use them to double up the calls available via the free api. Comparing the outputs details in the api manual should show whats missing obviously for betfair the lite versions just mean lower overheads and strain on their creaking database

Re: Betfair In-Running Data

January 11, 2009 by captain-sensible

Dunno if you've got the latest 2008 stuff but its all here http://www.betfairpromo.com/betfairsp/prices/ pretty much in the format you want. TBH I wouldn't have thought the 2007 data would be too much use as things change on betfair so quickly and any trends are quickly spotted and exploited until they become unviable. I had a script sticking the 2008 stuff into a mysql database for a while but gave up on it in december as it didn't show anything too useful.

Re: Just starting

December 30, 2008 by captain-sensible

I doubt you're the only one sick of Stefans spam birchy :)

I've yet to actually see Stefan give anyone coding advice other than to buy his software.

Re: The law of averages ...?

October 12, 2008 by captain-sensible

Unless you can accurately predict when the trough is coming it's just a case of accepting the 3% long term I guess. If your bot has a fair degree of volatility you're just as likely to miss out on a peak by lowering stakes.

Probably best to look at the dat and see if there's a pattern emerging within the peaks

Php advice upgrading to php 5.2

September 24, 2008 by captain-sensible

I've got xampp installed but unfortuately it's version 1.6.6a and the upgrader only works for 1.6.6 to 1.6.7 doh :(

I want to upgrade the php from 5.1 to 5.2 as it has the json decoder intergrated into 5.2. Is it rlatively easy just to upgrade the php on it's own ? I've had problems before when switching versions as I guess it's messed up my setting and stopped some of my scripts runnig before so don't rally want that hassle or the hassle of uninstalling everything from scratch in case I lose database settings etc.

Any easy way just to upgrade without messing the info files ?

http://www.betdaqtrader.com/

September 18, 2008 by captain-sensible

Betdaq have released a one click API prog at http://www.betdaqtrader.com/ if anyone wants to have a look. I see it's in java so guess it wouldn't be too hard to decompile if anyone wanted to use it as a springboard for their own bot.

Re: New premium charges ... a 'work around'

September 12, 2008 by captain-sensible

It's a tricky one Fred as to whether us small botters will get hit badly. Most people will realise that there will be accounts that are loss leaders for Betfair but whether the benefits of having them on board bring in more cash than they cost in the long run is debatable. Betfairs view is obviously that they aren't worth clinging onto either because their arrogant view is there are no viable alternatives for these people to move to or they wish to fill those positions themselves much like they did with betfair games.

Less liquidity generally means wider spreads which in theory should benefit us but their bet matching software already removes any likely % blips we can take advantage of and wider spreads may mean we now have to close at worse value if we green up before the off. Bet matching may also mean the prices never hit our poor value estimates too when taking a long term value approach but I guess only time will tell to see the true impact of this.

My own view is that although people will shift the main markets will just be replaced by others willing to accept the 20% payout but it will just affirm betfairs view they do as they wish and any future changes will affect us a lot more than this one.

Re: New Ts&Cs... wtf?

September 9, 2008 by captain-sensible

I've only got this old script, should still work though http://fred77.co.uk/downloads/betdaq.txt

Thanks Fred , I'll have a look at it later tonight.

Re: New Ts&Cs... wtf?

September 9, 2008 by captain-sensible

I've been watching the betfair forum all day. Exciting times, though I feel a bit left out as I had an email to say I wouldn't be affected ;) Could be worthwhile dusting off my daqbot again I suppose...

Fred do you have any sample code for the betdaq API ? Just had a look at their API docs and not exactly well written are they :(

Re: getBetHistory php

September 3, 2008 by captain-sensible

Yep all that permission stuff is a right pain after using windows and being able to mess around with anything and everything. I've figured out how to log in as root on ubuntu now so can at least drag and drop files into the folders for my php stuff that was in windows rather than trying to learn all the command line stuff.

Transferred the database stuff as sql files from phpmyadmin which was probably better as I could miss out some of the useless database stuff I'd messed around with testing things. Seems nice and stable though so eventually I'll probably set up my bot stuff via linux on an old pc

Re: getBetHistory php

September 1, 2008 by captain-sensible

inksmithy, managed to instal ubuntu using wubi nice and easy. Installing xampp wasn't too much of a pain once I'd figured out how to move files and get myself privaleges to write to the drives :(

Just need to transfer over my php scripts now and hopefully everything will be stable enough to run without crashes like xp

Re: getBetHistory php

August 31, 2008 by captain-sensible

jpl, thanks for the code exactly what I needed. Just need to code it up to cover all probable scores and it'll be able to set my odds for me :)

I've seen a lot of stuff about poisson underestimating draw odds but I've always found it useful to quickly whittle down markets I can look at in greater detail. In my old spreadbetting days I had simple php stuff working out spreads moe or less just using averages and the amount of times that was out of line with the spread firms was negligable. Sometimes it's easy to overlook the obvious at ths game and the quicker you can spot out of line prices/errors the quicker you can profit from them

Re: getBetHistory php

August 31, 2008 by captain-sensible

captain - I use some Poisson-related algorithms to pick out value bets on the Total Goals markets.  They normally seem to do quite well (although they lost a lot of money this weekend as it happens).I'm happy to post my PHP class that calculates Poisson probabilities (like the Excel POISSON function) if that would be helpful.

jpl that'd be a great help if you don't mind, save me figuring out the poisson calcs and trying to replicate them in php :( I did find some code on the net last night but haven't had time to look at it since getting back from my hols yesterday

inksmithy, I've already used the xammp for windows so guess I'll bite the bullet and try and go for a dual boot - can you use the current mysql data files or would I need to have duplicates for the linux instal ?

Re: getBetHistory php

August 31, 2008 by captain-sensible

I'd forgotten about the BDP site when posting as haven't been there for ages Fred, as no one ever posts on the php side. It was a sad day when you took down te 77 site and associated snippets :)

Whilst you're around fred a couple of quickies -

Linux - how easy is it to use with php ? For some reason my php instals have goe to pot and crashes far too often these days reckon it may be my xp thats the prob but not sure (acer laptop with just some recovery cd not xp disc) Looking for something to run my bots on thats stable for the aussie stuff i do so thinking of dual boot or even possibly running linux of a cd or pendrive. Seen the pendrive stuff may be a no no as the drives only have a finite amount of write to's.

Poisson - Have you done anything with php & poisson distributions ? Used to have very succesful results in my old spreadbetting days but it was kind of a mish mash of marrying up excel with php generated database files to get my bets. I think I'm a bit more proficient with php these days and football-data.co.uk has all the stuff i need to automate things.

Re: getBetHistory php

August 22, 2008 by captain-sensible

No need to reply Fred , I managed to get something up and running

getBetHistory php

August 22, 2008 by captain-sensible

Fred do you have any sample php code for getBetHistory ? I did have something coded but recently reinstalled xp and as usual lost my mysql database and some of my code snippets :(

Re: Betfair Events

July 30, 2008 by captain-sensible

I used to get invited all the time but luckily they've given up on me now as I could never be bothered to go to them. Doubt the bog standard ones will tell you anthing you don't know generally just explaining the concept and explaining trading techniques. The other ones are usually pre - product/site amendment launches and I think they were paying about £200 to attend those so I guess they'd just be market research exercises to pick your brains.

Re: New Cross-Matching Logic on Betfair

July 28, 2008 by captain-sensible

I imagine the 20 odds markets you're hitting now are probably due to caching issues rather than actual over/unders Fred.

Re: New Cross-Matching Logic on Betfair

July 13, 2008 by captain-sensible

Yep certainly not good news for us botters :( . Have to come up with a few new strategies now to scrape those extra pounds out of the markets

Re: Exchange Apis

June 26, 2008 by captain-sensible

Ibetx have one http://ibetx.com/info_developers.php but I've not bothered looking at it. WBX keep saying they'll have one soon but thats been going on for ages.

Re: Idea for new bot...

June 25, 2008 by captain-sensible

This is a discussion on whether it is possible to consistantly get a profitable situation after locking in a price and the market moving against you. Its an attempt at using a different idea to work around how to get a profit from a seemingly lost position.I understand that losing trades is part of the game, but what if you could cut that out of the game? I am not sure if it is possible but I am trying to determine if what I have proposed is possible.

The simple answer is no you can't consistently turn a losing trade into a profitable one. All you're effectively doing is falling into the trap of chasing a losing trade. Obviously the natural ebb and flow of the markets allow you to grab profits and you should maybe concentrate on area rather than trying to come up with some recovery method once a trade has gone against you.

If your recovery method is making profits then use it all the time and not just kick in once things have gone wrong. What you're proposing is just trying to make a new book based on a duff starting position and there's no guarantee you'll get top price for the other runners and just as likely you'd end up having other runners going against you making the situation worse. Plus if you're trying to get a profit it'd have to be quite an agressive method which is always risky. You'll regulary see horses odds half in price only to eventually go back to their starting odds and there's nothing to say your original losing bet wont' come out again.

You'll be better off concentrating on the original method of picking your trades and then use the old adage of let your profits run and cut your losses short rather than some form of chasing a loss imo. If someone out there has the holy grail of turning a loss into a profit I'd be surprised if they'll share it on here.

Don't take this as some sort of criticism as we've all had ideas than never come off but I think you'd be better off getting a winning strategy that combined with any stops will realise a profit over time.

Re: Idea for new bot...

June 24, 2008 by captain-sensible

Surely if you have a technique for turning a losing trade into a profitable one, you need to employ the same technique to increase the profits on a winning trade.

Losing trades are part of the game I'm afraid and most decent traders will know when to cut and run then either try and make separate trades to either reduce those losses or get the book back into profit.

Re: getCompleteMarketPricesCompressed

June 10, 2008 by captain-sensible

Thanks for the input lads, managed to find an array command within php to sort it.

$final=array_chunk(explode('~',$runnerinfo), 5);

Don't think I could migrate to C# Pete , some of my bots use less code than your routine :)