Before you start
- Get an API key and an access token from Authenticate.
- Prepare a crypto tradebook as
crypto_tradebook.json. The sample tradebook usesFY 2025-26. - Set
API_KEYandACCESS_TOKENin your shell. The authorization header takes the token without aBearerprefix.
FY 2025-26 and JSON output. Set financial_year to the year you want to calculate; FY 2026-27 uses the Income-tax Act, 2025 calculation.
Submit, upload, poll, and download
1
Submit a job
Call Submit Job. Send the calculation parameters in the query string and leave the body empty.
Save
Submit request
Submit request
data.job_id as JOB_ID and data.url as UPLOAD_URL. The URL is for the input upload.2
Upload the tradebook
Upload the JSON workbook to the complete signed URL. The upload starts processing.
Upload request
Upload request
3
Poll the job
Call Poll Job with the saved job identifier.
Continue polling while the status is
Poll request
Poll request
queued or in_progress. A created job is waiting for its upload. Stop on failed and inspect data.message if present. When the status is succeeded, save data.url as DOWNLOAD_URL.4
Download the result
Download the output workbook with the URL from the successful poll response.
Read the Tax P&L output reference for the summary, spot, receipts, and futures tables.
Download request
Download request
Calculate synchronously
The sync endpoint accepts the workbook directly and returns the JSON calculation indata.
Synchronous request
Synchronous request
x-accept-type: application/xlsx. A synchronous response returns the download URL in data; an asynchronous job returns its download URL in data.url after it succeeds.
For FY 2026-27, use the asynchronous workflow for Excel. The synchronous Excel download link is currently unusable. Synchronous JSON is unaffected by this download issue.