Calculate Tax P&L
Overview
This API processes to provide a comprehensive Tax P&L, Holdings, Open Sell Trades, Transfer Trades and a overall summary across all assets by taking in the input data as JSON in asynchronous fashion.
Problem
- Brokers have to provide accurate Realized & Unrealized P&L.
- 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.
Solution
- API to calculate Tax P&L in real-time.
- API covers tax calculation for corporate actions such as dividends, buybacks, etc.
- Allows Brokers to visualize Tax P&L for their users.
- Tax P&L report can be generated from tradebook, tradewise settlements or scripwise settlements inputs.
- Tax P&L report can be generated to tradewise or scripwise output formats.
- Use the PUT request on the
presigned_url
to upload the trades payload. - Get
job_id
to obtain the Calculated Tax P&L.
Endpoint
HTTP Method | Endpoint |
---|---|
POST | /it-calculator/securities/domestic/report/tax-pnl/generate |
Request
Query Parameters
Param | Type | Required | Description | Example |
---|---|---|---|---|
input | string | true | Type of input. Possible input: tradebook , tradewise or scripwise | tradebook |
output | string | true | Possible values: tradewise , scripwise | tradewise |
from | number | false | From Date in Epoch milliseconds Default: 0 | 1667241000000 |
to | number | false | To Date, in Epoch milliseconds Default: current timestamp | 1669746600000 |
Headers
Header | Type | Description | Example |
---|---|---|---|
x-accept-type | string | Whether to generate a excel sheet as output Possible values: application/json , application/xlsx Default value: application/json | application/xlsx |
Sample CURL Request
curl --location 'http://api.sandbox.co.in/it-calculator/securities/domestic/report/tax-pnl?from=0&to=2042358400000' \
--header 'Authorization: xxxxxxxxxxxxxx' \
--header 'x-api-version: 1.0.0' \
--header 'x-api-key: xxxxxxxxxxxxxx' \
--header 'x-accept-tye: application/xlsx'
Test Environment Not Available
Response
Param | Type | Description |
---|---|---|
code | string | HTTP response status code |
timestamp | string | Timestamp of the request |
transaction_id | string | API Transaction ID |
job_id | string | Unique Job ID to track the request |
presigned_url | string | S3 URL to make the PUT request |
PUT Request on Presigned URL
Once the job is successfully created, upload the payload using HTTP PUT method on generated presigned url. Read More
Payload
On upload of the input data we'll consume the event to process the provided input and run a job for that.
Sample Response
{
"transaction_id": "49f15670-1516-4e4f-9821-9dff154d3154",
"code": 200,
"data": {
"job_id": "49f15670-1516-4e4f-9821-9dff154d3154",
"presigned_url": "https://s3.ap-south-1.amazonaws.com/in-co-sandbox-it-tax-pnl-computation-dev/49f15670-1516-4e4f-9821-9dff154d3154.input?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEOH%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCmFwLXNvdXRoLTEiRzBFAiEA%2FiPsaYIM8zRbh4YcgZV%2BN5j%2BI44vMdvJNlkX1jVFzsMCIDwdCp2MVnqBjRKBqBmA%2BWOZAM%2FZn64HkAQfT6tw9dFbKpUDCIr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMMDcyNzU1MzM1OTc4Igy33qyVmJA1B2%2BVSIEq6QJTkFupEq8dAHazsRZGSqAHxs3WmDic7oBIwgYKRAah9Ag%2BpPbK41%2FkQO5cym8N4QNF9UyKuTiYtDCEyw1zqD6NF6myTJIoBfKsXw3XP8SJQ5kxd%2FwSFUaUiG2F2%2B8x9zjC8cPiJ07R%2ByVrlVeCHHjiLedRW%2FC7Q2xxr40iCxXuTvkwU4PJZFqh6QvPPAtAa5t9NUq2i5lhaedxK2QvxOVKV29Lqv2bU7iE81zaG6JcpPfz11F4onysTmtVcUtBGfC7V4XLW4jl9e4s4doGMPbx3Yk1QisdYtW05TYZjDt2s4kWrVajQfrFSZuirNFDazilUEDQbeEXfqsWq5xkYByuooEsWCnuJJdD%2FOIm5pzJPH5Js4exvrCw6IMyHciQLPFPFn0L95UKBOe3ExiTGcbdvh63XETP1yOynZnNSPwzyQE1%2Fx2kcnvxNakX6OZJOep8iM9sKRqR9g%2BwrgOOvg66HFw7XQ%2BOGY1tMOiOyKYGOp0BiF%2FA6ppfhGPDT5u6FqsDIGqPAGd%2FBETtLjwJaPDVFd0%2BzVuQHr42iEwyUqhvTOpPyMfTTj7eznR%2FVpeXaI2tth%2FEgdpD5zU1HLzE1qbMOhkQqk5uvYg5WE%2FfhPwIv2EFkKFZ8i%2FV61jXR5KUmdU9g03wAboM0islFGUCVuT9eLOr1i67bv0LluX%2FW86jb93aMHYzPGwh1sDa9hMFcw%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230808T091427Z&X-Amz-SignedHeaders=host&X-Amz-Expires=298&X-Amz-Credential=ASIARB4EOKMVK3QUNAHV%2F20230808%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Signature=e69aa853caac0f014296a8e988c1ca9ca9ef548b76496cce35fe2ba56c169a26"
},
"timestamp": 1691486043000
}
Response Caching
Response caching is not available for this API. Learn more about our response caching mechanism here
Wallet Charge
Since the Tax P&L Calculator from Tradebook 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
Updated 15 days ago