No announcement yet.

Error calling data from listMarketCatalogue in API

  • Filter
  • Time
  • Show
Clear All
new posts

  • Error calling data from listMarketCatalogue in API

    Has anyone else had issues calling from listMarketCatalogue?

    I have tried both JSON REST and JSON-PCR using the coding samples on the API documentation.

    code used is below:

    endpoint = ""

    # header = { 'X-Application' : 'used my app key', 'X-Authentication' : 'used my session token' ,'content-type' : 'application/json' }

    # json_req='{"filter":{"eventIds": ["30373429"]}}'

    # url = endpoint + "listMarketCatalogue/"


    header = { 'X-Application' : 'used my app key', 'X-Authentication' : 'used my session token' ,'content-type' : 'application/json' }

    jsonrpc_req='{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params": {"filter":{"eventIds": ["30373429"]}}, "maxResults": "200", "marketProjection": ["COMPETITION","EVENT","EVENT_TYPE"], "id": 1}'

    response =, data=jsonrpc_req, headers=header)

    Neither of the above worked. Error messages are as follows:

    1) {"faultcode": "Client", "faultstring": "DSC-0018", "detail": {}}

    2) {
    "jsonrpc": "2.0",
    "error": {
    "code": -32700,
    "message": "DSC-0008"

    I cant see what my issue is, it works when changing to event types or event IDs, the event ID is currently valid. Anyone else have this problem?

  • #2

    if you look at this example from the manual (Sorry about the formatting, the forum, wont let me paste formatted text)

    "jsonrpc": "2.0",
    "method": "SportsAPING/v1.0/listMarketCatalogue",
    "params": {
    "filter": {
    "eventIds": [
    "maxResults": "200",
    "marketProjection": [
    "id": 1
    you will see that after the eventId number there is only one curly brace before the next data, "maxResults" etc.

    If you compare that to your example, you will see that you have 2 curly braces at that position ?

    Your json string is perfectly valid, but your nesting of the elements doesnt match the example in the docs. I dont know for sure but there is a fair chance that is what is confusing it.

    Try changing the nesting and see if it fixes it ?

    Regards Geoff


    • #3
      GeoffW is right - specifically, everything EXCEPT
      "id": 1
      should be part of params.

      jsonrpc_req='{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params": {"filter":{"eventIds": ["30373429"]}}, "maxResults": "200", "marketProjection": ["COMPETITION","EVENT","EVENT_TYPE"], "id": 1}'

      should be

      jsonrpc_req='{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listMarketCatalogue", "params": {"filter":{"eventIds": ["30373429"]}, "maxResults": "200", "marketProjection": ["COMPETITION","EVENT","EVENT_TYPE"]}, "id": 1}'

      The second curly bracket after the eventids should be after the marketProjection list.


      • #4
        thanks for the replies, the above worked. sorry forgot to reply at the time.