Morningstar fund
A mutual fund on Morningstar: NAV and 1-day return, fund size, adjusted and net expense ratio, fee level, share class, Morningstar category, style box, minimum investment, status, TTM yield, turnover, the analyst's one-line summary and the top 10 holdings with weights, values and sectors. ETFs (type=etf) give the analyst summary and holdings. Medalist and star ratings are subscriber-only and not included. details=true adds the security id and: asset_allocation (US equity, non-US equity, bond, cash, other: net, long and short percent with category and index comparison), trailing_returns (1 day to since inception: NAV and market return, difference to category, category rank percentile and fund count), star_rating (overall, 3, 5 and 10 years), risk (alpha, beta, R-squared, standard deviation and Sharpe ratio over 1 to 15 years for the fund, its category and index where published, plus risk and return versus category) and management (advisor, manager count, average and longest manager tenure, current and past managers with start dates).
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
tickerrequired | string | Fund or ETF ticker. Example: VFIAX |
type | fund | etf | fund (default) or etf. Example: fund |
exchange | string | Morningstar market code. Default xnas for funds; arcx, xnas, then bats for ETFs. |
details | boolean | true adds asset allocation, trailing returns, star rating, risk statistics and management (default false). |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/morningstar/v1/fund?ticker=VFIAX" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/morningstar/v1/fund",
params={"ticker": "VFIAX"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/morningstar/v1/fund");
url.searchParams.set("ticker", "VFIAX");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).