listClearedOrders error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • captainsurf
    Junior Member
    • Dec 2014
    • 6

    #1

    listClearedOrders error

    Hi guys,

    I'm in the process of converting to api-ng, I can't see the problem with this call to receive settled bets in a date range, can anyone help?


    Curl postData: [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listClearedOrders", "params" :{"filter":{"eventTypeIds":["7"], "betStatus":["SETTLED"], "settledDateRange":{ "from": "2014-07-01T00:00:00.000Z", "to": "2014-08-01T00:00:00.000Z" }}, "includeItemDescription":"true", "orderBy": "BY_SETTLED_TIME", "sortDir": "EARLIEST_TO_LATEST", "fromRecord":"0", "recordCount":"100"}, "id": 1}]

    Call to api-ng failed:
    Response: [{"jsonrpc":"2.0","error":{"code":-32602,"message":"DSC-0018"},"id":1}]

    many thanks
  • betdynamics
    Junior Member
    • Sep 2010
    • 534

    #2
    Is there a field called "filter" in the listClearedOrders call?

    Also, fromRecord and recordCount are integers, so they don't need quote marks round their values.

    Comment

    • captainsurf
      Junior Member
      • Dec 2014
      • 6

      #3
      Still getting the same error using :

      [{ "jsonrpc": "2.0", "method": "SportsAPING/v1.0/listClearedOrders", "params" :{"betStatus":["SETTLED"], "eventTypeIds":["7"], "settledDateRange":{ "from": "2014-07-01T00:00:00.000Z", "to": "2014-08-01T00:00:00.000Z" }, "includeItemDescription":true, "fromRecord":0, "recordCount":100}, "id": 1}]

      Comment

      • betdynamics
        Junior Member
        • Sep 2010
        • 534

        #4
        I think the true (for includeItemDescription) should be quoted.

        This is a working JSON string that I have just copied from the visualiser:

        [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listClearedOrders", "params": {"betStatus":"SETTLED","eventTypeIds":["7"],"settledDateRange":{"from":"2014-12-04T00:00:00Z","to":"2014-12-04T23:45:00Z"},"includeItemDescription":"true","fr omRecord":"0","recordCount":"100"}, "id": 1}]

        Comment

        • captainsurf
          Junior Member
          • Dec 2014
          • 6

          #5
          Hey, many thanks for your help. I just ran a similar request through the visualiser & got this result:

          Request data:
          [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listClearedOrders", "params": {"betStatus":"SETTLED","settledDateRange":{"from": "2014-05-31T23:00:00Z","to":"2014-06-01T23:00:00Z"}}, "id": 1}]

          Response truncated to 4,000 chars:
          [{"jsonrpc":"2.0","result":{"clearedOrders":[],"moreAvailable":false},"id":1}]

          It does seem to be working but returning no data? I definitely have settled bets on those days, am I missing something ?

          thanks

          Comment

          • betdynamics
            Junior Member
            • Sep 2010
            • 534

            #6
            Looks like it only returns data for the last 90 days.

            There doesn't appear to be any data for dates prior to 5th September.

            Comment

            Working...
            X