0

This is my code and it does not seem to get what i want.It just presents the number of matches having match odds whereas i want the odds and price data

header = {'X-Application' : 'APP_KEY_HERE', 'X-Authentication':'SESSION_TOKEN' ,'content-type' : 'application/json' }


url="https://api.betfair.com/exchange/betting/json-rpc/v1"header = { 'X-Application' : 'APP_KEY_HERE', 'X-Authentication' : 'SESSION_TOKEN' ,'content-type' : 'application/json' }

jsonrpc_req='{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketTypes", "params": {"filter": {"textQuery":"Tennis"}}, "id": 1}'

response = requests.post(url, data=jsonrpc_req, headers=header)

print(json.loads(response.text))
ade desmond
  • 432
  • 1
  • 8
  • 24

1 Answers1

1

You're using the listMarketTypes endpoint. For prices, you need to call listMarketBook along with a PriceProjection, OrderProjection and MatchProjection:

https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/listMarketBook

Cosmittus
  • 637
  • 6
  • 19