Tax P&L Report

Tax P&L report helps you understand your taxes applicable from Capital Gains on trading Foreign Securities.

Overview

This API calculates Tax P&L by taking in the trade book data of Foreign Securities and produces an Excel Report.

Problem

  • FDI Platforms/Brokers have to provide accurate Realized & Unrealized P&L.
  • FDI Platforms/Brokers must apply tax rules to accurately calculate Pre-Tax & Post-Tax returns on investments.
  • The tax landscape is ever-changing with announcements from regulators, tax departments & finance ministry.
  • Investors & Traders have to furnish accurate P&L, Holdings, and Turnover in their tax returns as per the tax law.
  • Brokers are unable to provide accurate tax computations.

Solution

  • API to fetch Tax P&L Excel report

Request

Follow the below guidelines to fetch Tax P&L Excel report

Query Parameters

ParamTypeDescriptionExample
reportstringPossible values: Tradewisetradewise
fromnumberFrom Date in Epoch milliseconds1667241000000
tonumberTo Date, in Epoch milliseconds1669746600000

Body

Foreign Equity Trade

The headers are explained below:

ParamTypeRequiredDescription
trade_idstringNoTransaction ID of the particular trade
isinstringNoISIN is the international security identification number
symbolstringYesSymbol or description of equity share
quantitynumberYesTrading quantity
datenumberYesTransaction epoch timestamp
pricenumberYesThe unit price of the equity share
transaction_typestringYesIndicates whether the order is :
buy Or sell,
transfer_expensesnumberYesAny expense relating to the transfer of shares
corporate_actionstringNoRefer to Corporate Action for possible values

ADR

The headers are explained below:

ParamTypeRequiredDescription
trade_idstringNoTransaction ID of the particular trade
isinstringNoISIN is the international security identification number
symbolstringYesSymbol or description of ADR
quantitynumberYesTrading quantity
datenumberYesTransaction epoch timestamp
pricenumberYesThe unit price of the ADR
transaction_typestringYesIndicates whether the order is :
buy Or sell,
transfer_expensesnumberYesAny expense relating to the transfer of ADR
corporate_actionstringNoRefer to Corporate Action for possible values

Foreign Mutual Fund Trade

The headers are explained below:

ParamTypeRequiredDescription
trade_idstringNoTransaction ID of the particular trade
isinstringNoISIN is the international security identification number
scheme_namestringYesScheme name of the mutual fund
scheme_typestringYesScheme type, possible values
equity, debt, other
quantitynumberYesTrading quantity
datenumberYesTransaction epoch
timestamp
pricenumberYesThe unit price of the mutual fund
transaction_typestringYesIndicates whether the order is :
buy Or sell,
transfer_expensesnumberYesAny expense relating to the transfer of Mutual funds

Sample CURL Request

You can refer to the sample payload in workbook format

View Workbook

