---
title: "get trade history"
method: GET
path: "/trades/{from-date}/{to-date}/{page-number}"
tags: ["Orders"]
---

# get trade history

`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`

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.

## Path parameters

- `from-date` string, required: date format : yyyy-MM-dd
- `to-date` string, required: date format : yyyy-MM-dd
- `page-number` string, required: default value : 0

## Headers

- `access-token` string, required

## Response `200`

Successful operation

- TradeHistoryResponseModel[]
  - `dhanClientId` string: User specific identification generated by Dhan
  - `orderId` string: Order specific identification generated by Dhan
  - `exchangeOrderId` string: Order specific identification generated by Exchange
  - `exchangeTradeId` string: 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': | **Enums** | **Exchange** | **Segment** | |--------------|--------------|-------------------| | NSE_EQ | NSE | Equity Cash | | NSE_FNO | NSE | Futures & Options | | BSE_EQ | BSE | Equity Cash | | BSE_FNO | BSE | Futures & Options | | MCX_COMM | MCX | Commodity |
  - `productType` 'CNC' | 'INTRADAY' | 'MARGIN' | 'MTF' | 'CO' | 'BO': | **Enum Values** | **Description** | |-----------------|------------------------------------------------| | CNC | Cash & Carry for equity deliveries | | INTRADAY | Intraday for Equity, Futures & Options | | MARGIN | Carry Forward in Futures & Options | | CO | Cover Order; entry and stop loss | | BO | Bracket Order; entry, stop loss & target price | | MTF | Margin Traded Fund | **CO & BO product types will be valid only for Intraday**
  - `orderType` 'LIMIT' | 'MARKET' | 'STOP_LOSS' | 'STOP_LOSS_MARKET': | **Enum Values** | **Description** | |------------------|-----------------------------| | LIMIT | For Limit Order types | | MARKET | For market Order types | | STOP_LOSS | For Stop Loss Limit orders | | STOP_LOSS_MARKET | For Stop Loss Market orders |
  - `customSymbol` string: Custom trading symbol
  - `securityId` string: Exchange standard identification for each scrip
  - `tradedQuantity` integer: Number of shares traded
  - `tradedPrice` number, float: Price at which trade executed
  - `isin` string: Isin Number of that scrip
  - `instrument` string: Instrument of that scrip
  - `sebiTax` number, double: SEBI tax
  - `stt` number, double: stt
  - `brokerageCharges` number, double: Brokerage Charges
  - `serviceTax` number, double: Service tax
  - `exchangeTransactionCharges` number, double: Exchange Transaction Charges
  - `stampDuty` number, double: Stamp duty paid on transfer of shares
  - `createTime` string: Record create date time
  - `updateTime` string: Record update date time
  - `exchangeTime` string: Time at which order reached at exchange end
  - `drvExpiryDate` string: For F&O, expiry date of contract
  - `drvOptionType` 'CALL' | 'PUT' | 'NA': For Options, type CALL or PUT
  - `drvStrikePrice` number, float: For Options, Strike Price

---

[API](https://skmtc.dev/dhan/apis/dhanhq-api.md) - [All operations](https://skmtc.dev/dhan/apis/dhanhq-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dhan/apis/dhanhq-api/revisions/6fc71cee4d09?raw)
