Orders

get trade by order id

The api allows user to retrieve trade details using an order id. Often during partial trades or Bracket/ Cover Orders, traders get confused in reading trade from tradebook. The response of this API will include all the trades generated for a particular order id.

get/trades/{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

exchangeTradeIdstring

Trade specific identification, generated by exchange once order is executed

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
tradingSymbolstring

Exchange standard trading symbol

customSymbolstring

Custom trading symbol

securityIdstring

Exchange standard identification for each scrip

tradedQuantityinteger

Number of shares traded

tradedPricenumber float

Price at which trade executed

createTimestring

Record create date time

updateTimestring

Record update date time

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

Changes

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