stock market

Understanding Zerodha’s place_order() Method in Python

Zerodha’s Kite Connect API stands out as one of the most powerful tools available to Indian traders.
It allows developers to place, modify, and monitor trades programmatically using simple Python code.

At the heart of this functionality lies a crucial method — place_order().
This method acts as the execution engine that places your buy or sell orders directly on the Zerodha trading platform.

In this blog, we’ll break down the purpose, parameters, and practical examples of the place_order() function so that you can start placing trades like a pro.

Purpose of place_order()

The place_order() method is used to place a new order (either BUY or SELL) in your Zerodha account via the Kite Connect API.

In simple terms, it sends your trading request — like buying Infosys shares or selling NIFTY futures — directly to the Zerodha servers.
You can use this function to place different types of orders including:

  • Market Orders
  • Limit Orders
  • Stop-Loss (SL / SL-M) Orders
  • Bracket Orders (BO)
  • Cover Orders (CO)
  • After Market Orders (AMO)
Function Definition

Description of Above code .

1. variety

Type of order variety. It specifies the kind of order you want to place.
Examples:
"regular" – Normal orders
"amo" – After Market Order
"bo" – Bracket Order
"co" – Cover Order

2.exchange

Exchange where the order is to be placed.
✅ Examples: "NSE", "BSE", "NFO", "MCX"

3.tradingsymbol

The trading symbol of the instrument.
✅ Example: "INFY", "RELIANCE", "NIFTY24OCTFUT"

4.transaction_type

Type of transaction you want to perform.
✅ Values:
"BUY"
"SELL"

5.quantity

Number of shares/lots you want to buy or sell.

6.product

Product type or margin category.
✅ Examples:
"CNC" – Cash and Carry (for delivery)
"MIS" – Intraday
"NRML" – Normal (for F&O)

7.order_type

Specifies how the order should be executed.
✅ Examples:
"MARKET" – Execute at current market price
"LIMIT" – Execute at a specific price
"SL" – Stop Loss (limit)
"SL-M" – Stop Loss (market)

8.price

Price at which you want to buy/sell (used only for LIMIT or SL orders).

9.validity

How long the order will remain valid.
✅ Examples:
"DAY" – Valid for the trading day
"IOC" – Immediate or Cancel

10.disclosed_quantity

Part of total quantity you want to show in market depth. (Useful for big orders.)

11.trigger_price :The trigger price for SL or SL-M orders.

12.squareoff : Used only for BO/CO orders — specifies target profit in absolute terms.

13. stoploss : Used for BO/CO — specifies stop loss in absolute terms.

14.trailing_stoploss : Used for Bracket Orders (BO) — sets the trailing stop loss difference.

15. tag : A custom tag to identify the order (for tracking from your app).

BL Tune 510BT, On Ear Wireless Headphones with Mic, up to 40 Hours Playtime
Amazon

Pure Bass, Quick Charging, Dual Pairing, Bluetooth 5.0


We earn a commission if you make a purchase, at no additional cost to you.

Example

Leave a Reply

Your email address will not be published. Required fields are marked *