listEvent method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DroopyToon
    Junior Member
    • Feb 2009
    • 4

    #1

    listEvent method

    Hi,

    It seems that the listEvent is not returning the orderindex anymore so how do you build the market menu as it looks like on Betfair ?
    Besides, I don't get the same result (let's say when I set MarketID=7 as a MarketFilter) as with the old API.
    Any help would be appreciated.
    Thanks in advance.

    Droopy.
  • BigSprout
    Junior Member
    • Feb 2011
    • 60

    #2
    Hi DT ,

    reading your post I am assuming that when you write MarketID = 7, you are attempting to restrict the response to Horse racing, if this is the case then there are a few errors:

    to restrict the response to horse racing, eventTypeIds needs to be set to "7" and not marketIds

    The field names are also case sensitive, so use "eventTypeIds" and "marketIds" instead of "MarketID" (this was a trap I fell into also ).

    Another tip that I have picked up from other forum users is to add your Json request/response as it easily highlights the problem area(s)

    Hope this is of some help,
    cheers Les

    Comment

    • betdynamics
      Junior Member
      • Sep 2010
      • 534

      #3
      I think you are supposed to use the Navigation data for building market menus - see https://api.developer.betfair.com/se...pageId=4392234 for details.

      Comment

      • DroopyToon
        Junior Member
        • Feb 2009
        • 4

        #4
        Thank you for the replies.

        @ betdynamics, I cannot access the link you provided. I was asked for my credentials and, using the same credentials that allowed me to post on this forum, I couldn't access this page.

        @ BigSprout, you are right, I didn't have access to the code when I posted the question.
        I was using eventTypeIds.
        I sent the following json request:

        {"jsonrpc":"2.0","method":"SportsAPING/v1.0/listEvents","params":{"filter":{"eventTypeIds":["7"]}},"id":1}

        I got the following response:

        {"jsonrpc":"2.0","result":[{"event":{"id":"27232524","name":"MountP (US) 15th Jul","countryCode":"US","timezone":"US/Eastern","venue":"Mountaineer Park","openDate":"2014-07-15T23:00:00.000Z"},"marketCount":18},{"event":{"id ":"27232825","name":"Yarm (F/C) 15th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Yarmouth","openDate":"2014-07-15T16:50:00.000Z"},"marketCount":1},{"event":{"id" :"27217523","name":"Donc 13th Sep","countryCode":"GB","timezone":"Europe/London","openDate":"2014-09-13T13:00:00.000Z"},"marketCount":1},{"event":{"id" :"3453086","name":"Stewards Enquiry","countryCode":"GB","timezone":"Europe/London","openDate":"2014-01-01T00:00:00.000Z"},"marketCount":1},{"event":{"id" :"27232822","name":"Killar (AvB) 15th Jul","countryCode":"IE","timezone":"Europe/London","venue":"Killarney","openDate":"2014-07-15T17:00:00.000Z"},"marketCount":1},{"event":{"id" :"27229613","name":"Good 30th Jul","countryCode":"GB","timezone":"Europe/London","openDate":"2014-07-30T12:55:00.000Z"},"marketCount":1},{"event":{"id" :"27199033","name":"Kemp 26th Dec","countryCode":"GB","timezone":"Europe/London","openDate":"2014-12-26T15:10:00.000Z"},"marketCount":1},{"event":{"id" :"27232815","name":"Yarm (AvB) 15th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Yarmouth","openDate":"2014-07-15T16:50:00.000Z"},"marketCount":1},{"event":{"id" :"27164802","name":"Cheltenham 2015","countryCode":"GB","timezone":"Europe/London","openDate":"2015-01-01T12:00:00.000Z"},"marketCount":4},{"event":{"id" :"3453275","name":"Stewards Enquiry","countryCode":"IE","timezone":"Europe/London","openDate":"2013-10-10T11:02:00.000Z"},"marketCount":1},{"event":{"id" :"27088631","name":"Special Bets","countryCode":"GB","timezone":"Europe/London","openDate":"2013-12-27T14:56:00.000Z"},"marketCount":3},{"event":{"id" :"27232800","name":"Thirsk (Dist) 15th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Thirsk","openDate":"2014-07-15T17:10:00.000Z"},"marketCount":1},{"event":{"id" :"27232458","name":"Hayd 6th Sep","countryCode":"GB","timezone":"Europe/London","openDate":"2014-09-06T14:50:00.000Z"},"marketCount":1},{"event":{"id" :"27232529","name":"PrIsleD (US) 15th Jul","countryCode":"US","timezone":"US/Eastern","venue":"Presque Isle Downs","openDate":"2014-07-15T21:25:00.000Z"},"marketCount":16},{"event":{"id ":"27229833","name":"Good 2nd Aug","countryCode":"GB","timezone":"Europe/London","openDate":"2014-08-02T14:50:00.000Z"},"marketCount":1},{"event":{"id" :"27232861","name":"Ascot 2015","countryCode":"GB","timezone":"Europe/London","openDate":"2015-06-18T15:25:00.000Z"},"marketCount":1},{"event":{"id" :"27229817","name":"Good 1st Aug","countryCode":"GB","timezone":"Europe/London","openDate":"2014-08-01T14:05:00.000Z"},"marketCount":1},{"event":{"id" :"27232679","name":"Ling 16th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Lingfield","openDate":"2014-07-16T13:10:00.000Z"},"marketCount":16},{"event":{"id ":"27232678","name":"Catt 16th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Catterick","openDate":"2014-07-16T13:00:00.000Z"},"marketCount":14},{"event":{"id ":"27232794","name":"Curr 19th Jul","countryCode":"IE","timezone":"Europe/London","openDate":"2014-07-19T16:45:00.000Z"},"marketCount":1},{"event":{"id" :"27232797","name":"Thirsk (W/O) 15th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Thirsk","openDate":"2014-07-15T17:10:00.000Z"},"marketCount":1},{"event":{"id" :"27232796","name":"Thirsk (RFC) 15th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Thirsk","openDate":"2014-07-15T17:10:00.000Z"},"marketCount":2},{"event":{"id" :"27181594","name":"Aintree 2015","countryCode":"GB","timezone":"Europe/London","openDate":"2015-04-04T15:15:00.000Z"},"marketCount":1},{"event":{"id" :"27224726","name":"Ascot 26th Jul","countryCode":"GB","timezone":"Europe/London","openDate":"2014-07-26T14:15:00.000Z"},"marketCount":2},{"event":{"id" :"27232446","name":"Yarm 15th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Yarmouth","openDate":"2014-07-15T16:50:00.000Z"},"marketCount":2},{"event":{"id" :"27232447","name":"Killar 15th Jul","countryCode":"IE","timezone":"Europe/London","venue":"Killarney","openDate":"2014-07-15T17:00:00.000Z"},"marketCount":2},{"event":{"id" :"27232787","name":"Thirsk (AvB) 15th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Thirsk","openDate":"2014-07-15T17:10:00.000Z"},"marketCount":2},{"event":{"id" :"27079990","name":"Long 5th Oct","countryCode":"FR","timezone":"CET","openDate ":"2014-02-01T11:00:00.000Z"},"marketCount":2},{"event":{"id" :"27232445","name":"Thirsk 15th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Thirsk","openDate":"2014-07-15T17:10:00.000Z"},"marketCount":4},{"event":{"id" :"27232681","name":"Grey (RSA) 16th Jul","countryCode":"ZA","timezone":"Africa/Johannesburg","venue":"Greyville","openDate":"2014-07-16T09:25:00.000Z"},"marketCount":20},{"event":{"id ":"27232680","name":"Sand 16th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Sandown","openDate":"2014-07-16T17:00:00.000Z"},"marketCount":12},{"event":{"id ":"12713050","name":"Daily Win Dist Odds","countryCode":"GB","timezone":"Europe/London","openDate":"2014-07-14T17:00:00.000Z"},"marketCount":1},{"event":{"id" :"27232846","name":"Killar (F/C) 15th Jul","countryCode":"IE","timezone":"Europe/London","venue":"Killarney","openDate":"2014-07-15T17:00:00.000Z"},"marketCount":1},{"event":{"id" :"27232571","name":"Parx (US) 15th Jul","countryCode":"US","timezone":"US/Eastern","venue":"Parx Racing","openDate":"2014-07-15T16:25:00.000Z"},"marketCount":4},{"event":{"id" :"27232570","name":"FortE (US) 15th Jul","countryCode":"US","timezone":"US/Eastern","venue":"Fort Erie","openDate":"2014-07-15T20:15:00.000Z"},"marketCount":18},{"event":{"id ":"27225040","name":"Newmarket 2015","countryCode":"GB","timezone":"Europe/London","openDate":"2015-07-01T15:29:09.000Z"},"marketCount":2},{"event":{"id" :"27232769","name":"Uttox 16th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Uttoxeter","openDate":"2014-07-16T13:20:00.000Z"},"marketCount":14},{"event":{"id ":"27232770","name":"Killar 16th Jul","countryCode":"IE","timezone":"Europe/London","venue":"Killarney","openDate":"2014-07-16T16:40:00.000Z"},"marketCount":14},{"event":{"id ":"27232771","name":"Worc 16th Jul","countryCode":"GB","timezone":"Europe/London","venue":"Worcester","openDate":"2014-07-16T16:50:00.000Z"},"marketCount":14}],"id":1}

        I was expecting 8 events as with the previous API: "AUS", "Special Bets", "ANTEPOST", ...
        Besides, how do you order the display of these results ?

        Cheers.

        Comment

        • betdynamics
          Junior Member
          • Sep 2010
          • 534

          #5
          Ah, looks like the link got mangled when I posted it (it works!).

          Try this one - https://api.developer.betfair.com/se...pageId=4392234

          Comment

          • DroopyToon
            Junior Member
            • Feb 2009
            • 4

            #6
            Originally posted by betdynamics View Post
            Ah, looks like the link got mangled when I posted it (it works!).

            Try this one - https://api.developer.betfair.com/se...pageId=4392234
            OK thank you for the link.
            I saw it but didn't want to use it as I was first mainly interested in Horse events but I might still use it.

            I would still be interested in an answer to my post.

            Comment

            • betdynamics
              Junior Member
              • Sep 2010
              • 534

              #7
              I don't believe it is possible - that is why you have to use the Navigation data.

              Comment

              • DroopyToon
                Junior Member
                • Feb 2009
                • 4

                #8
                This is really poorly documented !
                What is the expected JSON result type ?
                I see some record with "exchangeId", some without.

                Comment

                Working...
                X