Orders

get trade history

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

get/trades/{from-date}/{to-date}/{page-number}

Request

  • Base URL
    https://api.dhan.co/v2
  • URL
    https://api.dhan.co/v2/trades/{from-date}/{to-date}/{page-number}
  • Auth
    none declared. Required headers: access-token

Path parameters

from-datestring required

date format : yyyy-MM-dd

to-datestring required

date format : yyyy-MM-dd

page-numberstring required

default value : 0

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
customSymbolstring

Custom trading symbol

securityIdstring

Exchange standard identification for each scrip

tradedQuantityinteger

Number of shares traded

tradedPricenumber float

Price at which trade executed

isinstring

Isin Number of that scrip

instrumentstring

Instrument of that scrip

sebiTaxnumber double

SEBI tax

sttnumber double

stt

brokerageChargesnumber double

Brokerage Charges

serviceTaxnumber double

Service tax

exchangeTransactionChargesnumber double

Exchange Transaction Charges

stampDutynumber double

Stamp duty paid on transfer of shares

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 operation across all 3 revisions of this API.