Hi guys,
I am having trouble getting an incomplete response from listmarketbook
I dont see the exchange information (availabletolay or availabletoback) info on each runner.
my function to retrieve the info is this (in powershell) :-
##########################
#Getting Runners and Prices
##########################
Function get-marketbook {
$method = "SportsAPING/v1.0/listMarketBook"
$postdata = [ordered]@{"jsonrpc" = "2.0";
"method" = $method
"params" = @{"marketIds" = @($marketID);"priceProjection" = @{"PriceData" = "EX_TRADED"}}
}
$postdata = $postdata | ConvertTo-Json -depth 5
$getmarketbook = invoke-webrequest -uri https://api-au.betfair.com/exchange/betting/json-rpc/v1 -Method Post -Headers @{"X-Application"="";"X-Authentication"=$sessiontoken} -ContentType "application/ json" -body $postdata
$getmarketbook | convertfrom-json
}
by doing $getmarketbook.result.runners I obtain this info for each of the runner :-
selectionId
handicap
status
adjustmentfactor
totalmatched
(shouldnt I be getting sp and ex info on each of the runner as well?)
thanks for your help,
I am having trouble getting an incomplete response from listmarketbook
I dont see the exchange information (availabletolay or availabletoback) info on each runner.
my function to retrieve the info is this (in powershell) :-
##########################
#Getting Runners and Prices
##########################
Function get-marketbook {
$method = "SportsAPING/v1.0/listMarketBook"
$postdata = [ordered]@{"jsonrpc" = "2.0";
"method" = $method
"params" = @{"marketIds" = @($marketID);"priceProjection" = @{"PriceData" = "EX_TRADED"}}
}
$postdata = $postdata | ConvertTo-Json -depth 5
$getmarketbook = invoke-webrequest -uri https://api-au.betfair.com/exchange/betting/json-rpc/v1 -Method Post -Headers @{"X-Application"="";"X-Authentication"=$sessiontoken} -ContentType "application/ json" -body $postdata
$getmarketbook | convertfrom-json
}
by doing $getmarketbook.result.runners I obtain this info for each of the runner :-
selectionId
handicap
status
adjustmentfactor
totalmatched
(shouldnt I be getting sp and ex info on each of the runner as well?)
thanks for your help,


, still cant figure it out though.
Comment