listCurrentOrders json help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daveg33
    Junior Member
    • Sep 2013
    • 6

    #1

    listCurrentOrders json help

    Hi,

    was wondering if someone could help me out with an annoying problem i have with json request for listCurrentOrders.

    My current request :

    Code:
    jsonReq = "{""jsonrpc"": ""2.0"", ""method"": ""SportsAPING/v1.0/listCurrentOrders"", ""params"":{""betStatus"":""SETTLED"",""settledDateRange"":{},""includeItemDescription"":""false""}, ""id"": 1}"
    gives me the error response :

    Code:
    {"jsonrpc":"2.0","error":{"code":-32601,"message":"DSC-0021"},"id":1}
    Anyone able to assist please?
    Last edited by daveg33; 23-05-2014, 12:19 AM.
  • bnl
    Junior Member
    • Nov 2012
    • 108

    #2
    I don't know why you have "" everywhere, but the word false
    in includeItemDescription tag
    should not be surrounded by "

    changing all "" to " you get
    Code:
    {
    	"jsonrpc": "2.0",
    	"method": "SportsAPING/v1.0/listCurrentOrders",
    	"params": {
    		"betStatus": "SETTLED",
    		"settledDateRange": {
    			
    		},
    		"includeItemDescription": "false"
    	},
    	"id": 1
    }
    but should be
    Code:
    {
    	"jsonrpc": "2.0",
    	"method": "SportsAPING/v1.0/listCurrentOrders",
    	"params": {
    		"betStatus": "SETTLED",
    		"settledDateRange": {
    			
    		},
    		"includeItemDescription": false
    	},
    	"id": 1
    }

    And I doubt that you should include an empty settledDateRange.
    Leave it out ?

    /Björn

    Comment

    • daveg33
      Junior Member
      • Sep 2013
      • 6

      #3
      thanks for the reply. This is a code from vb.net program hence the "" instead of ". The declaration is filling a string variable so using " would give many, many errors.

      I appreciate your input though and can see what you were saying were i taking a different approach.

      Comment

      • betdynamics
        Junior Member
        • Sep 2010
        • 534

        #4
        Remove the surrounding quotes from the false parameter - it should not be quoted as it is not a string.

        [I think that is what bnl was trying to say]

        Comment

        • daveg33
          Junior Member
          • Sep 2013
          • 6

          #5
          This code

          Code:
          "{""jsonrpc"": ""2.0"", ""method"": ""SportsAPING/v1.0/listCurrentOrders"", ""params"":{""betStatus"":""SETTLED"",""includeItemDescription"":false}, ""id"": 1}"
          gives me this response :

          Code:
          {"jsonrpc":"2.0","error":{"code":-32601,"message":"DSC-0021"},"id":1}

          Comment

          • daveg33
            Junior Member
            • Sep 2013
            • 6

            #6
            It's cool guys thanks for your help but I think this may be an error that can not be resolved. I have managed to create a work around - using GetAvailableBalance which isn't ideal but still kind of does the job. Take care!

            Comment

            • betdynamics
              Junior Member
              • Sep 2010
              • 534

              #7
              It looks like you are calling the wrong routine. You should be calling listClearedOrders (not listCurrentOrders).

              The parameters you are using are for the listClearedOrders call.

              Comment

              Working...
              X