Race Details API - How to tell when a race is about to start?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • The Edge
    Junior Member
    • Aug 2010
    • 25

    #1

    Race Details API - How to tell when a race is about to start?

    I want to know when a race is about to start using the race details api.

    However, I can't seem to work out which state comes before a race. What order to the states come in?
  • Mr Magoo
    Junior Member
    • Jan 2011
    • 86

    #2
    Dormant -> parading -> goingdown -> atthepost -> ( goingbehind | underorders ) -> off

    Comment

    • The Edge
      Junior Member
      • Aug 2010
      • 25

      #3
      Thanks Mr Magoo. I have seen many races go from Going Down to in play. I have also seen races go from At The Post to Going Down. So I guess the race details api is not very reliable. ;{

      Comment

      • geoffw123
        Senior Member
        • Mar 2014
        • 250

        #4
        Hi

        I implemented this RaceStatus command a few weeks back, as far as I recall it was working OK. For the last week or two I have noticed my code is not showing any useful data for this command.

        Testing it with an Irish Race tonight I am seeing a response

        Code:
        "{\"jsonrpc\":\"2.0\",\"result\":[{\"raceId\":\"27791841.2005\",\"raceStatus\":\"DORMANT\",\"lastUpdated\":\"0001-01-01T00:00:00\",\"responseCode\":\"NO_LIVE_DATA_AVAILABLE\"}],\"id\":1}"
        It was puzzling me as it must have understood my sent message, but says no data available ?

        Doh, as I am typing up my question, it suddenly dawned on me I wonder if the issue is to do with UTC & British Summer Time. That might be around the time my code stopped working.

        So that raises the question what time system should I be using for the send packet? For the 8.05pm race I send .2005 in the string. Can anyone confirm if it needs to be UTC ?

        Thanks
        Geoff

        Comment

        • geoffw123
          Senior Member
          • Mar 2014
          • 250

          #5
          Just in case it helps anyone else in future, that was the problem, you need to send the race time as UTC of course.

          I had

          Code:
          DateTime startTime = marketStartTime.ToLocalTime();
          It shouldn't have the .ToLocalTime() conversion.

          It worked when I tested it in the winter time

          Geoff

          Comment

          • AlgoTrader
            Junior Member
            • Mar 2012
            • 243

            #6
            The market's marketStartTime is just an estimate. The only reliable way to detect event started is to monitor betDelay value
            Betfair Bots Made Easy

            Comment

            • PiSigma
              Junior Member
              • Aug 2023
              • 2

              #7
              AlgoTrader Can you please elaborate what value of betDelay signifies the start of the race?

              Comment

              Working...
              X