Calculate Tax P&L from Tradebook

API to take tradebook and calculate Tax P&L

Important Links

Run in Postman  API Guide  Free Trial


Request Body Example

 {
     "@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
                              ]
                         ]
                    }
               ]
          }
     ]
}

Language
Click Try It! to start a request and see the response here!