Get Trade-wise Profit and Loss Report Data
This API gives the data of the realised Profit and Loss report requested by a user
Request
- Base URL: https://api-v2.upstox.com
- URL: https://api-v2.upstox.com/v2/trade/profit-loss/data
- Auth: OAuth 2 (authorization code, authorization URL https://api-v2.upstox.com/v2/login/authorization/dialog, token URL https://api-v2.upstox.com/v2/login/authorization/token)
Query parameters
Date 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
Date 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
Segment for which data is requested can be from the following options EQ - Equity, FO - Futures and Options, COM - Commodity, CD - Currency Derivatives
Financial 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
Page Number, the pages are starting from 1
Page size for pagination. The maximum page size value is obtained from P and L report metadata API.
Response
Successful
Example response
{
"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
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.