Getting list of Horse Racing Races

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • letsmakesomemoney
    Junior Member
    • Jun 2016
    • 1

    #1

    Getting list of Horse Racing Races

    I am looking to get a list of all horse races on today and tomorrow from the API. I am only interested in certain markets -> win/place. I am not interested in forecast/tricast AvB etc.

    Currently, I am getting a list of meetings

    Code:
    listMeetingsRequests = '{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listEvents", "params": {"filter":{"eventTypeIds":["7"],"marketCountries":["GB","IE"]}}, "id": 1}'
    and then using that to get the list of races

    Code:
    listRacesRequest = '{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params": {"filter":{"eventIds":["' + meetingId + '"],"marketCountries":["GB","IE"]}, "marketStartTime":{"from":"' + today + '"}, "marketStartTime":{"to":"' + tomorrow + '"}, "maxResults":"100", "marketProjection":["EVENT","RUNNER_DESCRIPTION","MARKET_START_TIME"]}, "id": 1}'

    However this includes lots of stuff I don't want/need such as

    u'event': {u'name': u'Leic (F/C) 11th Jun', u'countryCode': u'GB', u'venue': u'Leicester', u'timezone': u'Europe/London', u'openDate': u'2016-06-11T17:10:00.000Z', u'id': u'27825805'}, u'runners': [{u'handicap': 0.0, u'runnerName': u'3 - 6', u'selectionId': 407758, u'sortPriority': 1}, {u'handicap': 0.0, u'runnerName': u'3 - 8', u'selectionId': 3045273, u'sortPriority': 2}, {u'handicap': 0.0, u'runnerName': u'6 - 3', u'selectionId': 407759, u'sortPriority': 3}, {u'handicap': 0.0, u'runnerName': u'6 - 8', u'selectionId': 338148, u'sortPriority': 4}, {u'handicap': 0.0, u'runnerName': u'8 - 3', u'selectionId': 3045279, u'sortPriority': 5}, {u'handicap': 0.0, u'runnerName': u'8 - 6', u'selectionId': 3045282, u'sortPriority': 6}]}, {u'marketStartTime': u'2016-06-11T19:40:00.000Z', u'marketId': u'1.125224962', u'totalMatched': 0.0, u'marketName': u'Forecast', u'event': {u'name': u'Leic (F/C) 11th Jun', u'countryCode': u'GB', u'venue': u'Leicester', u'timezone': u'Europe/London', u'openDate': u'2016-06-11T17:10:00.000Z', u'id': u'27825805'}, u'runners': [{u'handicap': 0.0, u'runnerName': u'3 - 4', u'selectionId': 59186, u'sortPriority': 1}, {u'handicap': 0.0, u'runnerName': u'3 - 5', u'selectionId': 392182, u'sortPriority': 2}, {u'handicap': 0.0, u'runnerName': u'3 - 7', u'selectionId': 787979, u'sortPriority': 3}, {u'handicap': 0.0, u'runnerName': u'4 - 3', u'selectionId': 392183, u'sortPriority': 4}, {u'handicap': 0.0, u'runnerName': u'4 - 5', u'selectionId': 392184, u'sortPriority': 5}, {u'handicap': 0.0, u'runnerName': u'4 - 7', u'selectionId': 787980, u'sortPriority': 6}, {u'handicap': 0.0, u'runnerName': u'5 - 3', u'selectionId': 392188, u'sortPriority': 7}, {u'handicap': 0.0, u'runnerName': u'5 - 4', u'selectionId': 392189, u'sortPriority': 8}, {u'handicap': 0.0, u'runnerName': u'5 - 7', u'selectionId': 59244, u'sortPriority': 9}, {u'handicap': 0.0, u'runnerName': u'7 - 3', u'selectionId': 787975, u'sortPriority': 10}, {u'handicap': 0.0, u'runnerName': u'7 - 4', u'selectionId': 787976, u'sortPriority': 11}, {u'handicap': 0.0, u'runnerName': u'7 - 5', u'selectionId': 787977, u'sortPriority': 12}]}], u'id': 1}

    Is it possible to only get win/place markets?
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    Add something like this:

    "marketTypeCodes":["WIN","PLACE"],

    Comment

    Working...
    X