How to find markets that are InPlay?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JohnFromCairnsAustralia
    Junior Member
    • Dec 2018
    • 34

    #1

    How to find markets that are InPlay?

    Hello there,

    I am looking to find markets that are inplay using the ListMarketCatalogue and a MarketFilter.

    I have found that if I set the MarketFilter date to a negative start time, it does not seem to return markets that are in play.
    I see there are inplayonly and turninplayenabled

    Can anyone tell me what those are for? or how one would do a search that includes inplay markets?

    Thank you kindly for any assistance
    John
  • BetfairDeveloperProgram
    Administrator
    • Oct 2008
    • 680

    #2
    Hi John

    Assume you are looking for inplay MATCH_ODDS markets for football (Soccer), the following will return current in-play markets:

    Code:
    [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params": {"filter":{"eventTypeIds":["1"],"inPlayOnly":true,"marketTypeCodes":["MATCH_ODDS"]},"maxResults":"900"}, "id": 1}
    ]

    Code:
    [{"jsonrpc":"2.0","result":[{"marketId":"1.153399934","marketName":"Match Odds","totalMatched":4744.15},{"marketId":"1.153398008","marketName":"Match Odds","totalMatched":17499.73},{"marketId":"1.153399311","marketName":"Match Odds","totalMatched":1457.41},{"marketId":"1.151866744","marketName":"Match Odds","totalMatched":345043.3},{"marketId":"1.153398650","marketName":"Match Odds","totalMatched":5468.6}],"id":1}]
    Thanks

    Neil

    Comment

    • JohnFromCairnsAustralia
      Junior Member
      • Dec 2018
      • 34

      #3
      ahh ic.. As simple as that! Thanks Niel, much appreciate your help. - John

      Comment

      • JohnFromCairnsAustralia
        Junior Member
        • Dec 2018
        • 34

        #4
        Sorry Neil, just to clarify, I gather that means if I want to search for both inplay and non-inplay I have to do two calls (one for inplay and one for not)? I.e. I can't set inPlayOnly=false, and put a negative time on the filter to get them both in one call?

        Comment

        • BetfairDeveloperProgram
          Administrator
          • Oct 2008
          • 680

          #5
          Hi John.

          It would make sense to do two seperate calls as if your looking to identify markets that are in-play right now (inplayonly) you'd want to see this in a single filtered list.

          Non-inplay markets (inplayonly) would be a much longer list.

          Turninplay enabled would indicate any markets that are either in play or due to be turned in play at some point in the future.

          Kind Regards

          Neil

          Comment

          Working...
          X