curl --request POST \
     --url 'https: //api.sandbox.co.in/it-calculator/securities/tax-pnl/tradebook?report=Tradewise&from=1667241000000&to=1669746600000' \
     --header 'Authorization: xxxxxxxxxxxxxx' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: xxxxxxxxxxxxxx' \
     --header 'x-api-version: 1.0' \
     --data '
    {
     "@entity": "workbook",
     "name": "tradebook_workbook",
     "sheets": [
          {
               "name": "foreign_equity_tradebook_sheet",
               "@entity": "sheet",
               "blocks": [
                    {
                         "@entity": "table",
                         "name": "foreign_equity_tradebook_table",
                         "header": [
                              "trade_id",
                              "isin",
                              "symbol",
                              "quantity",
                              "date",
                              "price",
                              "transaction_type",
                              "transfer_expenses",
                              "corporate_action"
                         ],
                         "rows": [
                              [
                                   "1",
                                   "USA190B01019",
                                   "TSLA",
                                   50,
                                   1617135200000,
                                   80,
                                   "buy",
                                   0,
                                   null
                              ],
                              [
                                   "2",
                                   "USA190B01019",
                                   "TSLA",
                                   50,
                                   1617195200000,
                                   70,
                                   "buy",
                                   0,
                                   null
                              ],
                              [
                                   "3",
                                   "USA245A01021",
                                   "AMZN",
                                   49.4698,
                                   1617235200000,
                                   75,
                                   "buy",
                                   0,
                                   null
                              ],
                              [
                                   "4",
                                   "USA423A01024",
                                   "AAPL",
                                   0.25,
                                   1617321600000,
                                   1000,
                                   "buy",
                                   0,
                                   null
                              ],
                              [
                                   "5",
                                   "USA245A01021",
                                   "AMZN",
                                   24.7349,
                                   1620604800000,
                                   90,
                                   "sell",
                                   0,
                                   null
                              ],
                              [
                                   "7",
                                   "USA190B01019",
                                   "TSLA",
                                   40,
                                   1617135209000,
                                   100,
                                   "sell",
                                   0,
                                   null
                              ],
                              [
                                   "8",
                                   "USA245A01021",
                                   "AMZN",
                                   24.7349,
                                   1623369600000,
                                   80,
                                   "sell",
                                   0,
                                   null
                              ],
                              [
                                   "17",
                                   "USA423A01024",
                                   "AAPL",
                                   0.2,
                                   1637366400000,
                                   1200,
                                   "sell",
                                   0,
                                   null
                              ],
                              [
                                   "18",
                                   "USA190B01019",
                                   "TSLA",
                                   15,
                                   1638567500000,
                                   250,
                                   "sell",
                                   0,
                                   null
                              ]
                         ]
                    }
               ]
          },
          {
               "name": "adr_tradebook_sheet",
               "@entity": "sheet",
               "blocks": [
                    {
                         "@entity": "table",
                         "name": "adr_tradebook_table",
                         "header": [
                              "trade_id",
                              "isin",
                              "symbol",
                              "quantity",
                              "date",
                              "price",
                              "transaction_type",
                              "transfer_expenses",
                              "corporate_action"
                         ],
                         "rows": [
                              [
                                   "1",
                                   "USA190B01019",
                                   "INFOSYSADR",
                                   50,
                                   1617135200000,
                                   80,
                                   "buy",
                                   0,
                                   null
                              ],
                              [
                                   "2",
                                   "USA190B01019",
                                   "INFOSYSADR",
                                   50,
                                   1617195200000,
                                   70,
                                   "buy",
                                   0,
                                   null
                              ],
                              [
                                   "3",
                                   "USA245A01021",
                                   "WIPROADR",
                                   49.4698,
                                   1617235200000,
                                   75,
                                   "buy",
                                   0,
                                   null
                              ],
                              [
                                   "4",
                                   "USA423A01024",
                                   "HDFCBANKADR",
                                   0.25,
                                   1617321600000,
                                   1000,
                                   "buy",
                                   0,
                                   null
                              ],
                              [
                                   "5",
                                   "USA245A01021",
                                   "WIPROADR",
                                   24.7349,
                                   1620604800000,
                                   90,
                                   "sell",
                                   0,
                                   null
                              ],
                              [
                                   "7",
                                   "USA190B01019",
                                   "INFOSYSADR",
                                   40,
                                   1617135209000,
                                   100,
                                   "sell",
                                   0,
                                   null
                              ],
                              [
                                   "8",
                                   "USA245A01021",
                                   "WIPROADR",
                                   24.7349,
                                   1623369600000,
                                   80,
                                   "sell",
                                   0,
                                   null
                              ],
                              [
                                   "17",
                                   "USA423A01024",
                                   "HDFCBANKADR",
                                   0.2,
                                   1637366400000,
                                   1200,
                                   "sell",
                                   0,
                                   null
                              ],
                              [
                                   "18",
                                   "USA190B01019",
                                   "INFOSYSADR",
                                   15,
                                   1638567500000,
                                   250,
                                   "sell",
                                   0,
                                   null
                              ]
                         ]
                    }
               ]
          },
          {
               "name": "foreign_mutual_fund_tradebook_sheet",
               "@entity": "sheet",
               "blocks": [
                    {
                         "@entity": "table",
                         "name": "foreign_mutual_fund_tradebook_table",
                         "header": [
                              "trade_id",
                              "isin",
                              "scheme_name",
                              "scheme_type",
                              "quantity",
                              "date",
                              "price",
                              "transaction_type",
                              "transfer_expenses"
                         ],
                         "rows": [
                              [
                                   "15648a",
                                   "USE397D01024",
                                   "Sarofim Equity",
                                   "debt",
                                   250,
                                   1622937600,
                                   520,
                                   "buy",
                                   75
                              ],
                              [
                                   "15648a",
                                   "USE397D01024",
                                   "Sarofim Equity",
                                   "debt",
                                   150,
                                   1628208000,
                                   400,
                                   "sell",
                                   42
                              ],
                              [
                                   "65412a",
                                   "USF251K01NO3",
                                   "BlackRock Exchange BlackRock",
                                   "equity",
                                   31.536,
                                   1618876800,
                                   99994.6642,
                                   "buy",
                                   100
                              ],
                              [
                                   "14712a",
                                   "USF277K01YE6",
                                   "Fidelity Mega Cap Stock",
                                   "equity",
                                   30.739,
                                   1618876800,
                                   99996.0019,
                                   "buy",
                                   98
                              ],
                              [
                                   "89741a",
                                   "USF179KB1HP9",
                                   "State Street US Core Debt Fund",
                                   "debt",
                                   0.247,
                                   1619740800,
                                   1001.7183,
                                   "buy",
                                   88
                              ],
                              [
                                   "24896a",
                                   "USF179KB1HP9",
                                   "State Street US Core Debt Fund",
                                   "debt",
                                   0.246,
                                   1622505600,
                                   1000.4106,
                                   "sell",
                                   102
                              ],
                              [
                                   "41564a",
                                   "USF277K01YE6",
                                   "Fidelity Mega Cap Stock",
                                   "equity",
                                   30.603,
                                   1623196800,
                                   99994.1059,
                                   "sell",
                                   114
                              ]
                         ]
                    }
               ]
          }
     ]
}
'

