Track Topic
: rss

Topic: When Bots go wrong...

posts 1–10 of 10
Page 1
?
70 posts

Are there any horror stories out there?? :)

?
47 posts

Made a coding mistake which hit my bank. The golden rules are bet discipline and not staking your whole bank. Meant I was not hurt too bad. Also I try to code from the point of view of what could go wrong and run scenarios best on worst cases. I

now

always run code changes in at low amounts.

I am planning to slit my bots in to a stable version(s), testing version and just-changed version. With staking reflective of how stable. This is great until you have to do a bug fix in the stable. (Notice the Debian background)

BMS

?
9 posts

I recently made a code change for in-play horse race bets and neglected to switch from the production to the test stakes table and lost a bit of cash (not too much), annoying because had it been coded correctly I would have easily cleaned up. Nevermind, conversly I have benefited from coding errors but this happens less often.

Makes it sound like my code is always breaking down, I have actually been surprised how well it has held up at times. Always striving to make it better - lol.

?
128 posts
We've all lost a few quid due to simple errors but i've never lost any large sums because i've always been highly cautious and put a beakpoint before bet placement so that i can check that the triggers are correct. Another technique i use is to comment-out the actual bet placement and then simulate the response. You could take the simulation process one step further by using historical markets but you need to save the "raw" response and feed it into your http functions instead of loading the actual http. Probably a good idea and not difficult to implement but i never tried it cos there's no fun in placing "fake" bets. Laughing
member
91 posts

I'm currently waiting to see how much an oversight cost me.

When playing with new bots or new betting mechanisms something I sometimes do is lay runners £2 at 1.01 rather than the price I intend to use just to check that everything is working ok. Well today I started a new bot up and had it place such bets across the field 15 minutes before each horse race. I then had to go out (yes, my favourite fateful words). I figured there'd be no harm in letting the bot run for a few hours, in fact it would provide me with data showing how reliable it was or show me any potential problems.

The oversight - the bot was temporarily running on an account shared by another bot which had no notion of which bets belonged to it. The result, the other bot found all these unmatched 1.01 bets on its account and assumed they were missed trades and started adjusting them tick by tick upwards, as many as it could, every second...

Little damage as all the bets were £2. However, I am now expecting my first transaction charge.

member
12 posts

Well, the betfair testing platform is unusable. It is really strange they are not able to offer live data at least for one market. So the only way is to test on live data when necessary. I think anyone playing with bots lost money in testing, me as well so after one such 100 Euro loss I implemented a practice/simulation mode where the bet placing is just simulated with simple matching logic, risk free but sometimes annoying when forgetting that bets were not placed for real thinking I won nice money to discover later that only in practice mode :-)

member
91 posts

My transaction charge finally showed up today at 10.45, I wouldn't have known what it was if I hadn't been expecting it as it just says "Debit" on my account statement. £110 oops.

member
50 posts
transaction charge for what?
member
91 posts

Transaction charge for my cock-up. Using the API there's a 1p transaction charge for every bet you place or update that exceeds 1000 per hour.

So I had one test bot laying the field 1.01 for every horse race 15 minutes before the off. Then my trading bot running on the same account was finding these and updating them once per second increasing them 1 tick at a time ie 1.02, 1.03, 1.04 up to the point they got matched or cancelled at race start.

That was a lot of transactions, hundreds per runner per race, and could have been much worse, as it only ran for 2 hours and was limited to updating 9 bets per second.

member
62 posts

This is more of an annoyance than a horror story, but I got back from work today to find I'd lost £150.  An algorithm that's supposed to stop trading 10 minutes before a football match starts had placed a bet fifty minutes into the game (after the first goal was scored) - and lost (unsurprisingly).

It's a new algorithm that I only put live a couple of weeks ago, and which I obviously should have tested more.  At first glance the code looked safe, because it was checking both the markettime and the betdelay.  But on closer inspection (I now find) it's not looking at the CURRENT markettime and betdelay, it's checking some values the bot stored the very first time it retrieved details for the market.

For this particular match (Ukraine v Poland) the markettime was recorded as 18:45, rather than the correct time of 17:00.  BF may have corrected it subsequently for all I know, but my bot was still using the firsr value it retrieved, which was wrong.  Truly I'm a f**kwit!  Could have been a lot worse though.  I suppose the £150 was worth it to find the bug before it caused worse damage.  Wink

 

posts 1–10 of 10
Page 1

This Topic Is Locked To Guest Posts

It's been a while since this topic was active, if you'd like to get it going again, please post as a registered member

join now