Skip to main content

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:
ParamTypeRequiredDescription
isinstringNoISIN is the international security identification number
symbolstringYesSymbol or description of equity share
quantitynumberYesTrading quantity
buy_datenumberYesDate of purchase
buy_averagenumberYesAverage buy price across all trades
sell_datenumberYesDate of Sell
sell_averagenumberYesAverage sell price across all trades
fmvnumberNoHigh stock price on 31/01/2018
brokeragenumberNoBrokerage expense
clearing_chargesnumberNoCharges charged by clearing house
exchange_transaction_chargesnumberNoTransaction charges by exchange
sebi_turnover_feesnumberNoTurnover fees by SEBI
sttnumberNoSecurity Transaction Tax
stamp_dutynumberNoStamp duty paid on transfer of shares
sgstnumberNoState GST
cgstnumberNoCentral GST
igstnumberNoIntegrated GST
interestnumberNoInterest paid on margins eg Margin Trading Facility
depository_chargesnumberNoDepository charges paid on delivery of shares
other_transfer_expensesnumberNoAny other expense relating to the transfer of shares
corporate_actionstringNoCorporate Action. Possible values: BUY_BACK, DIVIDEND

Mutual Fund Trade

The headers are explained below:
ParamTypeRequiredDescription
isinstringNoISIN is the international security identification number
scheme_typestringYesScheme type, possible valuesEquity, Debt, Other
symbolstringYesSymbol or description of equity share
quantitynumberYesTrading quantity
buy_datenumberYesDate of purchase
buy_averagenumberYesAverage buy price across all trades
sell_datenumberYesDate of Sell
sell_averagenumberYesAverage sell price across all trades
fmvnumberNoHigh stock price on 31/01/2018
brokeragenumberNoBrokerage expense
clearing_chargesnumberNoCharges charged by clearing house
exchange_transaction_chargesnumberNoTransaction charges by exchange
sebi_turnover_feesnumberNoTurnover fees by SEBI
sttnumberNoSecurity Transaction Tax
stamp_dutynumberNoStamp duty paid on transfer of shares
sgstnumberNoState GST
cgstnumberNoCentral GST
igstnumberNoIntegrated GST
other_transfer_expensesnumberNoAny other expense relating to the transfer of shares
corporate_actionstringNoCorporate Action. Possible values: BUY_BACK, DIVIDEND

Futures and Options Trade

The headers are explained below:
ParamTypeRequiredDescription
symbolstringYesSymbol or description of equity share
typestringYesType, possible valuesFutures, Options
quantitynumberYesTrading quantity
buy_averagenumberYesAverage buy price across all trades
sell_averagenumberYesAverage sell price across all trades
brokeragenumberNoBrokerage expense
clearing_chargesnumberNoCharges charged by clearing house
exchange_transaction_chargesnumberNoTransaction charges by exchange
sebi_turnover_feesnumberNoTurnover fees by SEBI
sttnumberNoSecurity Transaction Tax
stamp_dutynumberNoStamp duty paid on transfer of shares
sgstnumberNoState GST
cgstnumberNoCentral GST
igstnumberNoIntegrated GST
other_transfer_expensesnumberNoAny other expense relating to the transfer of shares

Bonds & Debentures Trade

ParamTypeRequiredDescription
isinstringNoISIN is the international security identification number
security_namestringYesSymbol or description of debt/ bond
quantitynumberYesTrading quantity
buy_datenumberYesDate of Purchase
buy_pricenumberYesAverage buy price across all trades
sell_datenumberYesDate of Sell
sell_pricenumberYesAverage buy price across all trades
brokeragenumberNoBrokerage expense
clearing_chargesnumberNoCharges charged by clearing house
exchange_transaction_chargesnumberNoTransaction charges by exchange
sebi_turnover_feenumberNoTurnover fees by SEBI
stamp_dutynumberNoStamp duty paid on transfer of shares
sgstnumberNoState GST
cgstnumberNoCentral GST
igstnumberNoIntegrated GST
other_transfer_expensesnumberNoAny other expense relating to the transfer of shares

Interest Table

ParamTypeRequiredDescription
descriptionstringNoDescription of interest credit
datenumberYesDate of the interest payment
amountnumberYesInterest amount received
tax_withheldnumberYesTDS amount deducted on the interest

Corporate Actions

The enumeration explained below:
Corporate ActionENUM
AmalgamationAMALGAMATION
Bonus IssueBONUS_ISSUE
Buy Back of SharesBUY_BACK
Consolidation of SharesCONSOLIDATION
DividendDIVIDEND
Dividend on Preference SharesDIVIDEND
Income Distribution (InvIT)INCOME_DISTRIBUTION_INVIT
Income Distribution RITESRITES
InvIT - Return of CapitalRETURN_OF_CAPITAL_INVIT
Preferential Issue of sharesPREFERENTIAL_ISSUE
Reduction of CapitalREDUCTION_OF_CAPITAL
Right Issue of Equity SharesRIGHT_ISSUE
Scheme of ArrangementSCHEME_OF_ARRANGEMENT
Spin OffSPIN_OFF
Stock SplitSTOCK_SPLIT
Voluntary Delisting of SharesDELISTING