Get profit and loss on trades
This API gives the charges incurred by users for their trades
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
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
Response
Successful
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.