When you want the raw series
The return figures on a fund page answer most questions. Some questions need the raw series instead: a custom date range, rolling windows, a drawdown chart, a backtest, or a check that a number means what you think it means. For those, the WealthTicker API serves each fund's daily NAV history as JSON.
This walkthrough pulls one fund's full history into pandas and recomputes three figures the API publishes: CAGR since launch, one-year return and maximum drawdown. The fund is UTI Nifty 50 Index Fund, Direct Growth (scheme code 120716), and the data runs to 2 November 2026.
Fetch the series
You need a key from Settings → API keys, requests and pandas. Keep the key in an environment variable, not in the notebook:
import os, requests, pandas as pd
BASE = "https://wealthticker.in/api/v1"
H = {"X-Api-Key": os.environ["WT_KEY"]}
r = requests.get(f"{BASE}/funds/120716/nav", headers=H, timeout=30)
r.raise_for_status()
body = r.json()
nav = pd.DataFrame(body["data"])
nav["date"] = pd.to_datetime(nav["date"])
s = nav.set_index("date")["nav"]
print(body["meta"])
With a Starter or Pro key, that call returns 3,398 points, from 2 January 2013 (NAV 37.4040) to 2 November 2026 (165.1046). meta reports the count, the first and last dates, and truncated, which is true when the free plan's one-year window has cut older points. Add from and to (as YYYY-MM-DD) to the URL to ask for a slice.
Reproduce the CAGR since launch
def cagr(s):
years = (s.index[-1] - s.index[0]).days / 365.25
return (s.iloc[-1] / s.iloc[0]) ** (1 / years) - 1
print(f"{cagr(s):.2%}") # 11.33%
The NAV grew 4.41 times over 13.83 years, which is 11.33% a year. The fund's returns.inception field from /funds/120716 is 11.3322, the same figure. CAGR is what the API reports for every period of one year or more.
Reproduce the one-year return, and the trap in it
The obvious way to get a one-year return is to take the NAV from a year ago:
end = s.index[-1]
start = s[: end - pd.DateOffset(years=1)].index[-1] # last NAV on or before 2 Nov 2025
yrs = (end - start).days / 365.25
print(start.date(), f"{(s[end] / s[start]) ** (1 / yrs) - 1:.2%}") # 2025-10-31 -8.06%
That matches the API's returns.y1 of −8.0582. Two details make it match:
- The anchor is the last NAV on or before the date a year back. 2 November 2025 was a Sunday, so the start is the 31 October close of 179.6474.
- Periods of a year or more are annualised over actual days. 31 October 2025 to 2 November 2026 is 367 days, a little over a year.
Get either detail wrong and the result moves. Taking the first NAV after the date (3 November 2025, 179.9324) without annualising gives −8.24%.
That matters on the free plan. Its one-year window is measured back from the fund's latest NAV and begins at the first NAV on or after the cut-off. Here that is 241 points starting 3 November 2025, so it never contains the 31 October anchor. The free series is fine for charts and recent analysis. For the exact trailing figure, read returns.y1 from the fund endpoint instead of rebuilding it.
Reproduce the maximum drawdown
dd = s / s.cummax() - 1
trough = dd.idxmin()
peak = s[:trough].idxmax()
print(f"{dd.min():.2%}", peak.date(), trough.date()) # -38.42% 2020-01-14 2020-03-23
That is the COVID fall: from a high on 14 January 2020 to a low on 23 March 2020. It matches the fund's risk.maxDrawdown of −38.4179. Maximum drawdown is the deepest fall from a previous high, so it needs the whole history. On the free plan's one-year window the same code finds only the largest fall within the past year.
Where to take it next
With the series in a DataFrame, the rest is standard pandas:
- Rolling returns:
s.resample("D").ffill()to fill weekends and holidays, then compare each day with the value three years earlier. The rolling returns guide explains why they say more than a single trailing figure. - Comparing funds: fetch two series and
jointhem on date. Index funds tracking the same index should move almost together, and the gap between them is mostly cost. - Backtests: resample to month-ends and apply a monthly SIP amount to see what a regular investor would hold.
Plans and limits
The NAV endpoint is on every plan. The free plan (100 requests a day, 2,000 a month) returns the trailing year; Starter (₹799 a month or ₹8,499 a year, 10,000 requests a day) returns full history and adds the fund-house endpoints. Every response carries X-RateLimit-Remaining, so a loop over many funds can slow down before it hits a 429. NAVs are AMFI's, as published; the computed fields follow the methodology page. Every endpoint, with sample responses, is on the developers page.
Frequently asked questions
How do I get mutual fund NAV history in Python?
Call GET /api/v1/funds/{code}/nav on the WealthTicker API with your key in an X-Api-Key header. It returns a data array of date and NAV pairs, which goes straight into a pandas DataFrame. The free plan returns the trailing year; Starter and Pro return the full history.
Why does my one-year return differ slightly from the API's?
The API anchors a one-year return on the last NAV on or before the same date a year earlier, then annualises over the actual days between the two NAVs. Anchoring on the first NAV after that date, or not annualising, gives a slightly different number. For UTI Nifty 50 Index Fund to 2 November 2026 the gap was −8.24% against −8.06%.
How far back does mutual fund NAV history go?
As far as AMFI's records for the scheme. Direct plans start no earlier than January 2013, when SEBI introduced them; UTI Nifty 50 Index Fund Direct Growth has 3,398 daily NAVs from 2 January 2013 to 2 November 2026.
This is commentary on published data, not investment advice. WealthTicker is not a SEBI-registered adviser or distributor. Figures are WealthTicker’s own calculations from public data — AMFI’s fund NAVs and disclosures, NSE’s index and FII/DII files, and the fund houses’ monthly portfolios (how we calculate). They are as of the dates stated and can be revised by their source.
Keep reading
Screening mutual funds through an API query
Use the WealthTicker API's q expression to screen Indian mutual funds by category, size, cost and returns, with a worked flexi cap screen on 2 November data.
SIF NAV and returns: how to read the SIF tracker
How to read the SIF tracker's 34 long-short strategies without being misled by short records. Worked example: three hybrid SIFs that launched in October 2025.
CAGR vs absolute return: 100% in 5 years is 14.9% a year
A fund that doubles in 5 years returned 100% in absolute terms but 14.9% a year. How to convert between the two, with worked examples.