❗️

Test Environment Not Available

Response

Body

Summary

Personal Details

ParamTypeDescription
namestringName of the user
panstringPermanent Account number of the user
client_idstringClient Id of the user
financial_yearnumberFinancial Year of the data reported
assessment_yearnumberAssessment Year of the data reported

Taxable Income Summary

ParamTypeDescription
income_sub_headstringThe source under which the Income is reported.
Possible enums: securities & other
holding_periodstringDuration for which the security was held.
Possible enums: long_term_20%, short_term_slab
realized_p&lnumberThe realized profit or loss on the trade without considering charges
transfer_expensesnumberAny expenses levied on the transaction of shares
net_realized_p&lnumberThe realized profit or loss on the trade after considering transfer expenses
taxable_incomenumberAmount chargeable to tax after applying the tax rules

Asset-wise Summary

ParamTypeDescription
particularsstringThe source under which the Income is reported.
Possible enums: equity mutual_fund ETF
holding_periodstringDuration for which the security was held.
Possible enums: long_term_20%, short_term_slab
realized_p&lnumberThe realized profit or loss on the trade without considering charges
transfer_expensesnumberAny expenses levied on the transaction of shares
net_realized_p&lnumberThe realized profit or loss on the trade after considering transfer expenses
taxable_incomenumberAmount chargeable to tax after applying the tax rules

Equity Shares

Capital Gains Summary

ParamTypeDescription
short_term_profit_and_lossnumberProfit/Loss from short term trading in Foreign Securities
long_term_profit_and_lossnumberProfit/Loss from long term trading in Foreign Securities

Short Term Trades

ParamTypeDescription
isinstringISIN is the international security identification number
symbolstringSymbol or description of equity share
quantitynumberTrading quantity
buy_datenumberThe date on which the equity share was bought
sell_datenumberThe date on which the equity share was sold
buy_price_per_unitnumberPrice at which a security was bought
sell_price_per_unitnumberPrice at which a security was sold
realized_pnlnumberThe realized profit or loss on the trade without considering charges
chargesnumberAny charges levied on the transaction of shares
net_realized_pnl_usdnumberThe realized profit or loss on the trade after considering transfer expenses in USD
net_realized_pnl_inrnumberThe realized profit or loss on the trade after considering transfer expenses in INR
taxable_pnlnumberThe taxable amount of the trade
tax_ratestringThe applicable tax rate for the trade
tax_amountnumberThe amount of tax payable
net_pnlnumberThe realized profit or loss on the trade after deducting tax

Long Term Trades

ParamTypeDescription
isinstringISIN is the international security identification number
symbolstringSymbol or description of equity share
quantitynumberTrading quantity
buy_datenumberThe date on which the equity share was bought
sell_datenumberThe date on which the equity share was sold
buy_price_per_unitnumberPrice at which a security was bought
sell_price_per_unitnumberPrice at which a security was sold
realized_pnlnumberThe realized profit or loss on the trade without considering charges
chargesnumberAny charges levied on the transaction of shares
net_realized_pnl_usdnumberThe realized profit or loss on the trade after considering transfer expenses in USD
net_realized_pnl_inrnumberThe realized profit or loss on the trade after considering transfer expenses in INR
taxable_pnlnumberThe taxable amount of the trade
tax_ratestringThe applicable tax rate for the trade
tax_amountnumberThe amount of tax payable
net_pnlnumberThe realized profit or loss on the trade after deducting tax

