PlaceExecutionReport error enums

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bascoe
    Member
    • Sep 2018
    • 42

    #1

    PlaceExecutionReport error enums

    Hi all,

    Ins response to a series of bets, I got an InstructionReports.ErrorCode number 10 then another error of 15. Looking at the list of error enums there are a good few, do I simply count down the list to find the relevant error? Is the list 0 based?

    Anywhere else I can find the meaning of the error?
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    Rather than describing what was returned, it'd be more useful if you could show us what was returned and perhaps some code too.

    Comment

    • Bascoe
      Member
      • Sep 2018
      • 42

      #3
      Well all I really want to know is what error message the error code is equal to.

      Here is the code that places the bets and traps the error

      BFBetRespQ = PlaceBFBets(strMIDQ, dtBFQuin)
      If BFBetRespQ.Status = ExecutionReportStatus.SUCCESS Then
      'bets placed
      Else
      Dim z As Integer = BFBetRespQ.InstructionReports.Count
      MsgBox("Quin Bets Failed " & BFBetRespQ.ErrorCode.ToString, MsgBoxStyle.Critical, "ToteBetter Advice")
      For z = 0 To BFBetRespQ.InstructionReports.Count - 1
      MsgBox(BFBetRespQ.InstructionReports(z).ErrorCode)
      Next

      Here is the error

      image.png
      I don't have access to the response - this is the message box display of the error from the client.

      So , my question is what error message relates to BFBetRespQ.InstructionReports(z).ErrorCode = 10

      Counting 10 down on the InstructionReportErrorCode​ list = INVALID_ODDS

      My issue is the price I am posting is the current back price, so I can't see how it can be "invalid"
      INVALID_BET_SIZE bet size is invalid for your currency or your regulator
      INVALID_RUNNER Runner does not exist, includes vacant traps in greyhound racing
      BET_TAKEN_OR_LAPSED Bet cannot be cancelled or modified as it has already been taken or has been cancelled/lapsed Includes attempts to cancel/modify market on close BSP bets and cancelling limit on close BSP bets. The error may be returned on placeOrders request if for example a bet is placed at the point when a market admin event takes place (i.e. market is turned in-play).

      The error will also be returned if a market version is submitted and a material change has taken place since the bet was submitted causing the bet to be rejected.
      BET_IN_PROGRESS No result was received from the matcher in a timeout configured for the system
      RUNNER_REMOVED Runner has been removed from the event
      MARKET_NOT_OPEN_FOR_BETTING Attempt to edit a bet on a market that has closed.
      LOSS_LIMIT_EXCEEDED The action has caused the account to exceed the self imposed loss limit
      MARKET_NOT_OPEN_FOR_BSP_BETTING Market now closed to bsp betting. Turned in-play or has been reconciled
      INVALID_PRICE_EDIT Attempt to edit down the price of a bsp limit on close lay bet, or edit up the price of a limit on close back bet
      INVALID_ODDS Odds not on price ladder - either edit or placement

      Comment

      • WTPooh
        Member
        • May 2012
        • 88

        #4
        There are no numeric values for ErrorCode. Here is an example of a response to a query with an error
        Code:
        {
        "jsonrpc": "2.0",
        "result":
            {
            "errorCode": "BET_ACTION_ERROR",
            "instructionReports":
                [
                    {
                    "errorCode": "INVALID_ODDS",
                    "instruction":
                        {
                        "limitOrder":
                            {
                            "persistenceType": "LAPSE",
                            "price": 12.1,
                            "size": 2.0
                            },
                        "orderType": "LIMIT",
                        "selectionId": 50201,
                        "side": "BACK"
                        },
                    "status": "FAILURE"
                    }
                ],
            "marketId": "1.209995594",
            "status": "FAILURE"
            }
        }​
        As you can see the cause of the error can be seen from the response. You have something wrong with the definition of the ErrorCode field.​

        Comment

        • Bascoe
          Member
          • Sep 2018
          • 42

          #5
          Thanks for that. However, when I ran a forced error through my program manually I find that the Error number is indeed returned together with the error message:
          INVALID_ODDS {10}. If I add ErrorCode.ToString then I only get the message not the error number

          Comment

          • WTPooh
            Member
            • May 2012
            • 88

            #6
            So the problem is the wrong odds. You can see the cause of the error in the field BFBetRespQ.InstructionReports(z).LimitOrder.Price

            Comment

            • Bascoe
              Member
              • Sep 2018
              • 42

              #7
              Yes. Now I am stumped because the odds I am posting in the instruction is the 2nd back price available (nulls excluded) so I can not see how they can be invalid. Note these bets are on the quinella and exacta markets

              Comment

              • jabe
                Senior Member
                • Dec 2014
                • 705

                #8
                Originally posted by Bascoe View Post
                Yes. Now I am stumped because the odds I am posting in the instruction is the 2nd back price available (nulls excluded) so I can not see how they can be invalid. Note these bets are on the quinella and exacta markets
                I'm reminded of something - you know the format of the id for markets, something of the form 1.5426347. If that value ends in a zero and you pass it as numeric, the final 0 just gets lost, so ideally you need to pass it as a string to keep the zero at the end. Is there any chance that kind of thing is happening somewhere?
                Last edited by jabe; 28-11-2023, 06:45 PM.

                Comment

                • Bascoe
                  Member
                  • Sep 2018
                  • 42

                  #9
                  Thanks Jabe - no I have the MID passed as a string. Here is the data I add to the Bet instructions

                  SelId is Long, Price is Double, Size is double

                  image.png

                  The strange thing is it only happens randomly about 5% of the time. No late scratching issue, bets made before markets are closed. I have put in more diagnostics trying to trap the issue.
                  I have also hit this error after the first error occurs
                  ERROR_IN_ORDER The action failed because the parent order failed

                  Comment

                  Working...
                  X