I am getting ErrorCode in response of placeOrders.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zebuksys.
    Junior Member
    • Oct 2013
    • 7

    #1

    I am getting ErrorCode in response of placeOrders.

    Hello,

    I have a c# application and try to post a bet using my account. Below are the samples of my posted request and getting response. I am little confused after see the response with ErrorCode and success status with BetId.

    1) Can I check this placed bet ? How I can get my bet is really placed or not ?
    2) Why this ErrorCode is add with response ? Is there any wrong parameter added with request ?


    Request:
    placeOrders(marketId, lstPlaceInstr, customerRef);

    placeOrders ={
    marketId = "1.112356717"

    lstPlaceInstr[0] = {OrderType=LIMIT : SelectionId=938615:
    Handicap=0 : Side=LAY : LimitOrder=Size=10.68 : Price=2.34 :
    PersistenceType=MARKET_ON_CLOSE}

    customerRef = "98268"}

    Respond:

    {PlaceExecutionReport : Status=SUCCESS : ErrorCode=ERROR_IN_MATCHER : MarketId=1.112356717 : CustomerRef=98268 : InstructionReport[0]={Status=SUCCESS : ErrorCode=INVALID_BET_SIZE : Instruction={OrderType=LIMIT : SelectionId=938615 : Handicap=0 : Side=LAY : LimitOrder=Size=10.68 : Price=2.34 : PersistenceType=MARKET_ON_CLOSE} : BetId=33019549225 : PlacedDate=04-01-2014 05:20:55 AM : AveragePriceMatched=0 : SizeMatched=0}}


    Please share your knowledge with me.
  • jptrader
    Junior Member
    • Nov 2009
    • 82

    #2
    Are you basing your application on Betfair's example c# code? If you check the JSON returned from the API request you will probably notice that these error messages are not present. However, the enums used to represent error codes in the C# objects does not have an "OK" value. So when parsing the JSON, these enums get their default values, which are the values you describe here.

    Comment

    • zebuksys.
      Junior Member
      • Oct 2013
      • 7

      #3
      Thanks for your reply.

      Re: Are you basing your application on Betfair's example c# code?

      yes

      I am also getting bet is not properly placed after getting the error enums values with response.

      How I can get what I am doing wrong ? What I am missing or place wrong in Request of placeOrders ?

      Comment

      • jptrader
        Junior Member
        • Nov 2009
        • 82

        #4
        Did you check the actual JSON returned from the API (and not the C# objects)?

        Comment

        • betdynamics
          Junior Member
          • Sep 2010
          • 534

          #5
          I have seen this error - and having trapped the data, in all cases it was because the size of the bet was incorrect in the JSON data.

          For example,

          I wanted a size of 2.61, but the size in the JSON data was actually 2.61112345 (or something equivalent).

          I have been through my code (C#) adding Math.Round statements to all the size/price output statements, so we will see if the problem happens again.

          Comment

          Working...
          X