Skip to Content

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_date and to_date as YYYY-MM-DD. Without them the report runs from the start of the current financial year to today.
  • Results are paged: page_size defaults to 100 and page_no to 1. Increase page_no to read further pages.
  • Each row is one trade. orderNumber is the order it belongs to, tradeNumber and exchangeOrderNo come from the exchange, and side is 1 for buy and -1 for sell.
  • segment_type is 0 all, 1 equity, 2 equity derivatives, 3 mutual funds, 4 currency derivatives and 5 commodity derivatives. exchange_type is 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

AttributeData TypeDescription
symbolstringEg: NSE:SBIN-EQ
page_sizestringThe number of records to be fetched in one page (default is 100)
page_nostringThe page number to fetch (default is 1)
from_datestringThe start date for fetching orders in “YYYY-MM-DD” format (default is the start of the current financial year)
to_datestringThe end date for fetching orders in “YYYY-MM-DD” format (default is the current date)
segment_typestring
  • 0 → Includes all Segments [default]
  • 1 → Includes only Equity
  • 2 → Includes only Equity Derivatives
  • 3 → Includes Mutal Funds
  • 4 → Includes only Currency Derivatives
  • 5 → Includes only Commodity Derivatives
exchange_typestring
  • 0 → Includes all Exchanges [default]
  • 1 → Includes only NSE
  • 2 → Includes only BSE
  • 3 → Includes only MCX

Response Attributes - For each trade

AttributeData TypeDescription
symbolstringEg: NSE:SBIN-EQ
clientIdstringThe client id of the fyers user
descriptionstringThe symbol name to display
exchangeint
orderDateTimeintThe epoch time when the trade occurred
orderNumberstringThe order id for which the trade occurred
tradeNumberstringThe trade number generated by the exchange
exchangeOrderNostringThe order number provided by the exchange
side string
product_typestring
traded_qtyintThe quantity of the trade
trade_pricefloatThe traded price
segmentint
trade_valuefloatThe total traded value
is_symbol_activebooleanThis will show if the symbol is tradable or not
Last updated on