Hi, apologies for being a newbie.
My racing model is completely built on PQ and VB. I have trying to integrate the Betfair as the exchange of choice.
basically, this PQ code is failing as the response is that the error code is Json 32601 which is "method" is not available.
I don't understand why, because the method works fine in python.
PQ to Betfair API information is very very limited, so any any assistance is greatly appreciated. Thank in advance for any and all suggestions.
let
formdata = "{""jsonrpc"": ""2.0"", ""method"": ""SportsAPING/v1.0/listEvents"", ""params"": {""filter"": {""eventTypeIds"": [""7""],""marketCountries"": [""AU""],""marketTypeCode"": [""WIN""]}}, ""id"": 1}" ,
Source =
Json.Document(Web.Contents("https://api.betfair.com/exchange/account/json-rpc/v1", [Headers=[#"X-Application"="myAppKey", #"X-Authenticaion"="mySessionToken", #"Content-Type"="application/json"], Content=Text.ToBinary(formdata)])),
#"Converted to Table" = Record.ToTable(Source),
Value = #"Converted to Table"{1}[Value],
#"Converted to Table1" = Record.ToTable(Value)
in
#"Converted to Table1"
My racing model is completely built on PQ and VB. I have trying to integrate the Betfair as the exchange of choice.
basically, this PQ code is failing as the response is that the error code is Json 32601 which is "method" is not available.
I don't understand why, because the method works fine in python.
PQ to Betfair API information is very very limited, so any any assistance is greatly appreciated. Thank in advance for any and all suggestions.
let
formdata = "{""jsonrpc"": ""2.0"", ""method"": ""SportsAPING/v1.0/listEvents"", ""params"": {""filter"": {""eventTypeIds"": [""7""],""marketCountries"": [""AU""],""marketTypeCode"": [""WIN""]}}, ""id"": 1}" ,
Source =
Json.Document(Web.Contents("https://api.betfair.com/exchange/account/json-rpc/v1", [Headers=[#"X-Application"="myAppKey", #"X-Authenticaion"="mySessionToken", #"Content-Type"="application/json"], Content=Text.ToBinary(formdata)])),
#"Converted to Table" = Record.ToTable(Source),
Value = #"Converted to Table"{1}[Value],
#"Converted to Table1" = Record.ToTable(Value)
in
#"Converted to Table1"
Comment