Track Topic
: rss

Topic: In Play Ststus

posts 1–8 of 8
Page 1
?
9 posts

My horse racing bot places bets right up to the actual off, not the expected start time, and then switches modes once the market goes In Play. If the market gets suspeneded then it pauses for 2 seconds. I take the market status info from the getMarketPricesCompressed v5 API call.

The problem I have is that in about 1 in 10 races the bot is still placing bets from the pre-off system once the market goes In Play. I always call getMarketPricesCompressed before placing any bets. Has anyone had this issue too?

I have had to write additional code to identify and cancel bets which are not susposed to be In Play, this takes up valuable processing time when I am more interested in getting my bets on as early as possible. It would be far less riskier if they were't placed at all. Any suggestions?

?
31 posts

Sometimes the status seems to toggle a couple of times before it settles down - not sure why - maybe getting responses from different betfair servers?
Could this cause your problem?

Best bet would be to log PC time and received timestamp and status to file, and then on the races where it happens you can go back and see what sequence of statuses you got from betfair

?
9 posts

Thanks peteb, if the status changes back to non-in play then this may well be an issue. I will set a boolean switch so that the first instance of an in play market status will turn on the in play mode. Thinking out loud: this maybe an issue if there is a problem at the start of the race and normal pre-race betting is resumed.

?
16 posts

This scenario happened to me yesterday; it looked like the delay went > 0 and the status went to SUSPENDED. This fooled my bot into thinking the race was over, rather than just starting! I had assumed the sequence was:

1. delay 0, status ACTIVE : before race
2. delay 0, status SUSPENDED : start of race
3. delay 1, status ACTIVE : in running
4. delay 1, status SUSPENDED : end of race

...but it doesn't seem to happen like this all the time. I may have this all wrong though!

I thought I might try keeping a count of how many statuses I get back e.g. if I get more than, say 5 consecutive statuses (when delay > 0) it would mean I can trust whether I'm in running or race finished...This feels safer than sleeping to me...

Thoughts anyone?!

?
91 posts

I haven't looked too closely lately, but certainly remember that delay may become 1 before status becomes ACTIVE.

eg

1. delay 0, status ACTIVE : before race
2. delay 0, status SUSPENDED : start of race / or trouble loading a horse etc
3. delay 1, status SUSPENDED : start of race
4. delay 1, status ACTIVE : in running
5. delay 1, status SUSPENDED : end of race
6. delay 1, status ACTIVE : photo / stewards betting

Quite often markets go inplay so fast that my bot doesn't even see steps 2/3

?
9 posts

It's interesting - as fred77 says, the Market switches to delay 1 status ACTIVE very quickly at times. - I'm sure six months ago, the above process was a defined process. Anyone use API v6? Does it throw the same issue? If so, is this a ploy to get everyone migrated to v6 quicker? Anyone have any ideas when support of v5 will cease?

?
27 posts

Still using v5 here, an upgrade is one of those things on the 'to do' list that never gets done - no pressing reason for me at the moment. When they dropped v4 there was an announcement on bdp about 3 months in advance of the scheduled date (which ended up being 6 months before the actual date). So I would guess at least another year.

?
70 posts

There's a field described as 'The time the market information was last read from the database' in the return String for getMPC...

I remember in the past noticing that this can sometimes 'go backwards'. sometimes call n+1 returns a timestamp < call n!
My hunch was as peteb suggested: 'maybe getting responses from different betfair servers?'

In the early versions of the API I think there were some cookie shenanagins you could do to make sure you kept with the same server ... but this was removed.

Might be best to check this timestamp and see if status wierdness coincides with time running backwards?

posts 1–8 of 8
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