DSC-0018 when invoking listMarketData

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • guy13495960
    Junior Member
    • Sep 2020
    • 6

    #1

    DSC-0018 when invoking listMarketData

    I'm writing a golang wrapper to the json-rpc api, and have successfully implemented all listXXXX functions upto listMarketCatalogue, however with listMarketBook I am getting an error DSC-0018 (missing required parameter).

    I can run listMarketBook in the Sports Visualizer with no problems, but when I take the Json-RPC body shown in the browser developer tools, and curl it, with my app key and session token, I get the DSC-0018. (missing required parameter)

    curl -vv -H 'Content-Type: application/json' -H 'X-Application: appKey' -H 'X-Authentication: sessionToken' -H 'Accept: application/json' -d @payload.json https://api.betfair.com/exchange/betting/json-rpc/v1

    where payload.json is
    {"jsonrpc":"2.0","method":"SportsAPING/v1.0/listMarketBook","params":{"marketIds":["1.172246897"],"priceProjection":{"priceData":["EX_BEST_OFFERS"]},"orderProjection":"EXECUTABLE","matchProjection" :"ROLLED_UP_BY_AVG_SIZE","locale":"en"},"id":1}

    This returns a 200/OK but a response body of
    [{"jsonrpc":"2.0","error":{"code":-32602,"message":"DSC-0018"},"id":1}]

    from the API documentation, I read the only required parameter was 'marketIds', so I am at loss as to what the problem is.
    Any help would be appreciated.

    Thanks
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    This is the problem:
    "matchProjection" :"ROLLED_UP_BY_AVG_SIZE"

    It should be
    "ROLLED_UP_BY_AVG_PRICE"

    To remind you, price = the odds, size = the money.

    Comment

    • guy13495960
      Junior Member
      • Sep 2020
      • 6

      #3
      Thanks, I appreciate the quick response

      Comment

      Working...
      X