Hi, I am into Options trading, and I have achieved placing orders through API and I am clueless on how to place the target order or SL order for the executed order.
I too have the same question. Once "Options Call Buy" is successfully executed, I want to exit as soon as my target is reached. So what is the API to exit from the position?
I couldn't find the answer anywhere, even there is no documentation available.
@Anbalagan use 'if' condition to set your target condition. like
if "your target condition":
kite.place_order(params)
Or if your target is fixed , place limit order for target as soon as your trade is executed.
@Imran, Please read the question before providing answers and suggestions. Don't post anything just for namesake. I have gone through all the API documentation and its corresponding python implementations.
@Sujit, What I need is just a sample code snippet for Options Call Buy and how to sell the same.
I just want to understand how to differentiate between below through API: 1. exiting "Call Buy Option". 2. "Call Sell Option"
@Anbalagan, Kite Connect only exposes place order API. Kite Connect doesn't differentiate between entry, exit order, target or stoploss order. It has to be tagged or maintained at your end.
This has to be well documented by kite. This simple work took me a lot of hours to crack. @Anbalagan you can send the orderId to the target order method and execute it.
I couldn't find the answer anywhere, even there is no documentation available.
if "your target condition":
kite.place_order(params)
Or if your target is fixed , place limit order for target as soon as your trade is executed.
This is the function i used to exit the position.
see this link .. https://kite.trade/docs/pykiteconnect/v3/#kiteconnect.KiteConnect.place_order
use this to make a order with opposite transaction type.
@Sujit,
What I need is just a sample code snippet for Options Call Buy and how to sell the same.
I just want to understand how to differentiate between below through API:
1. exiting "Call Buy Option".
2. "Call Sell Option"
Kite Connect only exposes place order API. Kite Connect doesn't differentiate between entry, exit order, target or stoploss order. It has to be tagged or maintained at your end.
orderParams.orderType = Constants.ORDER_TYPE_MARKET;
kiteConnect.modifyOrder(orderId, orderParams, Constants.VARIETY_REGULAR);