Order History
This API allows you to fetch your past orders for a date range, defaulting to the current financial year.
USE CASE
Look up past orders by symbol, segment, exchange or status, such as every rejected order in a quarter.
Details
- Fetches all historical orders within the specified date range. If no range is specified, the system automatically 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. statusfilters only on Executed (1), Cancelled (2) or Rejected (3), with 0 for all. There is no filter for pending orders, so use Get Orders for open orders.- In this report
segment_typeis 0 all, 1 equity, 2 equity derivatives, 3 currency derivatives and 4 commodity derivatives. It has no mutual fund option, unlike the other reports. - 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 |
|
status | string |
|
Response Attributes - For each order
| Attribute | Data Type | Description |
|---|---|---|
symbol | string | Eg: NSE:SBIN-EQ |
clientId | string | The client id of the fyers user |
id_fyers | string | Fyers system-generated unique identifier for the order |
exchOrdId | string | The order number provided by the exchange |
exchange | int |
|
segment | int |
|
instrument | int |
|
description | string | The description of the symbol |
trade_date_time | int | The epoch time when the trade occurred |
transaction_type | string | The type of transaction (BUY/SELL) |
trade_date | string | The time when the trade occurred in “DD-MM-YYYY hh:mm:ss” format in IST |
product_type | string |
|
status | string | The status of the trade (E.g., Executed, Rejected, etc.) |
ordertype | string | The order type (E.g., Market, Limit, etc.) |
qty | int | The quantity of the trade |
tradedQty | int | The total traded qty |
traded_price | float | The traded price |
limit_price | float | The limit price set for the order |
ord_source | string | The source from which the order was placed |
rejection_reason | string | The reason for rejection if the order was rejected |
is_symbol_active | boolean | Indicates if the symbol is currently active for trading |
Last updated on