how do you get Place Markets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OzPunter
    Junior Member
    • Apr 2009
    • 161

    #1

    how do you get Place Markets

    Hi All,

    In ListEvents I set
    "eventTypeIds":["7"]},"marketTypeCodes":["WIN","PLACE"]}

    which is Horse Racing Win & Place markets

    I get back all the WIN markets but none of the PLACE markets are returned.

    What's the secret to geting the PLACE markets?
  • OzPunter
    Junior Member
    • Apr 2009
    • 161

    #2
    Geting Place Markets on AUS Horse Racing

    Here's a little twist.

    I can get win and PLACE markets form the UK API but when I apply the same code to the AUS API I get only WIN markets.

    listMarketCatalogue doesn’t appear to provide PLACE markets for the Australian race markets, yet a similar request to the UK API gives both WIN and PLACE markets.

    What’s the secret to getting Australian Place Markets for Horse Racing.

    Comment

    • betdynamics
      Junior Member
      • Sep 2010
      • 534

      #3
      What is the JSON string you are sending to request the AUS place markets?

      Comment

      • OzPunter
        Junior Member
        • Apr 2009
        • 161

        #4
        Originally posted by betdynamics View Post
        What is the JSON string you are sending to request the AUS place markets?
        First I send this string to listEvents to get a list of all events, the same string goes to both the Australian and U.K. API point

        '{"filter":{"eventTypeIds":["7"]},"marketTypeCodes":["WIN","PLACE"]}'

        Then I have a list of all the events (I still haven’t managed to get the “From” and “To” times in “marketStartTime” to work in either listEvents or listMarketCatalogue, so I have to get them all).

        I then cycle through each of the events and send this request to either the Australian or U.K. API point based on the Events Country code.

        The string I send is;

        {"filter":{"marketBettingTypes":["ODDS"],"marketTypeCodes":["WIN","PLACE"],"turnInPlayEnabled":true,"inPlayOnly":false,"even tIds":["27319536"]},"maxResults":500,"marketProjection":["COMPETITION","EVENT","MARKET_START_TIME","RUNNER_ DESCRIPTION"],"sort":"FIRST_TO_START"},"id":"1","jsonrpc":"2.0" }'

        Where the event id, is relative to either the Australian API or UK API.

        In effect except for the Event ID it is the same string.

        For Australia I get back just the WIN markets and the same strings sent to the UK API point returns both WIN and PLACE markets.

        Comment

        • OzPunter
          Junior Member
          • Apr 2009
          • 161

          #5
          Originally posted by OzPunter View Post
          First I send this string to listEvents to get a list of all events, the same string goes to both the Australian and U.K. API point

          '{"filter":{"eventTypeIds":["7"]},"marketTypeCodes":["WIN","PLACE"]}'

          Then I have a list of all the events (I still haven’t managed to get the “From” and “To” times in “marketStartTime” to work in either listEvents or listMarketCatalogue, so I have to get them all).

          I then cycle through each of the events and send this request to either the Australian or U.K. API point based on the Events Country code.

          The string I send is;

          {"filter":{"marketBettingTypes":["ODDS"],"marketTypeCodes":["WIN","PLACE"],"turnInPlayEnabled":true,"inPlayOnly":false,"even tIds":["27319536"]},"maxResults":500,"marketProjection":["COMPETITION","EVENT","MARKET_START_TIME","RUNNER_ DESCRIPTION"],"sort":"FIRST_TO_START"},"id":"1","jsonrpc":"2.0" }'

          Where the event id, is relative to either the Australian API or UK API.

          In effect except for the Event ID it is the same string.

          For Australia I get back just the WIN markets and the same strings sent to the UK API point returns both WIN and PLACE markets.

          Just to confirm things, This morning I reorganised the code to just retrieve the U.K. markets and I received both Win and Place markets then I changed the code to just reference Australian markets and again it only returned Win markets.

          There is no difference between the U.K. and Australian json strings.

          Comment

          • betdynamics
            Junior Member
            • Sep 2010
            • 534

            #6
            Do place races in AUS go InPlay?

            What happens if you don't specify an entry for turnInPlayEnabled?

            Comment

            • OzPunter
              Junior Member
              • Apr 2009
              • 161

              #7
              Originally posted by betdynamics View Post
              Do place races in AUS go InPlay?

              What happens if you don't specify an entry for turnInPlayEnabled?
              Thank you BetDynamics (once again),

              You've hit the nail on the head.

              Place markets in Australia don't turn "InPlay" so they were getting filtered out.

              That also explains why I couldn't get US markets, because their races don't turn "InPlay"

              Yet another trap in using the API-NG.

              In my humble opinion “That Sucks, the Big One”

              So what this means is that I have to create a JSON string relative to the markets behaviour in that country.

              Thanks again BetDynamics you’ve saved me from the loony bin once again.

              Comment

              • betdynamics
                Junior Member
                • Sep 2010
                • 534

                #8
                Originally posted by OzPunter View Post
                Yet another trap in using the API-NG.

                In my humble opinion “That Sucks, the Big One”

                So what this means is that I have to create a JSON string relative to the markets behaviour in that country.
                No, not really.

                Just omit the turnInPlayEnabled parameter from the JSON string and it will send you back both WIN and PLACE markets regardless of whether they go InPlay or not.

                This can be used for all countries without modification.

                Comment

                • OzPunter
                  Junior Member
                  • Apr 2009
                  • 161

                  #9
                  Originally posted by betdynamics View Post
                  No, not really.

                  Just omit the turnInPlayEnabled parameter from the JSON string and it will send you back both WIN and PLACE markets regardless of whether they go InPlay or not.

                  This can be used for all countries without modification.
                  Thanks BetDynamics,

                  I spent almost two days on this; I still reckon it's a trap for novice API-NGers

                  Now all I have to do is figure out a way to marry the Place Market to its corresponding Win market. It seems the start time is the only common factor.

                  Regards
                  OzPunter

                  Comment

                  • betdynamics
                    Junior Member
                    • Sep 2010
                    • 534

                    #10
                    Use Start Time and Venue, or Start Time and Event Id

                    Comment

                    Working...
                    X