Hi @Zee2Zahid
for order-placement see below examples
# To place any order for the Tradingsymbol
# Order types:
# - MARKET: to place a Market order
# - LIMIT: to place a Limit order
# - STOPLIMIT: to place a stoploss limit order
# - STOPMARKET: to place a stoploss market order
# Trade types:
# - MIS: to place a intraday order
# - NRML: to place a positional order
tsl.order_placement(Tradingsymbol: str, Exchange: str,quantity: int, price: int, trigger_price: int, order_type: str, transaction_type: str, trade_type: str)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 0.05, trigger_price =0, order_type = 'LIMIT', transaction_type ='BUY', trade_type ='MIS')
orderid1 = tsl.order_placement('NIFTY 21 NOV 23450 PUT','NFO',25, 0.05, 0, 'LIMIT', 'BUY', 'MIS')
print(orderid1)
orderid = tsl.order_placement('NIFTY 21 NOV 23450 PUT','NFO',25, 0, 0, 'MARKET', 'BUY', 'MIS')
orderid = tsl.order_placement('NIFTY 21 NOV 23450 PUT','NFO', 25, 107, 0, 'LIMIT', 'BUY', 'MIS')
orderid = tsl.order_placement('NIFTY 21 NOV 23450 PUT','NFO', 25, 110, 120, 'STOPLIMIT', 'BUY', 'MIS')
orderid = tsl.order_placement('NIFTY 21 NOV 23450 PUT','NFO', 25, 0, 110, 'STOPMARKET', 'BUY', 'MIS')
# Assume wants to Buy NIFTY 21 NOV 23450 PUT and the LTP of this script is = 109 and place a stoploss order as well as target order
# To Buy this script at Market price and particular Limit price as of follow
# - Trade Type also will be two, based on Intraday or Carryforward
# MIS - MARKET (Intraday Market Price placement order)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 0, trigger_price =0, order_type = 'MARKET', transaction_type ='BUY', trade_type ='MIS')
# Here price and trigger_price is 0 because of market order
# NRML - MARKET (Carryforward Market Price placement order)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 0, trigger_price =0, order_type = 'MARKET', transaction_type ='BUY', trade_type ='NRML')
# Here price and trigger_price is 0 because of market order
# MIS - LIMIT (Intraday particular Limit Price placement order)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 107, trigger_price =0, order_type = 'LIMIT', transaction_type ='BUY', trade_type ='MIS')
# Here price is 107 and trigger_price is 0 because of LIMIT Order, Wants to Buy at 107 price
# NRML - LIMIT (Carryforward particular Limit placement order)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 107, trigger_price =0, order_type = 'LIMIT', transaction_type ='BUY', trade_type ='NRML')
# Here price is 107 and trigger_price is 0 because of LIMIT Order, Wants to Buy at 107 price
# Assume bought the NIFTY 21 NOV 23450 PUT at 110 and now wants to place stoploss and target orders
# MIS - STOPLOSS MARKET (Intraday Stoploss MARKET Order for selling the script)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 0, trigger_price =109, order_type = 'STOPMARKET', transaction_type ='SELL', trade_type ='MIS')
# Here price is 0 because of stoploss market order, want to sell at 109 or below prcie level reached
# NRML - STOPLOSS MARKET (Carryforward Stoploss MARKET Order for selling the script)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 0, trigger_price =109, order_type = 'STOPMARKET', transaction_type ='SELL', trade_type ='MIS')
# Here price is 0 because of stoploss market order, want to sell at 109 or below prcie level reached
# MIS - STOPLOSS LIMIT (Intraday Stoploss Limit Order for selling the script)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 104, trigger_price =109, order_type = 'STOPLIMIT', transaction_type ='SELL', trade_type ='MIS')
# Here, the limit price is 104 and the trigger price is 109. The order will be triggered when the market reaches 109, but the sell will only execute if it can get filled at 104 or better.
# NRML - STOPLOSS LIMIT (Carryforward Stoploss Limit Order for selling the script)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 104, trigger_price =109, order_type = 'STOPLIMIT', transaction_type ='SELL', trade_type ='MIS')
# Here, the limit price is 104 and the trigger price is 109. The order will be triggered when the market reaches 109, but the sell will only execute if it can get filled at 104 or better.
Target orders are not any specific order types, place the order type opposite of entry using limit oe market orders.
# Assume Current LTP of NIFTY 21 NOV 23450 PUT is 120, wants to exit or sell this position at market price
# MIS - MARKET (Intraday Market Price placement order)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 0, trigger_price =0, order_type = 'MARKET', transaction_type ='SELL', trade_type ='MIS')
# Here price and trigger_price is 0 because of market order
# NRML - MARKET (Carryforward Market Price placement order)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 0, trigger_price =0, order_type = 'MARKET', transaction_type ='SELL', trade_type ='NRML')
# Here price and trigger_price is 0 because of market order
# Assume Current LTP of NIFTY 21 NOV 23450 PUT is 110, wants to exit or sell this position at 115 prcie LIMIT order once the LTP price reached 115
# Target orders are typically placed as limit orders for exiting at a profitable price.
# MIS - LIMIT (Intraday particular Limit Price placement order)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 115, trigger_price =0, order_type = 'LIMIT', transaction_type ='SELL', trade_type ='MIS')
# Here price is 115 and trigger_price is 0 because of LIMIT Order, Wants to SELL at 115 price
# NRML - LIMIT (Carryforward particular Limit placement order)
orderid = tsl.order_placement(tradingsymbol = 'NIFTY 21 NOV 23450 PUT',exchange ='NFO',quantity = 25, price = 115, trigger_price =0, order_type = 'LIMIT', transaction_type ='SELL', trade_type ='NRML')
# Here price is 115 and trigger_price is 0 because of LIMIT Order, Wants to SELL at 115 price
# After placing an order, the system returns an `orderid` for tracking the order. Users can monitor the status and modify or cancel it if necessary.