Forever Order
place forever order
The order request api allows you place a new forever order.
post/forever/orders
Headers
access-tokenstring required
Request body
dhanClientIdstring
User specific identification generated by Dhan
correlationIdstring
The user/partner generated id for tracking back
orderFlag'SINGLE' | 'OCO'
| Enum Values | Description |
|---|---|
| SINGLE | For GTT Order types |
| OCO | For OCO Order types |
transactionType'BUY' | 'SELL' required
Signifies the type of transaction whether it's BUY or SELL
exchangeSegment'NSE_EQ' | 'NSE_FNO' | 'BSE_EQ' | 'BSE_FNO'
| Enums | Exchange | Segment |
|---|---|---|
| NSE_EQ | NSE | Equity Cash |
| NSE_FNO | NSE | Futures & Options |
| BSE_EQ | BSE | Equity Cash |
| BSE_FNO | BSE | Futures & Options |
productType'CNC' | 'MTF' | 'MARGIN'
| Enum Values | Description |
|---|---|
| CNC | Cash & Carry for equity deliveries |
| MTF | Margin Traded Fund |
| MARGIN | Carry Forward in Futures & Options |
orderType'LIMIT' | 'MARKET'
| Enum Values | Description |
|---|---|
| LIMIT | For Limit Order types |
| MARKET | For market Order types |
validitystring
Valid for 1Year/Expiry
securityIdstring
Exchange standard identification for each scrip
quantityinteger
Number of shares for the order
disclosedQuantityinteger
Number of shares visible (Keep more than 30% of quantity)
pricenumber float
Price at which order is placed
triggerPricenumber float
Price at which the order is triggered
price1number float
Target price for OCO order
triggerPrice1number float
Target trigger price For OCO order
quantity1integer
Target Quantity for OCO order
Response
Successful operation
orderIdstring
Order specific identification generated by Dhan
orderStatus'PENDING' | 'REJECTED' | 'CANCELLED' | 'EXPIRED'
| Enum Values | Description |
|---|---|
| PENDING | Reached at exchange end, awaiting execution |
| REJECTED | Rejected at exchange/broker’s end |
| CANCELLED | Cancelled by user |
| EXPIRED | Validity of order is expired |