CancelOrders - unable to cancel specific bets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brickwall3031
    Junior Member
    • Apr 2021
    • 14

    #1

    CancelOrders - unable to cancel specific bets

    I am unable to call the api successfully when i use "list cancelOrders"

    json_string = '{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/cancelOrders", "params": {"instructions":[{"betId": "254091203271", "marketId": "1.192475132"}, {"betId": "254091205743", "marketId": "1.192475132"}]}, "id": 1}'

    results:
    'error': {'code': -32099, 'message': 'ANGX-0002', 'data': {'APINGException': {'requestUUID': 'ie2-ang06a-prd-12130928-0011b133e5', 'errorCode': 'INVALID_INPUT_DATA', 'errorDetails': 'One or more inputs to the operation were invalid'}, 'exceptionname': 'APINGException'}}

    parameters are valid. I don't seem to be missing any going by the error. Can anyone advise?

    Interestingly leaving the instructions section blank cancels them all but I want to have the ability to specify.

    successful string : {"jsonrpc": "2.0", "method": "SportsAPING/v1.0/cancelOrders", "params":{"instructions":[]}, "id": 1}

    Thanks
  • WTPooh
    Member
    • May 2012
    • 88

    #2
    There is no "marketId" field in the CancelInstruction.

    json_string = '{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/cancelOrders", "params": {"marketId": "1.192475132", "instructions":[{"betId": "254091203271"}, {"betId": "254091205743"}]}, "id": 1}'
    Last edited by WTPooh; 20-12-2021, 04:14 PM.

    Comment

    • brickwall3031
      Junior Member
      • Apr 2021
      • 14

      #3
      Thanks a lot, that worked.

      Comment

      Working...
      X