Orders

get order by id

The api allows you to retrieve the details of an order placed during the day with their last updated status, with their order id.

get/orders/{order-id}

Path parameters

order-idstring required

Headers

access-tokenstring required

Response

Successful operation

dhanClientIdstring

User specific identification generated by Dhan

orderIdstring

Order specific identification generated by Dhan

exchangeOrderIdstring

Order specific identification generated by Exchange

correlationIdstring

The user/partner generated id for tracking back

orderStatus'TRANSIT' | 'PENDING' | 'REJECTED' | 'CANCELLED' | 'PART_TRADED' | 'TRADED' | 'EXPIRED'
Enum ValuesDescription
TRANSITDid not reach the exchange server
PENDINGReached at exchange end, awaiting execution
REJECTEDRejected at exchange/broker’s end
CANCELLEDCancelled by user
PART_TRADEDPartially Executed
TRADEDExecuted
EXPIREDValidity of order is expired
transactionType'BUY' | 'SELL'

Signifies the type of transaction whether it's BUY or SELL

exchangeSegment'NSE_EQ' | 'NSE_FNO' | 'BSE_EQ' | 'BSE_FNO' | 'MCX_COMM'
EnumsExchangeSegment
NSE_EQNSEEquity Cash
NSE_FNONSEFutures & Options
BSE_EQBSEEquity Cash
BSE_FNOBSEFutures & Options
MCX_COMMMCXCommodity
productType'CNC' | 'INTRADAY' | 'MARGIN' | 'MTF' | 'CO' | 'BO'
Enum ValuesDescription
CNCCash & Carry for equity deliveries
INTRADAYIntraday for Equity, Futures & Options
MARGINCarry Forward in Futures & Options
COCover Order; entry and stop loss
BOBracket Order; entry, stop loss & target price
MTFMargin Traded Fund
CO & BO product types will be valid only for Intraday
orderType'LIMIT' | 'MARKET' | 'STOP_LOSS' | 'STOP_LOSS_MARKET'
Enum ValuesDescription
LIMITFor Limit Order types
MARKETFor market Order types
STOP_LOSSFor Stop Loss Limit orders
STOP_LOSS_MARKETFor Stop Loss Market orders
validity'DAY' | 'IOC'
Enum ValuesDescription
DAYValid till end of day
IOCImmediate or Cancel
tradingSymbolstring

Exchange standard trading symbol

securityIdstring

Exchange standard identification for each scrip

quantityinteger

Number of shares for the order

disclosedQuantityinteger

Number shares visible in the market depth

pricenumber float

Price at which the order is requested to execute

triggerPricenumber float

Price at which the order is triggered

afterMarketOrderboolean

Flag to inform that the order placed is After Market Order

boProfitValuenumber float

Bracket order Target price

boStopLossValuenumber float

Bracket Order/Cover Order Stop Loss Price

legName'ENTRY_LEG' | 'STOP_LOSS_LEG' | 'TARGET_LEG' | 'NA'

Order leg where modification is to be done

createTimestring

Time at which the record is created

updateTimestring

Time at which the record is updated

exchangeTimestring

Time at which order reached at exchange end

drvExpiryDatestring

For F&O, expiry date of contract

drvOptionType'CALL' | 'PUT' | 'NA'

For Options, type CALL or PUT

drvStrikePricenumber float

For Options, Strike Price

omsErrorCodestring

When order is rejected or failed, omsErrorCode would be populated

omsErrorDescriptionstring

When order is rejected or failed, omsErrorDescription would be populated

algoIdstring

Algo_ID

remainingQuantityinteger

Number of shares yet to be traded for the order

averageTradedPricenumber float

Average price at which order is traded

filledQtyinteger

Filled Quantity

Changes

No recorded changes to this endpoint across all 1 revision of this API.