Workflow All workflows API reference
Portfolio review — what you actually own
Composed flow for the recurring “what's in my book and is it still right” question. Pulls fund holdings, checks overlap between funds, looks up valuation on the actual stocks under the hood, flags stale data so you don't recommend on a 2024-Q1 snapshot.
mf_holdings · mf_overlap · co_ratios · /companies/{X}/holdersTotal credit cost · ~15 credits for a 3-fund book; scales linearly
export GENKA_API_KEY=imk_live_... H="X-API-Key: $GENKA_API_KEY" # example portfolio: 60% PPFAS Flexi, 30% HDFC Flexi, 10% ICICI Pru Commodities
1. Pull current holdings for each fund
Per-fund top holdings + as_of. The as_of date matters: if it's >90 days old, the actual book has moved.
for slug in ppfas-parag-parikh-flexi-cap hdfc-flexi-cap icici-pru-commodities; do
curl -sH "$H" "https://genka.dev/latest/mf/$slug/holdings?limit=15" \
| jq "{slug: \"$slug\", as_of: .data[0].as_of, top: [.data[] | select(.asset_class==\"Equity\") | .ticker // .instrument][:5]}"
done
Returns top-5 equity names per fund with as_of. Filter client-side on asset_class=="Equity" and non-null ticker if you want to drop cash + FoF + foreign positions. ICICI Pru Commodities top hits: Jindal Steel (9.5%), Vedanta (8.9%), JSW Steel (7.5%) — metals concentration. PPFAS top hits: HDFC Bank (8.0%), Power Grid (7.2%), ITC, Coal India — very different book.
2. Are the funds duplicating each other?
If two funds in your book have >50% overlap, you're paying two TERs for one exposure. Pairwise overlap quantifies it.
curl -sH "$H" "https://genka.dev/latest/mf/ppfas-parag-parikh-flexi-cap/overlap?with=hdfc-flexi-cap"
Returns {overlap_pct, common_count, common_holdings[]}. PPFAS × HDFC Flexi: ~35% overlap, 27 common names. That's normal for two flexi-caps; >60% would be a consolidation candidate. Non-overlapping pairs (PPFAS × ICICI Pru Commodities) typically come back at 0-5% — thematic vs broad strategy.
3. What's my total exposure to a single stock?
If two funds top-10 hold the same stock, you're doubling down without realising. Fold per-fund weights together. The reverse-index endpoint skips the fold entirely.
# option A: per-fund (fold yourself) curl -sH "$H" "https://genka.dev/latest/mf/ppfas-parag-parikh-flexi-cap/holdings" | jq '.data[] | select(.ticker=="HDFCBANK") | .weight_pct' curl -sH "$H" "https://genka.dev/latest/mf/hdfc-flexi-cap/holdings" | jq '.data[] | select(.ticker=="HDFCBANK") | .weight_pct' # option B: reverse-index (one call, sorted) curl -sH "$H" "https://genka.dev/latest/companies/HDFCBANK/holders?limit=20" | jq '.data[:10]'
Option B gives you the consolidated view: every fund holding HDFCBANK with weight + as_of. Multiply each weight by your INR allocation in that fund, sum across all your funds — that's your true HDFCBANK exposure. /holders/summary aggregates across the entire MF universe (n_funds, total_exposure_cr) for context.
4. Is the valuation on my biggest underlying drifting?
Holdings analysis without valuation is half the story. Pull P/E trajectory on the names that dominate your book.
for sym in HDFCBANK ITC RELIANCE; do
curl -sH "$H" "https://genka.dev/latest/companies/$sym/ratios?metric=pe" \
| jq "{sym: \"$sym\", recent: [.data.points[-4:][] | .value]}"
done
Returns the last 4 quarters of P/E per stock. If your top-3 underlying are all expanding multiples while earnings are flat, the fund's NAV is being held up by re-rating, not fundamentals — that's a signal to look at the next entrant rather than averaging up. HINDALCO example: 9.58 → 9.20 → 9.64 → 12.39 (+35% off trough in two quarters).
5. Stale-data guard: when did the disclosure last refresh?
Tickertape coverage is uneven. Some funds got a snap last week, some not since 2024-Q3. Don't recommend on stale.
curl -sH "$H" "https://genka.dev/latest/mf/quant-active/holdings?limit=1" | jq '.data[0] | {as_of, source}'
Returns {as_of, source} — source is one of tickertape | factsheet | mfdata_in | wayback | amc_pdf_*, ranked by reliability via mf_holdings_view. If as_of is >90 days old, treat the holdings as approximate. PPFAS specifically has 124 monthly snapshots from the AMC factsheet PDF parse path — query ?as_of=2022-09-30 to time-travel.
Other workflows: equity research (one stock, deep) · macro watching (FII/DII + concall macro tone) · discovery (find ideas you don't know about yet).