> ## Documentation Index
> Fetch the complete documentation index at: https://quickoinfosoftprivatelimited.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Domestic Securities Tradewise P&L

> Tradewise P&L helps calculate profit and loss on a trade-level basis

## Overview

The Domestic Securities Tradewise P\&L API provides profit and loss calculations on a trade-level basis for completed transactions. This is critical for Quicko to:

* Calculate realized capital gains and losses
* Segregate transactions by holding period (long-term vs short-term)
* Generate accurate P\&L statements for tax compliance
* Provide trade-by-trade cost basis and expense tracking
* Track specific cost identification for matched buy-sell pairs

## Query Parameters

Your API should accept `from` and `to` query parameters to retrieve P\&L data for a specific date range.

```
GET /securities/domestic/tradewise-pnl?from=YYYY-MM-DD&to=YYYY-MM-DD
```

## Response Format

Your API should return matched trade pairs with complete P\&L calculations organized by security type:

## Headers of Tradewise P\&L API

### Equity Trade

The headers are explained below:

| Param | Type | Required | Description |
| - | - | - | - |
| isin | string | No | ISIN is the international security identification number |
| symbol | string | Yes | Symbol or description of equity share |
| quantity | number | Yes | Trading quantity |
| buy\_date | number | Yes | Date of purchase |
| buy\_average | number | Yes | Average buy price across all trades |
| sell\_date | number | Yes | Date of Sell |
| sell\_average | number | Yes | Average sell price across all trades |
| fmv | number | No | High stock price on 31/01/2018 |
| brokerage | number | No | Brokerage expense |
| clearing\_charges | number | No | Charges charged by clearing house |
| exchange\_transaction\_charges | number | No | Transaction charges by exchange |
| sebi\_turnover\_fees | number | No | Turnover fees by SEBI |
| stt | number | No | Security Transaction Tax |
| stamp\_duty | number | No | Stamp duty paid on transfer of shares |
| sgst | number | No | State GST |
| cgst | number | No | Central GST |
| igst | number | No | Integrated GST |
| interest | number | No | Interest paid on margins eg Margin Trading Facility |
| depository\_charges | number | No | Depository charges paid on delivery of shares |
| other\_transfer\_expenses | number | No | Any other expense relating to the transfer of shares |
| corporate\_action | string | No | Corporate Action. Possible values: BUY\_BACK, DIVIDEND |

### Mutual Fund Trade

The headers are explained below:

| Param | Type | Required | Description |
| - | - | - | - |
| isin | string | No | ISIN is the international security identification number |
| scheme\_type | string | Yes | Scheme type, possible valuesEquity, Debt, Other |
| symbol | string | Yes | Symbol or description of equity share |
| quantity | number | Yes | Trading quantity |
| buy\_date | number | Yes | Date of purchase |
| buy\_average | number | Yes | Average buy price across all trades |
| sell\_date | number | Yes | Date of Sell |
| sell\_average | number | Yes | Average sell price across all trades |
| fmv | number | No | High stock price on 31/01/2018 |
| brokerage | number | No | Brokerage expense |
| clearing\_charges | number | No | Charges charged by clearing house |
| exchange\_transaction\_charges | number | No | Transaction charges by exchange |
| sebi\_turnover\_fees | number | No | Turnover fees by SEBI |
| stt | number | No | Security Transaction Tax |
| stamp\_duty | number | No | Stamp duty paid on transfer of shares |
| sgst | number | No | State GST |
| cgst | number | No | Central GST |
| igst | number | No | Integrated GST |
| other\_transfer\_expenses | number | No | Any other expense relating to the transfer of shares |
| corporate\_action | string | No | Corporate Action. Possible values: BUY\_BACK, DIVIDEND |

### Futures and Options Trade

The headers are explained below:

| Param | Type | Required | Description |
| - | - | - | - |
| symbol | string | Yes | Symbol or description of equity share |
| type | string | Yes | Type, possible valuesFutures, Options |
| quantity | number | Yes | Trading quantity |
| buy\_average | number | Yes | Average buy price across all trades |
| sell\_average | number | Yes | Average sell price across all trades |
| brokerage | number | No | Brokerage expense |
| clearing\_charges | number | No | Charges charged by clearing house |
| exchange\_transaction\_charges | number | No | Transaction charges by exchange |
| sebi\_turnover\_fees | number | No | Turnover fees by SEBI |
| stt | number | No | Security Transaction Tax |
| stamp\_duty | number | No | Stamp duty paid on transfer of shares |
| sgst | number | No | State GST |
| cgst | number | No | Central GST |
| igst | number | No | Integrated GST |
| other\_transfer\_expenses | number | No | Any other expense relating to the transfer of shares |

### Bonds & Debentures Trade

| Param | Type | Required | Description |
| - | - | - | - |
| isin | string | No | ISIN is the international security identification number |
| security\_name | string | Yes | Symbol or description of debt/ bond |
| quantity | number | Yes | Trading quantity |
| buy\_date | number | Yes | Date of Purchase |
| buy\_price | number | Yes | Average buy price across all trades |
| sell\_date | number | Yes | Date of Sell |
| sell\_price | number | Yes | Average buy price across all trades |
| brokerage | number | No | Brokerage expense |
| clearing\_charges | number | No | Charges charged by clearing house |
| exchange\_transaction\_charges | number | No | Transaction charges by exchange |
| sebi\_turnover\_fee | number | No | Turnover fees by SEBI |
| stamp\_duty | number | No | Stamp duty paid on transfer of shares |
| sgst | number | No | State GST |
| cgst | number | No | Central GST |
| igst | number | No | Integrated GST |
| other\_transfer\_expenses | number | No | Any other expense relating to the transfer of shares |

#### Interest Table

| Param | Type | Required | Description |
| - | - | - | - |
| description | string | No | Description of interest credit |
| date | number | Yes | Date of the interest payment |
| amount | number | Yes | Interest amount received |
| tax\_withheld | number | Yes | TDS amount deducted on the interest |

## Corporate Actions

The enumeration explained below:

| Corporate Action | ENUM |
| - | - |
| Amalgamation | **AMALGAMATION** |
| Bonus Issue | **BONUS\_ISSUE** |
| Buy Back of Shares | **BUY\_BACK** |
| Consolidation of Shares | **CONSOLIDATION** |
| Dividend | **DIVIDEND** |
| Dividend on Preference Shares | **DIVIDEND** |
| Income Distribution (InvIT) | **INCOME\_DISTRIBUTION\_INVIT** |
| Income Distribution RITES | **RITES** |
| InvIT - Return of Capital | **RETURN\_OF\_CAPITAL\_INVIT** |
| Preferential Issue of shares | **PREFERENTIAL\_ISSUE** |
| Reduction of Capital | **REDUCTION\_OF\_CAPITAL** |
| Right Issue of Equity Shares | **RIGHT\_ISSUE** |
| Scheme of Arrangement | **SCHEME\_OF\_ARRANGEMENT** |
| Spin Off | **SPIN\_OFF** |
| Stock Split | **STOCK\_SPLIT** |
| Voluntary Delisting of Shares | **DELISTING** |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.