incomplete response from server (json)

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 4 months, 1 week ago.

  • Author
    Posts
  • #47265
    Profile photo of Gurpratap Singh
    Gurpratap Singh
    Participant

    HI guys I am getting an incomplete response from a web server , this is the function I am using and it yeilds to 5 parameters from the server , there should be 11)

    ##########################
    #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_All_OFFERS"}}
    }

    $postdata = $postdata | ConvertTo-Json -depth 5
    $getmarketbook = invoke-webrequest -uri https://api.betfair.com/exchange/betting/json-rpc/v1 -Method Post -Headers @{"X-Application"="";"X-Authentication"=$sessiontoken} -ContentType "application/ json" -body $postdata
    $getmarketbook | convertfrom-json

    }

    the response I get from the server is :-
    slectionId
    handicap
    status
    adjustmentfactor
    lastpricetraded
    totalMatched

    but the complete response should have :-
    slectionId
    handicap
    status
    adjustmentfactor
    lastpricetraded
    totalMatched
    removeDate
    sp
    ex
    orders
    matches

  • #48267
    Profile photo of Don Jones
    Don Jones
    Keymaster

    There's unfortunately no good way to troubleshoot that from here ;). You'd have to contact whoever owns the server API, and ask them why you're not getting the response you expect. It could be a problem with the request you're sending, or it could be a problem on the server, but from here there's no way to tell.

You must be logged in to reply to this topic.