Holdings

ParamTypeDescription
isinstringISIN is the international security identification number
symbolstringSymbol or description of equity share
quantitynumberTrading quantity
buy_price_averagenumberPrice at which a security was bought
chargesnumberAny charges levied on the transaction of security
previous_closingnumberPrevious Closing price of the security

Mutual Fund/ ETFs

Capital Gains Summary

ParamTypeDescription
short_term_profit_and_lossnumberProfit/Loss from short term trading in Foreign MF/ETF
long_term_profit_and_lossnumberProfit/Loss from long term trading in Foreign MF/ETF

Short Term Trades

ParamTypeDescription
isinstringISIN is the international security identification number
scheme_namestringScheme Name of MF/ETF
quantitynumberTrading quantity
buy_datenumberThe date on which the unit was bought
sell_datenumberThe date on which the unit was sold
buy_price_per_unitnumberPrice at which a unit was bought
sell_price_per_unitnumberPrice at which a unit was sold
realized_pnlnumberThe realized profit or loss on the trade without considering charges
chargesnumberAny charges levied on the transaction of unit
net_realized_pnl_usdnumberThe realized profit or loss on the trade after considering charges in USD
net_realized_pnl_inrnumberThe realized profit or loss on the trade after considering charges in INR
taxable_pnlnumberThe taxable amount of the trade
tax_ratestringThe applicable tax rate for the trade
tax_amountnumberThe amount of tax payable
net_pnlnumberThe realized profit or loss on the trade after deducting tax

Long Term Trades

ParamTypeDescription
isinstringISIN is the international security identification number
scheme_namestringScheme Name of MF/ETF
quantitynumberTrading quantity
buy_datenumberThe date on which the unit was bought
sell_datenumberThe date on which the unit was sold
buy_price_per_unitnumberPrice at which a unit was bought
sell_price_per_unitnumberPrice at which a unit was sold
realized_pnlnumberThe realized profit or loss on the trade without considering charges
chargesnumberAny charges levied on the transaction of unit
net_realized_pnlnumberThe realized profit or loss on the trade after considering charges
taxable_pnlnumberThe taxable amount of the trade
tax_ratestringThe applicable tax rate for the trade
tax_amountnumberThe amount of tax payable
net_pnlnumberThe realized profit or loss on the trade after deducting tax

Holdings

ParamTypeDescription
isinstringISIN is the international security identification number
scheme_namestringScheme Name of MF/ETF
quantitynumberTrading quantity
buy_price_averagenumberPrice at which a unit was bought
chargesnumberAny charges levied on the transaction of MF/ETF
previous_closingnumberPrevious Closing price of the unit

Schedule FA

ParamTypeDescription
country_namestringName of the country where the company is registered
name_of_entitystringName of the Company/Corporation of which the Shares are held
addressstringRegistered address of the company
zip_codenumberZip Code of the company's registered address
nature_of_entitystringType of corporation for eg: Company, Partnership firm, body of association etc.
date_of_acquiring_the_interestnumberDate on which Shares where bought for the first time
initial_value_of_the_investment_inrnumberAmount of investment made at the initial purchase
peak_value_of_the_investment_during_the_periodnumberHighest valuation of the investment as per the markets during the holding period
closing_valuenumberValue of investment as on 31st March
total_gross_amount_paid_wrt_the_holding_during_the_periodnumberTotal buy value of the current year
total_gross_proceeds_from_sale_or_redemption_of_investmentnumberTotal sell value of the current year

Sample Response

You can refer to the sample response in workbook format

View Workbook

Response Caching

Response caching is not available for this API. Learn more about our response caching mechanism here

Annexure

Annexure-1 Corporate Actions

The enumeration is 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 RITESincome_distribution_rites
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 Sharesvoluntary_delisting_of_share

Wallet Charge

Since the Tax P&L Report for Foreign Securities API is not a Paid API, no wallet charge will take place.

Versioning

This API is currently in major version 1.0. Refer to our versioning policies here