Trade Profit And Loss

Get profit and loss meta data on trades

This API gives the data of the realised Profit and Loss report requested by a user

get/v2/trade/profit-loss/metadata

Request

  • Base URL: https://api-v2.upstox.com
  • URL: https://api-v2.upstox.com/v2/trade/profit-loss/metadata
  • 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

from_datestring

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

to_datestring

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

segmentstring required

Segment for which data is requested can be from the following options EQ - Equity, FO - Futures and Options, COM - Commodity, CD - Currency Derivatives

financial_yearstring required

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

Response

Successful

status'success' | 'error' | 'partial_success'

Example response

{
  "data": {
    "trades_count": 10,
    "page_size_limit": 5000
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.