Not able to place limit order using python client.

confused_investor
kite.place_order(
variety=kite.VARIETY_REGULAR,
exchange=kite.EXCHANGE_NSE,
tradingsymbol='ONGC',
transaction_type=kite.TRANSACTION_TYPE_BUY,
quantity=1,
product=kite.PRODUCT_MIS,
order_type=kite.ORDER_TYPE_LIMIT,
price=126,
validity=kite.VALIDITY_DAY
)
where kite = KiteConnect(api_key)
This is the code I am using to place a LIMIT order but instead a MARKET order is getting placed. What is the issue here?
  • sujith
    Are you giving price below or above ltp?
  • sujith
    Can you give orderbook response here?
  • confused_investor
    > Are you giving price below or above ltp?
    Above ltp. ltp at that time was hovering around 125.4

    > Can you give orderbook response here?
    Where do I find it?
  • confused_investor
    I tried placing the order again and if the limit price is below ltp then the order is not getting executed automatically. Otherwise it is getting placed immediately (as a market order I guess?).
  • sujith
    That is how it is supposed to work. You can check out this article to know more about LIMIT order.
  • confused_investor
    Didn't know this. Thanks.
This discussion has been closed.