Avoiding placing bets in running

On numerous occasions my software cancels a bet and then resubmits at slightly different odds or stake but that clashes with the exact time the race starts. As a result I end up placing a bet in running when I think everything has been cancelled already.
How can I avoid this???
One option is that after placing the bet if the race is in running cancel everything, but ideally I want the bet rejected if the race is in running.
I think so far this “error” has cost me in the region of £500

Any suggestions?

Hi Michael,

I’m not sure if I understand correctly but I think this error can simply be resolved by making an additional call to check market state before placing an order.

1 Like

It is the split second difference between the bet being submitted and the race starting that is the problem