Buy happens at current market price for limit order

Limit value does not taken into account when I place Limit order.
On execution, it always buy at market rate.
Though I have given price as 73.0, it had purchased at market price. See the screenshot.

Below is my code:
public static void placeOrder (KiteConnect kiteConnect) throws KiteException, IOException {

OrderParams orderParams = new OrderParams();
orderParams.quantity = 1;
orderParams.orderType = Constants.ORDER_TYPE_LIMIT;
orderParams.tradingsymbol = "TATAPOWER";

orderParams.product = Constants.PRODUCT_MIS; = "NSE";
orderParams.transactionType = Constants.TRANSACTION_TYPE_BUY;
orderParams.validity = Constants.VALIDITY_DAY;

//orderParams.triggerPrice = 0.0;
orderParams.tag = "myTag"; //tag is optional and it cannot be more than 8 characters and only alphanumeric is allowed

Order order = kiteConnect.placeOrder(orderParams, Constants.VARIETY_REGULAR);

  • jkoracle23

    See the above file
  • rishiswethan
    Placing a high price in limit buy order is very similar to market order. You'll get the best price at that time. If you had looked at the market depth section at that time. The best-unfilled offer price by a seller was 71.80, but, you were willing to buy it for a price much higher than that. On the other hand, if you had placed an order with limit of 70, it would wait until someone is willing to sell it for 70rs or less
  • jkoracle23
    Thanks . That was my mistake.
This discussion has been closed.