Cannot retrieve prices using listMarketBook

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pagodas
    Junior Member
    • Dec 2014
    • 2

    #1

    Cannot retrieve prices using listMarketBook

    Hi all,

    I am trying to retrieve prices for a soccer match using listMarketBook and I have spent 10 hours trying to understand what I am doing wrong without any luck. When I construct the parameters for the requests I am using:

    json_req = '{"marketIds" : ["' + str(marketId) + '"], "PriceProjection" : {"PriceData" : ["EX_BEST_OFFERS"], "virtualise" : ["true"]}}'

    which passes the below:

    {"marketIds" : ["1.131528078"], "PriceProjection" : {"PriceData" : ["EX_BEST_OFFERS"], "virtualise" : ["true"]}}

    but what is returned back does not include any prices.
    Any ideas?
  • LiamP
    Junior Member
    • Oct 2015
    • 284

    #2
    Originally posted by pagodas View Post
    Hi all,

    I am trying to retrieve prices for a soccer match using listMarketBook and I have spent 10 hours trying to understand what I am doing wrong without any luck. When I construct the parameters for the requests I am using:

    json_req = '{"marketIds" : ["' + str(marketId) + '"], "PriceProjection" : {"PriceData" : ["EX_BEST_OFFERS"], "virtualise" : ["true"]}}'

    which passes the below:

    {"marketIds" : ["1.131528078"], "PriceProjection" : {"PriceData" : ["EX_BEST_OFFERS"], "virtualise" : ["true"]}}

    but what is returned back does not include any prices.
    Any ideas?
    Fairly sure the API is case sensitive (camelCase), priceProjection, priceData etc.

    Use the visualizer and open up developer tools, you can see the requests/responses saved me chucking my laptop out the window a few times

    Comment

    • LiamP
      Junior Member
      • Oct 2015
      • 284

      #3
      Also if you are using python:

      https://forum.bdp.betfair.com/showthread.php?t=3373

      Comment

      • pagodas
        Junior Member
        • Dec 2014
        • 2

        #4
        I didn't think of opening the developer tools (this is what happens when the brain is burnt...).

        camelCase was one of the problems. the other one that "virtualise" : "true" without brackets...

        thanks a lot for the help!

        Comment

        Working...
        X