cancelOrders returns success and error-code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • austrianChristian
    Junior Member
    • Feb 2011
    • 9

    #1

    cancelOrders returns success and error-code

    Hi,

    I tried to delete all bets on the account with not setting any parameters. I used the classes provided by the example source code and added what was needed to cancel bets.

    Calling: SportsAPING/v1.0/cancelOrders
    With args: {"marketId":null,"instructions":null,"customerRef" :null}

    Got Response: {"jsonrpc":"2.0","result":{"status":"SUCCESS","err orCode":"ERROR_IN_MATCHER","instructionReports":[]},"id":1}

    The bets got deleted as I wished but why I get the ERROR_IN_MATCHER error code, which means "The matcher is not healthy", if this is an allowed action.
  • austrianChristian
    Junior Member
    • Feb 2011
    • 9

    #2
    If I delete the quotes for a specific market, the quotes on that market will be deleted, but again I get the same error code plus in the InstructionReport I get success too and again an error-code "INVALID_BET_SIZE".

    Calling: SportsAPING/v1.0/cancelOrders
    With args: {"marketId":"1.110812726","instructions":null,"cus tomerRef":null}

    Got Response: {"jsonrpc":"2.0","result":{"status":"SUCCESS","err orCode":"ERROR_IN_MATCHER","marketId":"1.110812726 ","instructionReports":[{"status":"SUCCESS","errorCode":"INVALID_BET_SIZE" ,"instruction":{"betId":"29694812996"},"sizeCancel led":500.0},{"status":"SUCCESS","errorCode":"INVAL ID_BET_SIZE","instruction":{"betId":"29694812993"} ,"sizeCancelled":300.0}]},"id":1}

    Comment

    • WillanJ
      Junior Member
      • Aug 2014
      • 4

      #3
      Has this issue been addressed anywhere?

      I am also seeing what the user above reported. Bets get cancelled ok with status "SUCCESS" but errorCode "ERROR_IN_MATCHER" and on individual instructions status "SUCCESS" and errorCode "INVALID_BET_SIZE" (and cancelledDate returning as 01/01/0001 00:00:00).

      It doesn't hugely concern me as everything seems to be working ok, but just wondering if those errorcodes are indicative of me doing something slightly wrong and just getting away with it.

      Comment

      • Merlin
        Junior Member
        • Jan 2009
        • 56

        #4
        This is a feature, not a bug :-) As long as the status says 'SUCCESS', there's no need to check the error code. I would guess 'ERROR_IN_MATCHER' is the default error; if there WAS no error, it would be a waste of time for betfair to change this to something like 'OK' as it would slow the call down and provide no further information. So check the status first; only if this has a value other than 'SUCCESS' do you need to check 'errorString' (and your code will be slightly faster)

        Merlin

        Comment

        Working...
        X