Navigation

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

    PlaceOrder API does not work for SBIN-EQ/BUY/MARKET/MARGIN/DAY

    C#/.Net SDK
    2
    2
    18
    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.
    • S
      skgkrish last edited by

      I get this error when I placeorder
      ------placeOrder call output-------------
      {"status":false,"message":"Internal Error","errorcode":"AB2001","data":null}

      The same inputs work on the trading portal(https://trade.angelbroking.com/)

      This is my code:
      //Place Order
      OrderInfo ord = new OrderInfo();
      ord.variety = Constants.VARIETY_NORMAL;
      ord.tradingsymbol = "SBIN-EQ";
      ord.symboltoken = "3045";
      ord.transactiontype = Constants.TRANSACTION_TYPE_BUY;
      ord.exchange = Constants.EXCHANGE_NSE;
      ord.ordertype = Constants.ORDER_TYPE_MARKET;
      ord.producttype = Constants.PRODUCT_TYPE_MARGIN;
      ord.duration = Constants.VALIDITY_DAY.ToString();
      //ord.price = "469";
      //ord.squareoff = "0";
      //ord.stoploss = "0";
      //ord.quantity = "1";
      //ord.triggerprice = "0"; //OPTIONAL PARAMETER
      //ord.triggerprice = "350"; //OPTIONAL PARAMETER

              obj = connect.placeOrder(ord);
              OrderResponse Ores = obj.PlaceOrderResponse;
      
      A 1 Reply Last reply Reply Quote 0
      • A
        admin @skgkrish last edited by

        Hi @skgkrish Please recheck the parameter and execute the order again.

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