Trade Profit And Loss

Get profit and loss on trades

This API gives the charges incurred by users for their trades

get/v2/trade/profit-loss/charges

Request

  • Base URL: https://api-v2.upstox.com
  • URL: https://api-v2.upstox.com/v2/trade/profit-loss/charges
  • 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": {
    "charges_breakdown": {
      "total": 123.1,
      "brokerage": 432.1
    }
  }
}

Changes

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