KEY TAKEAWAYS
- What DalalOS is for: pulling years of Indian company results, shareholding and filings in one call. One range parameter works the same on six datasets, and the response states the range it served and the credits it charged.
- Send
fromandto(dates), orfrom_fyandto_fyon results and shareholding. - Up to 2 fiscal years cost 1 credit; each further year adds 1.
- Free reaches back 3 years, Plus 5; Pro and the Business plans reach as far back as we hold.
- Every answer from these six routes carries
meta.historyandmeta.credits_charged.
Range parameters
The same names work on the REST routes and, as from_date and to_date, as MCP tool arguments (from is reserved in Python). REST also accepts from_date and to_date.
| Parameter | Type | Meaning |
|---|---|---|
from | date | Start of the range, inclusive, YYYY-MM-DD. |
to | date | End of the range, inclusive. Defaults to today. |
from_fy | integer | First Indian fiscal year, April to March, by the year it ends: 2019 is FY2018-19 (2018-04-01 to 2019-03-31). Results and shareholding only. |
to_fy | integer | Last fiscal year, same convention. Results and shareholding only. |
cursor | string | The meta.next_cursor of the previous page. Announcements and documents only. |
The range matches each record's own date: period_end for results and shareholding, filed_at for announcements and documents, ex_date for corporate actions and dividends. When from is left out but to is sent, the range starts the route's default window before to: 2 years for results and shareholding, 30 days for announcements, 365 days for documents, 5 years for corporate actions and dividends. A call with no range parameter answers exactly as before. limit, days and years work as before, and limit can be combined with a range to cap the rows returned, newest first. On results and shareholding its maximum rises from 20 to 40 when a range is given. On announcements and documents a range comes back in pages of limit rows (announcements: default 200, max 1000; documents: default 500, max 1000), and meta.next_cursor fetches the next page.
One style at a time
days or years, or from together with from_fy, answers 400 conflicting_range_params.Where the range works
| Dataset | REST route | MCP tool | Range matches | Credits |
|---|---|---|---|---|
| Results | GET /stocks/{q}/financials | get_financials | period_end | By fiscal year |
| Shareholding | GET /stocks/{q}/shareholding | get_shareholding | period_end | By fiscal year |
| Announcements | GET /stocks/{q}/events | get_stock_events | filed_at | By fiscal year |
| Company documents | GET /stocks/{q}/documents | get_company_documents | filed_at | By fiscal year |
| Corporate actions | GET /stocks/{q}/corporate-actions | get_corporate_actions | ex_date | 1, whatever the range |
| Dividends | GET /stocks/{q}/dividends | get_dividends | ex_date | 1, whatever the range |
Price history, valuation history and the other history-shaped tools are not part of this change and keep their current windows.
Credits by fiscal year
One call is one company and one dataset. For 4 of the datasets the cost follows the number of Indian fiscal years (April to March) that the range touches: max(1, fiscal_years - 1). The first 2 are in the base credit.
| Fiscal years in range | Credits |
|---|---|
| Up to 2 | 1 |
| 3 | 2 |
| 5 | 4 |
| 10 | 9 |
Example: on Pro, results from from_fy=2019 to to_fy=2026 for a company we hold in full are 8 fiscal years, so 7 credits. If the company's first record is in FY2021-22, the same call counts 5 years and costs 4.
How far back each plan reaches
| Plan | History | Limit the API applies |
|---|---|---|
| Free | 3 years | 3 years from today |
| Plus | 5 years | 5 years from today |
| Pro | All available history | 10 years from today |
| Business | All available history | 10 years from today |
| Business+ | All available history | 10 years from today |
We hold results and shareholding from FY2018-19 for most companies, and add older years over time.
The limit clips; it does not reject. A request that reaches further back is answered from the earliest date the plan allows, and the response says so. Older years and days requests are clipped the same way: on Free, years=5 on corporate actions returns 3 years. Plan prices and monthly credits are on the pricing page.
What the response adds
Inside the usual envelope, meta gains these fields. The REST response also sets the header X-DalalOS-Credits-Charged to the same number as meta.credits_charged.
| Field | Meaning |
|---|---|
meta.history.requested_from | The range you asked for, start and end (requested_to). requested_from is null on a results or shareholding call without a range, which returns the newest periods. |
meta.history.effective_from | The range actually served, after the plan limit and our coverage (effective_to). |
meta.history.earliest_available | The earliest record we hold for this company and dataset. |
meta.history.plan_max_history_years | How many years your plan reaches back. |
meta.history.clipped_by_plan | True when the plan limit cut off records we hold for this company, so a higher plan would return more. False when we hold nothing older than your plan reaches. |
meta.history.note | A plain sentence when the range was clipped or lies before our first record. Without it an empty list would be unexplained. |
meta.credits_charged | Credits this call used, on REST and MCP alike, including any per-call weight on the route. 0 on a cursor page. |
meta.next_cursor | Announcements and documents: pass it as cursor for the next page. null on the last page. |
A cursor is signed by the server and tied to your account, the route, the company, the clipped range and the filters. It expires after 24 hours.
Errors
| Status | reason_code | Meaning |
|---|---|---|
| 400 | conflicting_range_params | A range (`from`, `to`, `from_fy`, `to_fy`) was sent together with an older window parameter (`days` or `years`), or `from` with `from_fy` (`to` with `to_fy`). Send one or the other. |
| 400 | invalid_range | `from` is after `to`. |
| 400 | invalid_argument | A date that is not YYYY-MM-DD, a fiscal year that is not a year such as `2019`, or `from_fy`/`to_fy` on a route other than results and shareholding. |
| 400 | range_too_long | The range spans more than 10 years, the most one call can cover on any plan. |
| 400 | invalid_cursor | The cursor is malformed, or it was issued to another account, route, company or set of parameters. |
| 400 | cursor_expired | The cursor is older than 24 hours. Repeat the first request to start again. |
| 402 | quota_exceeded | Your remaining credits are below what this call costs. The REST body, and the MCP limit reply's `meta`, add `credits_needed` and `credits_remaining`; nothing was run or charged. |
| MCP tool error | request_too_large_to_price | An MCP request body over 1 MiB cannot be priced, so it is charged 1 credit and a history tool in it refuses a range. Send the ranged call on its own. |
The other errors every route can return are on Plans, credits and errors.
Research data only. Answers are disclosed facts and mechanically computed figures, never investment advice.
FAQ
Common questions
- How many credits does a ten-year range of results cost?
- Nine credits, when we hold all ten fiscal years for the company. We add older years over time, and meta.history.earliest_available says where our records start. The first 2 fiscal years are in the base credit and every further year adds one. A call with no range parameter keeps its usual cost of one credit.
- Am I charged for years the company has no data for?
- No. The charge counts only the fiscal years inside the range that we hold records for. A range that reaches back past the company's first record, or past your plan's history limit, is shortened first and charged for what is left. A range with no data at all costs one credit.
- What happens if I ask for more history than my plan includes?
- The request is not rejected. It is answered from the earliest date your plan reaches, and meta.history says so: when we hold older records for the company, clipped_by_plan is true and the note names your plan's limit.
- Do the next pages of announcements and documents cost credits?
- No. The first page is charged for the whole range. A request that carries a valid cursor from it is free.
- What is the longest range one call can cover?
- 10 years, on every plan. A longer range answers 400 with reason_code range_too_long. Split it into two calls.
Connect your AI to Indian stock market data
Sign in to DalalOS and connect your AI in one line of config. Free to start; paid plans when you need more.
Account holders get product-update emails about every two weeks. Turn them off any time.
KEEP EXPLORING