Reports¶
Use the Reports API to discover and generate back-office, tax, trade, portfolio, and mutual fund reports for the authenticated client.
Reports can return JSON view data, downloadable PDF/XLSX files, or an email acknowledgement depending on the endpoint and action_type.
Confidential data
Reports can contain client name, PAN, bank details, balances, holdings, trades, and tax data. Do not print or store full report payloads in shared logs.
Base URLs¶
| Environment | Base URL |
|---|---|
| PROD | https://api.nubra.io |
| UAT | https://uatapi.nubra.io |
Headers¶
| Header | Required | Description |
|---|---|---|
Authorization |
yes | Bearer <session_token> |
x-device-id |
yes | Device ID used for the authenticated session |
Content-Type |
for JSON body | Use application/json for POST requests |
Actions¶
action_type |
Meaning |
|---|---|
VIEW |
Return the report as JSON |
DOWNLOAD |
Return the report as PDF/XLSX bytes |
EMAIL |
Send the report to the client's registered email and return an acknowledgement |
Email action
EMAIL sends a real email to the logged-in client's registered email address. Use it only when the client expects the report by email.
Export Formats¶
export_format |
Usage |
|---|---|
PDF |
Back-office report downloads where PDF is supported |
EXCEL |
Back-office report downloads where Excel is supported |
JSON |
Used with VIEW |
Tax, trade, portfolio snapshot, and mutual fund reports are XLSX-only for downloads and do not need export_format.
Dates¶
Use RFC3339 date-time strings with IST offset.
{
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2025-06-30T00:00:00+05:30"
}
Single-date reports use date.
{
"date": "2025-07-28T00:00:00+05:30"
}
Discover Available Reports¶
Method: GET
Endpoint: /report
curl --location 'https://api.nubra.io/report' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>'
Example response shape:
{
"message": "report-options",
"res": {
"categories": [
"ACCOUNT_STATEMENT",
"HOLDING",
"MUTUAL_FUND_REPORT",
"PROFIT_LOSS"
],
"reports": [
{
"category": "ACCOUNT_STATEMENT",
"title": "Financial ledger",
"type": "summary",
"downloadFileTypes": ["PDF", "EXCEL"],
"actionTypes": ["DOWNLOAD"],
"dateRangeOptions": ["DATE_RANGE"],
"passwordProtected": true,
"password": "PAN",
"minDate": "2025-04-01",
"maxDate": "2026-07-28"
}
]
}
}
Note
If passwordProtected=true and password="PAN", open the downloaded PDF with the client's PAN in upper case.
Endpoint Map¶
| Report | Method | Endpoint | Date input | Actions |
|---|---|---|---|---|
| Report options | GET |
/report |
none | none |
| Financial ledger | POST |
/report/summary |
from_date, to_date |
VIEW, DOWNLOAD, EMAIL |
| Profit and loss | POST |
/report/profit_loss |
from_date, to_date |
VIEW, DOWNLOAD, EMAIL |
| Demat statement | POST |
/report/demat |
from_date, to_date |
VIEW, DOWNLOAD, EMAIL |
| Contract note | POST |
/report/contract_note |
from_date, to_date |
VIEW, DOWNLOAD, EMAIL |
| Daily margin | POST |
/report/daily_margin |
date |
VIEW, DOWNLOAD, EMAIL |
| Holding statement | POST |
/report/holding |
date |
VIEW, DOWNLOAD, EMAIL |
| Open positions | POST |
/report/open_positions |
date |
VIEW, DOWNLOAD, EMAIL |
| Dividend | POST |
/report/dividend |
from_date, to_date |
VIEW, DOWNLOAD |
| Tradebook | POST |
/report/tradebook-report |
from_date, to_date |
VIEW, DOWNLOAD |
| Trader diary | POST |
/report/trader-diary |
from_date, to_date |
DOWNLOAD |
| Portfolio snapshot | GET |
/report/portfolio |
none | DOWNLOAD |
| MF transactions | POST |
/report/transaction |
from_date, to_date |
VIEW, DOWNLOAD |
| MF orderbook | POST |
/report/orderbook |
from_date, to_date |
VIEW, DOWNLOAD |
| MF holdings | POST |
/report/holdings |
date |
VIEW, DOWNLOAD |
| MF capital gains | POST |
/report/capital_gains |
from_date, to_date |
VIEW, DOWNLOAD |
Back-Office Report Payloads¶
Range report, VIEW:
{
"action_type": "VIEW",
"export_format": "JSON",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2025-06-30T00:00:00+05:30"
}
Range report, DOWNLOAD as PDF:
{
"action_type": "DOWNLOAD",
"export_format": "PDF",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2025-06-30T00:00:00+05:30"
}
Single-date report, DOWNLOAD as PDF:
{
"action_type": "DOWNLOAD",
"export_format": "PDF",
"date": "2025-07-28T00:00:00+05:30"
}
Back-Office Examples¶
Financial ledger as JSON:
curl --location 'https://api.nubra.io/report/summary' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
"action_type": "VIEW",
"export_format": "JSON",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2025-06-30T00:00:00+05:30"
}'
Demat statement as PDF:
curl --location 'https://api.nubra.io/report/demat' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--output demat_statement.pdf \
--data '{
"action_type": "DOWNLOAD",
"export_format": "PDF",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2025-06-30T00:00:00+05:30"
}'
Holding statement as JSON:
curl --location 'https://api.nubra.io/report/holding' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
"action_type": "VIEW",
"export_format": "JSON",
"date": "2025-07-28T00:00:00+05:30"
}'
Email profit and loss report:
curl --location 'https://api.nubra.io/report/profit_loss' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
"action_type": "EMAIL",
"export_format": "EXCEL",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2025-06-30T00:00:00+05:30"
}'
Tax And Trade Reports¶
Dividend and tradebook support VIEW and DOWNLOAD. Trader diary is download-only.
Dividend VIEW:
curl --location 'https://api.nubra.io/report/dividend' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
"action_type": "VIEW",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2026-03-31T00:00:00+05:30"
}'
Tradebook DOWNLOAD:
curl --location 'https://api.nubra.io/report/tradebook-report' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--output tradebook.xlsx \
--data '{
"action_type": "DOWNLOAD",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2025-06-30T00:00:00+05:30"
}'
Trader diary DOWNLOAD:
curl --location 'https://api.nubra.io/report/trader-diary' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--output trader_diary.xlsx \
--data '{
"action_type": "DOWNLOAD",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2025-06-30T00:00:00+05:30"
}'
Portfolio Snapshot¶
Portfolio snapshot is generated from live trading data and returns an XLSX workbook.
curl --location 'https://api.nubra.io/report/portfolio' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--output portfolio_report.xlsx
Mutual Fund Reports¶
Mutual fund reports are XLSX-only for downloads and support VIEW and DOWNLOAD.
MF transactions:
curl --location 'https://api.nubra.io/report/transaction' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
"action_type": "VIEW",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2025-06-30T00:00:00+05:30"
}'
MF orderbook:
curl --location 'https://api.nubra.io/report/orderbook' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
"action_type": "VIEW",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2025-06-30T00:00:00+05:30"
}'
MF holdings:
curl --location 'https://api.nubra.io/report/holdings' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
"action_type": "VIEW",
"date": "2025-07-28T00:00:00+05:30"
}'
MF capital gains:
curl --location 'https://api.nubra.io/report/capital_gains' \
--header 'Authorization: Bearer <session_token>' \
--header 'x-device-id: <device_id>' \
--header 'Content-Type: application/json' \
--data '{
"action_type": "VIEW",
"from_date": "2025-04-01T00:00:00+05:30",
"to_date": "2026-03-31T00:00:00+05:30"
}'
Response Types¶
| Request type | Response |
|---|---|
VIEW |
JSON object |
DOWNLOAD |
Binary PDF/XLSX body |
EMAIL |
JSON acknowledgement |
| No-data window | Can return server error such as failed to generate report. please try again after some time. |
For downloads, read the Content-Type and Content-Disposition response headers to determine file format and server-suggested filename.
Important Rules¶
Important Rules
- Call
GET /reportfirst when you need the available report list, date limits, supported formats, and password flag. - Clamp report dates to the report's
minDateandmaxDate. - Use
export_format=JSONforVIEWon back-office reports. EMAILis supported only for back-office reports and sends a real email.- Tax, trade, portfolio snapshot, and mutual fund report downloads are XLSX-only.
- Downloaded files and JSON payloads can contain sensitive client information.