Announcement

Collapse
No announcement yet.

Tennis Odds

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tennis Odds

    I’ve been able to use the listmarketcatalogue API to get data about Tennis events but I can’t figure out how to get the odds for a tennis event. Does anyone have an example?

    Call to get events
    "{""filter"":{""eventTypeIds"":[""" & EventTypeId & """],""marketTypeCodes"":[""MATCH_ODDS""]},""inPlayOnly"":[""YES""],""marketStartTime"":{""from"":""" & dateNow & """},""sort"":""FIRST_TO_START"",""maxResults"":"" 30"",""marketProjection"":[""COMPETITION"",""EVENT""]}"
    Last edited by DailyDouble.; 25-08-2015, 09:29 PM.

  • #2
    Originally posted by DailyDouble. View Post
    Iíve been able to use the listmarketcatalogue API to get data about Tennis events but I canít figure out how to get the odds for a tennis event. Does anyone have an example?

    Call to get events
    "{""filter"":{""eventTypeIds"":[""" & EventTypeId & """],""marketTypeCodes"":[""MATCH_ODDS""]},""inPlayOnly"":[""YES""],""marketStartTime"":{""from"":""" & dateNow & """},""sort"":""FIRST_TO_START"",""maxResults"":"" 30"",""marketProjection"":[""COMPETITION"",""EVENT""]}"
    Take the list of marketIds you get in your market catalogue call and make a looped call to the market book for each market id.

    Code:
    {"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketBook", "params": {"marketIds":' +market_ids+ ',\
        "priceProjection":{"priceData":' + price_data + ',"virtualise":"true"}}, "id": 1}'

    Be careful though, with the size of your marketId list (especially if you want more information than merely the best back and lay prices) as you can quickly reach the limits betfair impose on the size of the respective response.

    Comment


    • #3
      Thanks Nick

      Comment

      Working...
      X