Skip to main content

Get Profit Loss Report

Header Parameters

NameRequiredTypeDescription
AuthorizationtruestringRequires the format Bearer access_token where access_token is obtained from the Token API.
AccepttruestringDefines the content format the client expects, which should be set to application/json.

Query Parameters

NameRequiredTypeDescription
from_datefalsestringDate from which data needs to be fetched. from_date and to_date should fall under the same financial year as mentioned in financial_year attribute. Date in dd-mm-yyyy format
to_datefalsestringDate till which data needs to be fetched. from_date and to_date should fall under the same financial year as mentioned in financial_year attribute. Date in dd-mm-yyyy format
segmenttruestringSegment for which data is requested can be from the following options EQ - Equity, FO - Futures and Options, COM - Commodity, CD - Currency Derivatives
financial_yeartruestringFinancial year for which data has been requested. Concatenation of last 2 digits of from year and to year Sample:for 2021-2022, financial_year will be 2122. For the regex pattern applicable to this field, see the Field Pattern Appendix.
page_numbertrueinteger (int32)Page Number, the pages are starting from 1
page_sizetrueinteger (int32)Page size for pagination. The maximum page size value is obtained from P and L report metadata API.
Responses

Response Body

{
"status": "success",
"data": [
{
"quantity": 100,
"isin": "INE256A01028",
"scrip_name": "ZEE ENTER",
"trade_type": "EQ",
"buy_date": "14-09-2021",
"buy_average": 12345.67,
"sell_date": "14-09-2021",
"sell_average": 12345.67,
"buy_amount": 12345.67,
"sell_amount": 12345.67
}
],
"metadata": {
"page": {
"page_number": 1,
"page_size": 2
}
}
}
NameTypeDescription
statusstringA string indicating the outcome of the request. Typically success for successful operations.
dataobject[]Response data for trade wise data details
data[].quantityfloatThe quantity of stock traded
data[].isinstringISIN of the stock
data[].scrip_namestringName of the scrip traded
data[].trade_typestringFUT - Futures OPT - Options EQ - Equity
data[].buy_datestringThe date on which the stock was bought
data[].buy_averagefloatThe average rate at which each quantity of the stock was bought
data[].sell_datestringThe date on which the stock was sold
data[].sell_averagefloatThe average rate at which each quantity of the stock was sold
data[].buy_amountfloatTotal buy amount
data[].sell_amountfloatTotal sell amount
metadataobjectMeta data for trade wise data details
metadata.pageobjectMeta data for page.
metadata.page.page_numberint32pageNumber for pagination
metadata.page.page_sizeint32Page size

Examples

A comprehensive set of examples is provided to illustrate various use cases and implementation scenarios for this API. To view detailed examples and access sample code, please refer to: API Examples.

Loading...