I am currently exploring Dhan as a potential tech platform and considering migrating from my current brokers.
However, before making any decisions, I have a few queries that I would appreciate clarification on. While I understand that much of this information is available in the documentation, I believe it’s prudent to confirm these details before committing any investments and potentially incurring losses.
Could you please confirm if it’s possible to place a bracket order at market price in option trading?
Additionally, could someone provide a response body containing all the required parameters? I noticed that while the price field is mandatory, I’m curious as to why it’s necessary to include this attribute when the order type is Market.
I understand the importance of these details in making informed decisions, and any clarification provided would be greatly appreciated.
Thank you for your assistance.
I appreciate your assistance in addressing my previous queries. Before finalizing my approach, I seek confirmation on a few specific aspects related to option trading parameters related to “BO at Market Price”
BO Response Body At Market Price (API)
{
"dhanClientId":"xxxxxxxx",
"correlationId":"xxxxxxx",
"transactionType":"BUY",
"exchangeSegment":"NSE_FNO",
"productType":"INTRADAY",
"orderType":"MARKET",
"validity":"DAY",
"securityId":"11536",
"price": 0, --> For Market Order Type price should be kept 0
"quantity":"30", --> Means I will be buying 2 lots
"boProfitValue":"30", --> Order placed at 200 - profit will be booked at 230
"boStopLossValue": "100" --> Order placed at 200 - loss will be booked at 100
}
Please verify this API response body is right or wrong for placing “BO at Market Price” , I have created this response based on my understanding and taking reference from @Sammy reply and other threads.
I aim to ensure precise execution in my trading strategies, hence your insights on these points would be immensely valuable.
Hi @aditya3 ,
Your code seems to be ok but here are few things to be kept in check
Quantity → When you say quantity 30 , and then i assume that you are talking a scrip where 1 lot size 15 Qty i.e. 2x15 = 30 Qty for 2 lots.
Rest of it seems to be OK.
However, Please make sure while using BO , you can use it in Only Futures and Equity. For options trade it is not available. Also make sure that, you have enough liquidity while working with BO to avoid any unnecessary liquidity issue.
For more details , Please refer to do’s and Don’t Here:
Quick question as I am also on the similar journey of exploring the API to place bracket orders for options. How do you figure out the security Id? for example: Nifty Next week expiry strike 22500 call
a quick question, although slightly varying at this point, I was wondering if I were to place a basket of orders together for Options, is that possible, given the context to the margin constraints? Like spreads, strangles or straddles or baskets with multiple legs?
We do not have basket orders directly available on APIs, however, if you do place orders as per strategy, then you will get the hedge benefit (similar to baskets on Dhan).
For any strategy, always ensure buy orders are placed before and then sell orders. This is for the reason that sell margin is higher and can be hedged against long position.
Not right now but will check if this is something which should be offered via APIs, as basket orders are essentially just collection of orders on API layer.
Hey @mnikhil currently still exploring, currently I am stuck with dhanClientId where I can find it, was also not able to find any info on how to fetch it, as this property is mandate as per the BO API response.
@Hardik can you guide me here, I know its small stuff but you can answer quickly then others.