Examples All corpora REST reference
Mutual fund + holdings examples
Composed flows for questions that take two or three tools to answer. The single-endpoint syntax lives in /docs/rest/; this page is what to reach for when the question is real.
136,992 holdings rows · 2,094 funds × 1,266 unique tickers (latest snapshot)
Tickertape direct fetch (~97%) + Gemma-27B PDF parse for monthly factsheets where Tickertape is missing (~3%, PPFAS series). No web search at runtime.
export GENKA_API_KEY=imk_live_... H="X-API-Key: $GENKA_API_KEY"
A · Portfolio overlap & concentration
How much do my two commodities funds duplicate each other?
Holding both DSP NRNE and ICICI Pru Commodities. If overlap is >50% I should consolidate into the cheaper one.
curl -sH "$H" "https://genka.dev/latest/mf/dsp-natural-resources-and-new-energy/overlap?with=icici-pru-nifty-commodities-etf"
Returns {overlap_pct, common_count, common_holdings[]}. The ETF disclosure is sparse so this pair shows ~0%; the real answer comes from comparing against funds with disclosed holdings (icici-prudential-commodities-fund when its as_of is recent). Pattern repeats: ppfas-parag-parikh-flexi-cap × hdfc-flexi-cap → ~35% overlap, 27 common names — that's the size you should care about.
What's my total Indian-equity exposure to JINDALSTEL across two funds?
If both funds top-10 hold JINDALSTEL, I'm doubling down without realising. Fold the per-fund weights together.
curl -sH "$H" "https://genka.dev/latest/mf/dsp-natural-resources-and-new-energy/holdings?limit=50" | jq '.data[] | select(.ticker=="JINDALSTEL") | .weight_pct' curl -sH "$H" "https://genka.dev/latest/mf/icici-prudential-commodities-fund/holdings?limit=50" | jq '.data[] | select(.ticker=="JINDALSTEL") | .weight_pct'
DSP NRNE: 8.23% of fund. Multiply by my ₹ in each fund and sum. The reverse-index endpoint (next block) skips the fold entirely.
Which funds hold JINDALSTEL, ranked by conviction?
Instead of querying per-fund, hit the reverse index once.
curl -sH "$H" "https://genka.dev/latest/companies/JINDALSTEL/holders" | jq '.data | sort_by(-.weight_pct) | .[:5]'
Returns each fund + weight + as_of. Sort by weight to find the conviction holders — if the top 3 are 8%+ each, JINDALSTEL is the consensus play in that theme.
B · Subscription gates (don't recommend a fund the user can't buy)
Is this international fund actually open?
Most intl FoFs hit the RBI USD-7B overseas-MF cap and quietly close to new money even while status=active.
curl -sH "$H" "https://genka.dev/latest/mf/nippon-taiwan-equity" | jq '{status, subscription_status, scheme_code}'
subscription_status is the real gate (open|paused|closed|sip_only|lumpsum_only). status only says “the scheme exists”. Always fold the former before recommending.
Find an alternative if my international fund just closed
Nippon India Taiwan stopped accepting SIPs. What's still open in the same theme?
curl -sH "$H" "https://genka.dev/latest/mf/screener?theme=international&limit=20" | jq '.data[] | {slug, name, subscription_status, sharpe_3y: .sharpe_absolute_3y}'
Filter the response client-side to subscription_status=="open" to drop the closed-cap funds. Sort by 3y Sharpe.
C · Composed comparison (find a peer by holdings, not by SEBI category)
What's most similar to PPFAS Flexi Cap by what it actually owns?
SEBI category lumps very different strategies together. Holdings-overlap is the truer similarity metric.
# 1. find candidates in the same SEBI bucket curl -sH "$H" "https://genka.dev/latest/mf/screener?category=Equity%20Scheme%20-%20Flexi%20Cap%20Fund&sort=-sharpe_absolute&period=3y&limit=10" | jq -r '.data[].slug' > flexi.txt # 2. compute overlap of each vs PPFAS, ranked while read s; do pct=$(curl -sH "$H" "https://genka.dev/latest/mf/ppfas-parag-parikh-flexi-cap/overlap?with=$s" | jq -r '.data.overlap_pct') echo "$pct $s" done < flexi.txt | sort -rn | head -5
Two-pass: screener narrows to category, then overlap ranks within. The top result by overlap is often very different from the top by Sharpe alone — that's the discovery.
D · Stale-data guards (don't recommend on a 2024-Q1 snapshot)
How fresh are this fund's disclosed holdings?
Tickertape coverage is uneven. Some funds got a snap last week, some not since 2024-Q3.
curl -sH "$H" "https://genka.dev/latest/mf/quant-active/holdings?limit=1" | jq '.data[0] | {as_of, source}'
If as_of is >90 days old, treat the holdings as approximate. Check before quoting weights at the user.
Backtest with survivorship transparency
Backtests that silently drop merged/closed funds inflate every result.
curl -sH "$H" -X POST -H "Content-Type: application/json" \
-d '{
"from":"2021-04-01",
"to":"2026-04-01",
"allocation":[
{"slug":"ppfas-parag-parikh-flexi-cap","weight":0.6},
{"slug":"quant-active","weight":0.4}
],
"rebalance":"quarterly",
"include_inactive":true,
"initial_capital":1000000
}' \
https://genka.dev/latest/mf/backtest
Response includes inactive_funds_used[] — funds that were alive at from but closed by to. If that array is non-empty, your real-world allocation would have had to switch out, and the headline CAGR overstates a buy-and-hold return.
E · SIP & XIRR (the question users actually ask)
What would my 5-year ₹10K SIP have returned?
curl -sH "$H" "https://genka.dev/latest/mf/ppfas-parag-parikh-flexi-cap/sip?from=2021-04-01&to=2026-04-01&monthly_amount=10000" | jq '{xirr, total_invested, current_value, absolute_return}'
XIRR (not CAGR) is the right metric for a SIP — it weights each installment by time-in-market. Pass include_schedule=true to get the per-month NAV used at purchase if you want to audit.