Betfair Developers


Python
A place to discuss Betfair API programming with the Python language

Post Reply
pagodas pagodas is offline
Junior Member
 
Exclamation 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 LiamP is offline
Senior Member
 
Default

Quote:
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
LiamP LiamP is offline
Senior Member
 
Default

Also if you are using python:

https://forum.bdp.betfair.com/showthread.php?t=3373
pagodas pagodas is offline
Junior Member
 
Default

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!
Post Reply

Tags
listmarketbook, prices, python

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump