Exchange Query for match odds only on premiere league games

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HardyIT
    Junior Member
    • Nov 2014
    • 2

    #1

    Exchange Query for match odds only on premiere league games

    Dear bet fair api pros,

    I am trying to return a market book based on passing in 20 market ids. in the visualiser this returns 20 results.

    when i query programmaticly through the api it only returns 19 results for some reason.

    Here is my query string:

    "{""jsonrpc"":""2.0"",""id"":1,""method"":""Sports APING/v1.0/listMarketBook"",""params"":{""marketIds"":[" & marketIDs & "], ""priceProjection"": {""priceData"": [""EX_BEST_OFFERS""]}}}"


    marketIds is a string of 20 market ids separated by a comma.

    Any idea why it is only returning 19 result through this request when it is returning 20 like it should through the visualiser?


    this is really annoying, any help would be greatly appreciated,

    Kindest regards,

    james hardy
  • betdynamics
    Junior Member
    • Sep 2010
    • 534

    #2
    Make sure that each of your marketIds is wrapped in quotes.

    If you don't do this, then any markets that end in zero are not correctly returned.

    Comment

    • HardyIT
      Junior Member
      • Nov 2014
      • 2

      #3
      Thankyou very much you are a legend and thanks also for the fast response

      Comment

      • JayBee
        Junior Member
        • Oct 2010
        • 114

        #4
        Also, use the Visualiser and use it in Chrome with the Javascript console on. You can then put in the exact combinations of requests into the Visualiser and see exactly the JSON string that is sent in the console.

        When your JSON request looks like the Visualiser request then you can't go wrong.

        Comment

        Working...
        X