Trade History
This API allows you to fetch your executed trades for a date range, defaulting to the current financial year.
USE CASE
Pull past trades with trade number, price and quantity to reconcile against your own records.
Details
- Fetches all trades for a specified date range. If no date range is provided, it defaults to the current financial year.
- Send
from_dateandto_dateasYYYY-MM-DD. Without them the report runs from the start of the current financial year to today. - Results are paged:
page_sizedefaults to 100 andpage_noto 1. Increasepage_noto read further pages. - Each row is one trade.
orderNumberis the order it belongs to,tradeNumberandexchangeOrderNocome from the exchange, andsideis 1 for buy and -1 for sell. segment_typeis 0 all, 1 equity, 2 equity derivatives, 3 mutual funds, 4 currency derivatives and 5 commodity derivatives.exchange_typeis 0 all, 1 NSE, 2 BSE and 3 MCX.- Rate limits differ between the Standard and Prime plans. See Plans & rate limits.
Request Attributes - For each order
| Attribute | Data Type | Description |
|---|---|---|
symbol | string | Eg: NSE:SBIN-EQ |
page_size | string | The number of records to be fetched in one page (default is 100) |
page_no | string | The page number to fetch (default is 1) |
from_date | string | The start date for fetching orders in “YYYY-MM-DD” format (default is the start of the current financial year) |
to_date | string | The end date for fetching orders in “YYYY-MM-DD” format (default is the current date) |
segment_type | string |
|
exchange_type | string |
|
Response Attributes - For each trade
| Attribute | Data Type | Description |
|---|---|---|
symbol | string | Eg: NSE:SBIN-EQ |
clientId | string | The client id of the fyers user |
description | string | The symbol name to display |
exchange | int |
|
orderDateTime | int | The epoch time when the trade occurred |
orderNumber | string | The order id for which the trade occurred |
tradeNumber | string | The trade number generated by the exchange |
exchangeOrderNo | string | The order number provided by the exchange |
side | string |
|
product_type | string |
|
traded_qty | int | The quantity of the trade |
trade_price | float | The traded price |
segment | int |
|
trade_value | float | The total traded value |
is_symbol_active | boolean | This will show if the symbol is tradable or not |
Last updated on