Get market data for events

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • goranculibrk
    Junior Member
    • Feb 2019
    • 2

    #1

    Get market data for events

    Hey guys,
    I'm bit lost in the documentation.
    I'm trying to get the markets for the specific event.
    For example: Real Madrid vs Barcelona, over 3.5 goals, or total corners 11, 1st half over 1.5 etc.

    Also, is it possible to get the results for selected markets after the event is over, without placing the bets?

    Thanks
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    1 Get the relevant listMarketCatalogue.
    2 Get listMarketBook with a list of all the marketTypeCodes you require specified in the marketTypeCodes array. A good thing to do while writing your program would be to get it to retrieve all from listMarketTypes to see how the various marketTypeCodes are written.

    Here are some results from listMarketTypes. There are more.

    "jsonrpc":"2.0","result":
    [{"marketType":"MATCH_ODDS","marketCount":877},{"ma rketType":"WINNER","marketCount":41},
    {"marketType":"OVER_UNDER_65","marketCount":296},{ "marketType":"BOTH_TEAMS_TO_SCORE","marketCount":3 06},{"marketType":"FIRST_HALF_GOALS_05","marketCou nt":253},{"marketType":"TEAM_B_1","marketCount":26 1},{"marketType":"OVER_UNDER_15","marketCount":305 },{"marketType":"HALF_TIME_SCORE","marketCount":29 3},{"marketType":"OVER_UNDER_35","marketCount":307 },{"marketType":"CORRECT_SCORE","marketCount":329} ,{"marketType":"OVER_UNDER_55","marketCount":298}, {"marketType":"OVER_UNDER_45","marketCount":304},{ "marketType":"OVER_UNDER_25","marketCount":580},{" marketType":"TEAM_A_1","marketCount":261},{"market Type":"TEAM_TOTAL_GOALS","marketCount":66},{"marke tType":"PLAYER_B_WIN_A_SET","marketCount":8},{"mar ketType":"CORNER_ODDS","marketCount":26},{"marketT ype":"OVER_UNDER_85_CORNR","marketCount":11},{"mar ketType":"FIRST_GOAL_SCORER","marketCount":6},{"ma rketType":"OVER_UNDER_135_CORNR","marketCount":11} ,{"marketType":"WINNING_MARGIN","marketCount":70}, {"marketType":"CORNER_MATCH_BET","marketCount":11} ,{"marketType":"OVER_UNDER_45_CARDS","marketCount" :11},{"marketType":"HALF_TOTAL_POINTS","marketCoun t":10},
    "id":1}


    And this is a chunk from my program to give you the general idea of the look of an appropriate listMarketBook call. Mine's in VB.Net.

    Code:
    "filter": {"eventIds": ["27339645"],"marketTypeCodes": ["MATCH_ODDS","CORRECT_SCORE","OVER_UNDER_25","OVER_UNDER_35"]},"maxResults": "10"
    Yes, it is possible to get all the results afterwards, even if you haven't placed a bet.

    Comment

    • goranculibrk
      Junior Member
      • Feb 2019
      • 2

      #3
      Huh,
      I've followed your steps although first one is a bit strange to me.
      Shouldn't I get listMarketTypes first, for specific eventID? And after that, with an array of market types, query the listMarketCatalogue?
      Also, I'm being confused with market IDs. Where do I get them?

      EDIT: I've managed to get the markets. The problem was with bad format of paramateres I created in my code. It works now.

      I have one more question, I have the selection Ids for the markets, how to run a query to check the outcome of the selection?

      Do I need historical API for that or?


      Originally posted by jabe View Post
      1 Get the relevant listMarketCatalogue.
      2 Get listMarketBook with a list of all the marketTypeCodes you require specified in the marketTypeCodes array. A good thing to do while writing your program would be to get it to retrieve all from listMarketTypes to see how the various marketTypeCodes are written.

      Here are some results from listMarketTypes. There are more.

      "jsonrpc":"2.0","result":
      [{"marketType":"MATCH_ODDS","marketCount":877},{ "ma rketType":"WINNER","marketCount":41},
      {"marketType":"OVER_UNDER_65","marketCount":296 },{ "marketType":"BOTH_TEAMS_TO_SCORE","marketCoun t":3 06},{"marketType":"FIRST_HALF_GOALS_05","marketCou nt":253},{"marketType":"TEAM_B_1","marketCount": 26 1},{"marketType":"OVER_UNDER_15","marketCount":305 },{"marketType":"HALF_TIME_SCORE","marketCount":2 9 3},{"marketType":"OVER_UNDER_35","marketCount":307 },{"marketType":"CORRECT_SCORE","marketCount":329 } ,{"marketType":"OVER_UNDER_55","marketCount":298 }, {"marketType":"OVER_UNDER_45","marketCount":304 },{ "marketType":"OVER_UNDER_25","marketCount":580 },{" marketType":"TEAM_A_1","marketCount":261},{"market Type":"TEAM_TOTAL_GOALS","marketCount":66},{"marke tType":"PLAYER_B_WIN_A_SET","marketCount":8},{"mar ketType":"CORNER_ODDS","marketCount":26},{"marketT ype":"OVER_UNDER_85_CORNR","marketCount":11},{"ma r ketType":"FIRST_GOAL_SCORER","marketCount":6},{"ma rketType":"OVER_UNDER_135_CORNR","marketCount":11} ,{"marketType":"WINNING_MARGIN","marketCount":70 }, {"marketType":"CORNER_MATCH_BET","marketCount": 11} ,{"marketType":"OVER_UNDER_45_CARDS","marketCoun t" :11},{"marketType":"HALF_TOTAL_POINTS","marketCoun t":10},
      "id":1}


      And this is a chunk from my program to give you the general idea of the look of an appropriate listMarketBook call. Mine's in VB.Net.

      Code:
      "filter": {"eventIds": ["27339645"],"marketTypeCodes": ["MATCH_ODDS","CORRECT_SCORE","OVER_UNDER_25","OVER_UNDER_35"]},"maxResults": "10"
      Yes, it is possible to get all the results afterwards, even if you haven't placed a bet.
      Last edited by goranculibrk; 27-03-2019, 04:39 PM. Reason: Fixed the issue

      Comment

      • jabe
        Senior Member
        • Dec 2014
        • 705

        #4
        For a particular event, I don't believe there's any way to determine whether that event has a particular market type other than by trying to get the relelevant marketBooks and checking that you get all the ones you were hoping for. In my program, I want four, and if there are fewer it ignores the event. You shouldn't need to run a listMarketTypes call because you already know which ones you need for your betting strategy. Once you've found the correct spellings for your marketTypeCodes, you have all you need to know. My program has a tab that allows me to code and make most of the API calls while it's running, so it's simple for me to make a call to listMarketTypes with or without parameters.

        To get the result of a market, you can do a listMarketBook call. I can't remember how long the results remain available, but I believe it's a few months. The market status will be CLOSED. You'll get a variety of runner status values, including WINNER, LOSER, PLACED, and REMOVED (for withdrawn horses, etc). There are others, which you can find in the documentation. I find the PDF version of the documentation far easier to search than the online version, but sometimes there are changes that haven't been put into the latest PDF yet.

        Comment

        Working...
        X