Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    AB2001 error when placing SELL order

    General Discussion
    2
    6
    65
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      asksameer last edited by

      Hello Sir @admin
      I am getting the below error when placing SELL Order.
      Programming Language : C# / Dotnet

      Error : AB2001

      I am using below code:
      OrderInfo ord = new OrderInfo();
      ord.variety = "NORMAL";
      ord.symboltoken = "154";
      ord.tradingsymbol = "APCOTEXIND-EQ";
      ord.transactiontype = "SELL";
      ord.exchange = Constants.EXCHANGE_NSE;
      ord.price = "0";
      ord.ordertype = "MARKET";
      ord.producttype = "DELIVERY";
      ord.duration = "DAY";
      ord.quantity = "1";
      obj = connect.placeOrder(ord);
      OrderResponse Ores = obj.PlaceOrderResponse;

      Please advise.

      A 1 Reply Last reply Reply Quote 0
      • A
        asksameer @asksameer last edited by

        @admin Can you please provide any update on this ?

        A 1 Reply Last reply Reply Quote 0
        • A
          admin @asksameer last edited by admin

          Hi @asksameer Kinldy find the request and response of robo order orders are getting placed can you try now and update us.
          req:
          {
          "variety":"ROBO",
          "tradingsymbol":"SBIN-EQ",
          "symboltoken":"3045",
          "transactiontype":"BUY",
          "exchange":"NSE",
          "ordertype":"LIMIT",
          "producttype":"BO",
          "duration":"DAY",
          "price":"421",
          "squareoff":"12",
          "stoploss":"6",
          "quantity":"1"
          Response:
          {
          "status": true,
          "message": "SUCCESS",
          "errorcode": "",
          "data": {
          "script": "SBIN-EQ",
          "orderid": "210623000000015"
          }
          }

          A 1 Reply Last reply Reply Quote 0
          • A
            asksameer @admin last edited by

            @admin
            BUY order works. But sell order doesn't work. I am getting AB2001 error.

            A 1 Reply Last reply Reply Quote 0
            • A
              admin @asksameer last edited by

              Hi @asksameer Are you still facing the issue we didnt faced any issue
              req :
              {
              "variety":"NORMAL",
              "tradingsymbol":"SBIN-EQ",
              "symboltoken":"3045",
              "transactiontype":"SELL",
              "exchange":"NSE",
              "ordertype":"MARKET",
              "producttype":"INTRADAY",
              "duration":"DAY",
              "price":"421",
              "squareoff":"0",
              "stoploss":"0",
              "quantity":"1"
              }

              response:
              {
              "status": true,
              "message": "SUCCESS",
              "errorcode": "",
              "data": {
              "script": "SBIN-EQ",
              "orderid": "210623000000318"
              }
              }

              A 1 Reply Last reply Reply Quote 0
              • A
                asksameer @admin last edited by

                @admin
                It's working now. I was missing below attributes.
                squareoff":"0",
                "stoploss":"0"

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post