{"openapi":"3.1.0","info":{"title":"Genka","version":"2026-04-25-caracal","description":"Genka — origin price for Indian markets. Primary-source REST API for Nifty 500 fundamentals, ratios, taxonomy-driven comparables, and a growing private-company catalog.\n\n**LLM-friendly overview**: https://genka.dev/llms.txt\n\n**Versioning** — `/latest/*` is the canonical path. Every published version (dated + alphabetical-animal codename, current: `2026-04-25-caracal`) is ALSO addressable at `/{version}/*` forever — e.g. `/2026-04-23-beluga/entities/purplle` keeps working after beluga has been superseded. Additive changes propagate to all versions; a truly breaking change would freeze the affected version.\n\n**Provenance** — every numeric response carries `meta.sources[]` citations. BS-derived ratios carry per-row `bs_source` ∈ {xbrl, screener.in, both_agree, both_disagree, null}. Sparse periods return `value: null` plus `coverage: {total, present, missing}` so you see gaps explicitly.\n\n**Errors** — RFC 7807 `application/problem+json` with structured `code`, `detail`, `instance`, and `request_id`.\n\n**Rate limit** — 600 req/60s per API key. Headers: `X-RateLimit-Limit/Remaining/Reset`, `Retry-After` on 429.\n\n**Pagination** — cursor-based on list routes. Opaque `next_cursor` in `meta.pagination`.\n\n**Field selection** — `?fields=symbol,pe` narrows payload on detail routes.\n**Expand** — `?expand=sector` hydrates relations inline on `/companies/{symbol}`."},"servers":[{"url":"https://genka.dev"}],"components":{"schemas":{"TaxonomyNode":{"type":"object","properties":{"code":{"type":"string"},"parent_code":{"type":["string","null"]},"level":{"$ref":"#/components/schemas/TaxonomyLevel"},"name":{"type":"string"},"n":{"type":"integer"},"path":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyNode"}},"children":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyNode"}},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Entity"}}},"required":["code","parent_code","level","name"]},"TaxonomyLevel":{"type":"string","enum":["industries","sector","sub-sector","industry","sub-industry"]},"Entity":{"type":"object","properties":{"entity_id":{"type":"string"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"name":{"type":"string"},"leaf_code":{"type":"string"},"shared_tag_count":{"type":"integer"},"shared_tags":{"type":"array","items":{"type":"string"}}},"required":["entity_id","entity_type","name","leaf_code"]},"EntityType":{"type":"string","enum":["ticker","private"]},"EntityOverview":{"type":"object","properties":{"entity_id":{"type":"string"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"name":{"type":"string"},"legal_name":{"type":["string","null"]},"isin":{"type":["string","null"]},"cin":{"type":["string","null"]},"leaf_code":{"type":"string"},"status":{"type":"string"},"founded_year":{"type":["integer","null"]},"hq_city":{"type":["string","null"]},"hq_state":{"type":["string","null"]},"website":{"type":["string","null"]},"business_model":{"type":["string","null"]},"stage":{"type":["string","null"]},"listing_date":{"type":["string","null"]},"listed_ticker":{"type":["string","null"]},"acquired_by":{"type":["string","null"]},"founders_csv":{"type":["string","null"]},"notes":{"type":["string","null"]},"taxonomy_path":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyNode"}},"peers":{"type":"array","items":{"$ref":"#/components/schemas/Entity"}},"peer_level":{"$ref":"#/components/schemas/TaxonomyLevel"},"brands":{"type":"array","items":{"$ref":"#/components/schemas/Brand"}},"funding_rounds":{"type":"array","items":{"$ref":"#/components/schemas/FundingRound"}},"revenue_history":{"type":"array","items":{"$ref":"#/components/schemas/RevenuePoint"}},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}},"required":["entity_id","entity_type","name","legal_name","isin","cin","leaf_code","status","founded_year","hq_city","hq_state","website","business_model","stage","listing_date","listed_ticker","acquired_by","founders_csv","notes","taxonomy_path","peers","peer_level","brands","funding_rounds","revenue_history","tags"]},"Brand":{"type":"object","properties":{"brand":{"type":"string"},"category":{"type":["string","null"]},"leaf_code":{"type":["string","null"]}},"required":["brand","category","leaf_code"]},"FundingRound":{"type":"object","properties":{"round_date":{"type":"string"},"round_name":{"type":"string"},"amount_inr_cr":{"type":["number","null"]},"amount_usd_mn":{"type":["number","null"]},"lead_investor":{"type":["string","null"]}},"required":["round_date","round_name","amount_inr_cr","amount_usd_mn","lead_investor"]},"RevenuePoint":{"type":"object","properties":{"fy":{"type":"string"},"revenue_cr":{"type":["number","null"]},"pat_cr":{"type":["number","null"]},"ebitda_cr":{"type":["number","null"]}},"required":["fy","revenue_cr","pat_cr","ebitda_cr"]},"Tag":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"kind":{"$ref":"#/components/schemas/TagKind"},"description":{"type":["string","null"]},"n":{"type":"integer"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Entity"}}},"required":["slug","name","kind"]},"TagKind":{"type":"string","enum":["theme","index","group","lifecycle","ownership","thesis","sub-leaf"]}},"parameters":{}},"paths":{"/latest/health":{"get":{"tags":["meta"],"summary":"Liveness + dataset heartbeat. No auth, no rate limit.","operationId":"get_GetHealth","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"dataset":{},"sources":{"type":"array","items":{}}},"required":["ok","sources"]}}}}}}},"/latest/meta":{"get":{"tags":["meta"],"summary":"Dataset metadata: date range, sector counts, source citations.","operationId":"get_GetMeta","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["meta"]}}}}}}},"/latest/companies":{"get":{"tags":["companies"],"summary":"List Nifty 500 constituents with cursor pagination.","operationId":"get_GetCompanies","parameters":[{"schema":{"type":"string","description":"opaque pagination cursor"},"required":false,"description":"opaque pagination cursor","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"comma-separated fields to include"},"required":false,"description":"comma-separated fields to include","name":"fields","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"company":{"type":"string"},"industry":{"type":["string","null"]},"isin":{"type":["string","null"]}},"required":["symbol","company"]}},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/companies/{symbol}":{"get":{"tags":["companies"],"summary":"Company profile. `?expand=sector` hydrates the sector block.","operationId":"get_GetCompany","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":true,"name":"symbol","in":"path"},{"schema":{"type":"string","description":"comma-separated fields to include"},"required":false,"description":"comma-separated fields to include","name":"fields","in":"query"},{"schema":{"type":"string","description":"comma-separated relations to hydrate"},"required":false,"description":"comma-separated relations to hydrate","name":"expand","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string"},"company":{"type":"string"},"industry":{"type":["string","null"]},"isin":{"type":["string","null"]},"brands":{"type":"array","items":{"type":"object","properties":{"brand":{"type":"string"},"category":{"type":"string"}},"required":["brand"]}},"sector":{"type":"object","properties":{"sector":{"type":"string"},"slug":{"type":"string"}},"required":["sector","slug"],"description":"only populated when ?expand=sector"}},"required":["symbol","company"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"404":{"description":"not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/companies/{symbol}/coverage":{"get":{"tags":["companies"],"summary":"Which metrics/periods are populated for this symbol.","operationId":"get_GetCoverage","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":true,"name":"symbol","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string"},"coverage":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string"},"n":{"type":"integer"},"first":{"type":"string"},"last":{"type":"string"},"sources":{"type":"array","items":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]}}},"required":["metric","n","first","last","sources"]}}},"required":["symbol","coverage"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/companies/{symbol}/filings":{"get":{"tags":["companies"],"summary":"XBRL filing download URLs for this symbol.","operationId":"get_GetFilings","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":true,"name":"symbol","in":"path"},{"schema":{"type":"string","enum":["Consolidated","Non-Consolidated","Standalone"],"default":"Consolidated"},"required":false,"name":"consolidated","in":"query"},{"schema":{"type":"string"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string"},"filings":{"type":"array","items":{"type":"object","properties":{"period_end":{"type":"string"},"consolidated":{"type":"string","enum":["Consolidated","Non-Consolidated","Standalone"]},"source":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"xbrl_url":{"type":"string"},"filing_date":{"type":["string","null"]}},"required":["period_end","consolidated","source","xbrl_url","filing_date"]}}},"required":["symbol","filings"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/companies/{symbol}/income-statements":{"get":{"tags":["companies"],"summary":"income-statement time series (wide form, one row per period).","operationId":"get_latest_companies_symbol_income-statements","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":true,"name":"symbol","in":"path"},{"schema":{"type":"string","enum":["Consolidated","Non-Consolidated","Standalone"],"default":"Consolidated"},"required":false,"name":"consolidated","in":"query"},{"schema":{"type":"string"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string"},"statement":{"type":"string"},"consolidated":{"type":"string","enum":["Consolidated","Non-Consolidated","Standalone"]},"points":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}]}}}},"required":["symbol","statement","consolidated","points"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/companies/{symbol}/balance-sheets":{"get":{"tags":["companies"],"summary":"balance-sheet time series (wide form, one row per period).","operationId":"get_latest_companies_symbol_balance-sheets","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":true,"name":"symbol","in":"path"},{"schema":{"type":"string","enum":["Consolidated","Non-Consolidated","Standalone"],"default":"Consolidated"},"required":false,"name":"consolidated","in":"query"},{"schema":{"type":"string"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string"},"statement":{"type":"string"},"consolidated":{"type":"string","enum":["Consolidated","Non-Consolidated","Standalone"]},"points":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}]}}}},"required":["symbol","statement","consolidated","points"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/companies/{symbol}/cash-flow-statements":{"get":{"tags":["companies"],"summary":"cash-flow time series (wide form, one row per period).","operationId":"get_latest_companies_symbol_cash-flow-statements","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":true,"name":"symbol","in":"path"},{"schema":{"type":"string","enum":["Consolidated","Non-Consolidated","Standalone"],"default":"Consolidated"},"required":false,"name":"consolidated","in":"query"},{"schema":{"type":"string"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string"},"statement":{"type":"string"},"consolidated":{"type":"string","enum":["Consolidated","Non-Consolidated","Standalone"]},"points":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}]}}}},"required":["symbol","statement","consolidated","points"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/companies/{symbol}/ratios":{"get":{"tags":["ratios"],"summary":"Single-metric ratio series. Returns every period in range; missing values are null.","operationId":"get_GetRatios","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":true,"name":"symbol","in":"path"},{"schema":{"type":"string","enum":["pe","p_s","p_b","ev_ebitda","ev_ebitda_approx","roe","roce","mcap_cr","ebitda_ttm","revenue_ttm","pat_ttm"],"default":"pe"},"required":false,"name":"metric","in":"query"},{"schema":{"type":"string","default":"2014-01-01"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","default":"2030-01-01"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string"},"metric":{"type":"string","enum":["pe","p_s","p_b","ev_ebitda","ev_ebitda_approx","roe","roce","mcap_cr","ebitda_ttm","revenue_ttm","pat_ttm"]},"consolidated":{"type":"string","enum":["Consolidated","Non-Consolidated","Standalone"]},"points":{"type":"array","items":{"type":"object","properties":{"period_end":{"type":"string"},"value":{"type":["number","null"]},"bs_source":{"type":["string","null"],"enum":["xbrl","screener.in","both_agree","both_disagree",null]},"borrowings_diff_pct":{"type":["number","null"]},"equity_diff_pct":{"type":["number","null"]}},"required":["period_end","value"]}},"coverage":{"type":"object","properties":{"total":{"type":"integer"},"present":{"type":"integer"},"missing":{"type":"integer"}},"required":["total","present","missing"]}},"required":["symbol","metric","consolidated","points","coverage"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/prices":{"get":{"tags":["prices"],"summary":"Daily share prices from NSE bhavcopy: per-symbol close, volume, traded_value, isin.","description":"Returns daily OHLCV rows from the NSE bhavcopy: open, high, low, close, last, prev_close, volume, traded_value, isin per (symbol, trade_date). Coverage: 1995-01-02 -> today across ~7,750 trading days for every NSE EQ/BE/BZ/SM symbol; daily refresh via cron at 13:15 UTC. For quarter-end valuation ratios (PE, EV/EBITDA, ROE, mcap_cr, ...) use `/companies/{symbol}/ratios`.","operationId":"get_GetPrices","parameters":[{"schema":{"type":"string","description":"comma-separated symbols (max 50)"},"required":true,"description":"comma-separated symbols (max 50)","name":"symbols","in":"query"},{"schema":{"type":"string","description":"ISO date (default: 30 days ago)"},"required":false,"description":"ISO date (default: 30 days ago)","name":"from","in":"query"},{"schema":{"type":"string","description":"ISO date (default: today)"},"required":false,"description":"ISO date (default: today)","name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50,"description":"Caps row count. Default 100."},"required":false,"description":"Caps row count. Default 100.","name":"limit","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbols":{"type":"array","items":{"type":"string"}},"metrics":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"}]}}}},"required":["symbols","metrics","rows"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"400":{"description":"bad request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/companies/{symbol}/recent":{"get":{"tags":["companies"],"summary":"Pre-computed indicator panel for a stock: latest close, returns, DMAs, 52w/all-time hi/lo, volume averages, RSI, MACD, Bollinger, ATR.","description":"Single-row snapshot. Refreshed daily at 13:45 UTC after the bhavcopy lands. Returns are simple price ratios (latest/start - 1) at trading-day windows: 1d=1, 1w=5, 1m=21, 3m=63, 6m=126, 1y=252, 3y=756, 5y=1260, si=since first trade. DMAs are SMA on close. _prev variants use close[1..N+1] so callers can detect 50/200 crossovers without re-pulling prices. RSI is Wilder(14); MACD is EMA(12)-EMA(26) with EMA(9) signal; Bollinger is SMA(20) +/- 2 sigma; ATR is Wilder(14) on True Range. **Important**: all values are computed on the **unadjusted** NSE bhavcopy close, matching the source-of-truth tape. Multi-year returns (1y, 3y, 5y, si) are NOT split/bonus-adjusted -- a 1:1 bonus shows up as a -50% jump. Short-window indicators (RSI, MACD, Bollinger, ATR, dma_50, return_<=6m) are unaffected since corp actions inside a rolling window are rare. Reach for /companies/{symbol}/ratios when you need total-return / corp-action-adjusted analytics.","operationId":"get_GetCompanyRecent","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":true,"name":"symbol","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"404":{"description":"no recent row","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/companies/{symbol}/corp-actions":{"get":{"tags":["companies"],"summary":"Corporate actions filed with NSE for a stock: splits, bonuses, dividends, rights, buybacks, mergers.","description":"Sourced from NSE's official corporate-actions feed. Returned newest-first by ex_date. For splits and bonuses we expose a numeric `factor` -- a historical price BEFORE `ex_date` should be DIVIDED by `factor` to compare apples-to-apples with prices on/after `ex_date`. For rights we expose the N:M ratio + premium so callers can compute TERP themselves. For dividends we expose the per-share amount when NSE files it as Rs/Re; percent-of-face-value notations are kept as raw `subject` only.","operationId":"get_GetCompanyCorpActions","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":true,"name":"symbol","in":"path"},{"schema":{"type":"string","enum":["split","bonus","dividend","rights","buyback","merger","meeting","interest","other"]},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","description":"ISO date; restrict to ex_date >= from"},"required":false,"description":"ISO date; restrict to ex_date >= from","name":"from","in":"query"},{"schema":{"type":"string","description":"ISO date; restrict to ex_date <= to"},"required":false,"description":"ISO date; restrict to ex_date <= to","name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"symbol":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"count":{"type":"number"}},"required":["symbol","items","count"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/sectors":{"get":{"tags":["sectors"],"summary":"Sector master list.","operationId":"get_GetSectors","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sectors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"n":{"type":"integer"}},"required":["name","slug","n"]}}},"required":["sectors"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/sectors/{slug}":{"get":{"tags":["sectors"],"summary":"Sector profile. Use `?include=members,aggregate` to hydrate extras.","operationId":"get_GetSector","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":60,"pattern":"^[a-z0-9-]+$"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","description":"comma-separated: members, aggregate"},"required":false,"description":"comma-separated: members, aggregate","name":"include","in":"query"},{"schema":{"type":"string","enum":["pe","p_s","p_b","ev_ebitda","ev_ebitda_approx","roe","roce","mcap_cr","ebitda_ttm","revenue_ttm","pat_ttm"],"default":"ev_ebitda"},"required":false,"name":"metric","in":"query"},{"schema":{"type":"string","default":"2014-01-01"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","default":"2030-01-01"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["meta"]}}}}}}},"/latest/search":{"get":{"tags":["search"],"summary":"Search companies / brands / sectors by query text.","operationId":"get_Search","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"query":{"type":"string"},"count":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"entity_type":{"type":"string","enum":["ticker","private","mf"]},"company":{"type":["string","null"]},"industry":{"type":["string","null"]},"brands_matched":{"type":"array","items":{"type":"string"}},"score":{"type":"number"}},"required":["symbol","company","industry","brands_matched","score"]}}},"required":["query","count","results"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/screener":{"post":{"tags":["screener"],"summary":"Screen market rows at a period_end by filter thresholds.","operationId":"post_Screen","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"object","additionalProperties":{"type":"object","properties":{"op":{"type":"string","enum":["gt","gte","lt","lte","eq","between"]},"value":{"anyOf":[{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["op","value"],"additionalProperties":false}},"sector":{"type":"string"},"period_end":{"type":"string"},"sort":{"type":"object","properties":{"metric":{"type":"string"},"direction":{"type":"string","enum":["asc","desc"],"default":"desc"}},"required":["metric"],"additionalProperties":false},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50}},"additionalProperties":false}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"period_end":{"type":"string"},"filter":{"type":"object","additionalProperties":{}},"results":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"company":{"type":"string"},"industry":{"type":["string","null"]},"period_end":{"type":"string"},"pe":{"type":["number","null"]},"p_s":{"type":["number","null"]},"p_b":{"type":["number","null"]},"ev_ebitda":{"type":["number","null"]},"roe":{"type":["number","null"]},"roce":{"type":["number","null"]},"mcap_cr":{"type":["number","null"]},"bs_source":{"type":["string","null"],"enum":["xbrl","screener.in","both_agree","both_disagree",null]}},"required":["symbol","company","industry","period_end","pe","p_s","p_b","ev_ebitda","roe","roce","mcap_cr"]}}},"required":["period_end","results"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"400":{"description":"bad request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/mf":{"get":{"tags":["mf"],"summary":"List mutual funds with facet filters and cursor pagination.","description":"Returns up to `limit` funds matching the optional facets. When more rows are available, `has_more=true` and `next_cursor` is non-null — pass that string back as `cursor` to fetch the next page.","operationId":"get_GetMfList","parameters":[{"schema":{"type":"string","description":"opaque cursor returned by the previous page"},"required":false,"description":"opaque cursor returned by the previous page","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"exact AMC name, e.g. \"PPFAS Mutual Fund\""},"required":false,"description":"exact AMC name, e.g. \"PPFAS Mutual Fund\"","name":"amc","in":"query"},{"schema":{"type":"string","description":"SEBI category, e.g. \"Equity Scheme - Flexi Cap Fund\""},"required":false,"description":"SEBI category, e.g. \"Equity Scheme - Flexi Cap Fund\"","name":"category","in":"query"},{"schema":{"type":"string","description":"one of /latest/mf/themes (e.g. \"defence\", \"psu\")"},"required":false,"description":"one of /latest/mf/themes (e.g. \"defence\", \"psu\")","name":"theme","in":"query"},{"schema":{"type":"string","description":"one of /latest/mf/factors (e.g. \"momentum\", \"value\")"},"required":false,"description":"one of /latest/mf/factors (e.g. \"momentum\", \"value\")","name":"factor","in":"query"}],"responses":{"200":{"description":"paginated list of funds","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["fund"]},"entity_id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"amc":{"type":"string"},"sebi_category":{"type":"string"},"theme":{"type":["string","null"]},"factor":{"type":["string","null"]},"canonical_scheme_code":{"type":"integer"},"inception_date":{"type":["string","null"]},"status":{"type":"string"},"updated_at":{"type":"string"},"expense_ratio_pct":{"type":["number","null"]},"aum_cr":{"type":["number","null"]},"benchmark_entity_id":{"type":["string","null"]}},"required":["object","entity_id","slug","name","amc","sebi_category","theme","factor","canonical_scheme_code","inception_date","status","updated_at","expense_ratio_pct","aum_cr","benchmark_entity_id"]}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]},"count":{"type":"integer"},"meta":{}},"required":["data","has_more","next_cursor","count"]},"example":{"data":[{"object":"fund","entity_id":"mf-ppfas-parag-parikh-flexi-cap","slug":"ppfas-parag-parikh-flexi-cap","name":"Parag Parikh Flexi Cap Fund - Direct Plan - Growth","amc":"PPFAS Mutual Fund","sebi_category":"Equity Scheme - Flexi Cap Fund","theme":null,"factor":null,"status":"active","canonical_scheme_code":122639,"expense_ratio_pct":null,"aum_cr":null,"benchmark_entity_id":"bm-nifty-500","inception_date":null,"updated_at":"2026-04-25"}],"has_more":true,"next_cursor":"mf-ppfas-parag-parikh-flexi-cap","count":1}}}}}}},"/latest/mf/health":{"get":{"tags":["mf"],"summary":"MF dataset heartbeat: counts + status breakdown + latest NAV/metrics dates + risk-free rate provenance.","operationId":"get_GetMfHealth","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}}}}},"/latest/mf/capabilities":{"get":{"tags":["mf","meta"],"summary":"Discovery: every enumerated dimension an agent might want before calling /search or /screener.","description":"Returns metric names, rolling-stat axis, comparison ops, periods, available themes/factors/AMCs/benchmarks, snapshot date range, and the live pricing tier catalog. Free tier. Cached for 5 min client-side, 1h at the edge.","operationId":"get_GetMfCapabilities","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{}}}}}}}}},"/latest/mf/search":{"get":{"tags":["mf"],"summary":"Two-stage search (BM25 + trigram fallback + synonym rewrite).","operationId":"get_GetMfSearch","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"search results grouped by type","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object":{"type":"string","enum":["search_result"]},"q":{"type":"string"},"expanded_q":{"type":"string"},"stage":{"type":"string","enum":["bm25","trigram"]},"groups":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fund"]},"items":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["fund_hit"]},"entity_id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"amc":{"type":"string"},"sebi_category":{"type":"string"},"theme":{"type":["string","null"]},"rank":{"type":"number"}},"required":["object","entity_id","slug","name","amc","sebi_category","theme","rank"]}}},"required":["type","items"]},{"type":"object","properties":{"type":{"type":"string","enum":["theme"]},"items":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["theme_hit"]},"slug":{"type":"string"},"fund_count":{"type":"integer"}},"required":["object","slug","fund_count"]}}},"required":["type","items"]},{"type":"object","properties":{"type":{"type":"string","enum":["amc"]},"items":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["amc_hit"]},"name":{"type":"string"},"fund_count":{"type":"integer"}},"required":["object","name","fund_count"]}}},"required":["type","items"]},{"type":"object","properties":{"type":{"type":"string","enum":["category"]},"items":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["category_hit"]},"name":{"type":"string"},"fund_count":{"type":"integer"}},"required":["object","name","fund_count"]}}},"required":["type","items"]}]}}},"required":["object","q","expanded_q","stage","groups"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/mf/screener":{"get":{"tags":["mf"],"summary":"Hero — filter + sort funds on any metric × period.","description":"Filter funds by metrics, facets, and a snapshot date. Filter parameters follow the convention `{metric}_{stat}_{op}`:\n\n  • metric: cagr, vol, sharpe, sortino, max_dd, ulcer, upi, calmar, alpha, beta, tracking_error, info_ratio, up_capture, down_capture, r_squared, treynor, var_95, cvar_95, skew, kurt\n  • stat: absolute, rolling_mean, rolling_median, rolling_p25, rolling_p75, rolling_min, rolling_max, rolling_n (rolling_* only valid for the eight base metrics; benchmark + tail-risk are absolute-only)\n  • op: gte, gt, lte, lt, eq\n\nExamples:\n  • `sharpe_absolute_gte=1.0`\n  • `upi_rolling_median_gte=1.5`\n  • `alpha_absolute_gte=0.02&tracking_error_absolute_lte=0.05`\n\n`sort=-col` for descending. `as_of=YYYY-MM-DD` snapshots the screener to the latest computation ≤ that date (defaults to today).","operationId":"get_GetMfScreener","parameters":[{"schema":{"type":"string","enum":["1y","3y","5y","7y","10y","si"],"default":"3y"},"required":false,"name":"period","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"snapshot date; default = today"},"required":false,"description":"snapshot date; default = today","name":"as_of","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string"},"required":false,"name":"theme","in":"query"},{"schema":{"type":"string"},"required":false,"name":"factor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"amc","in":"query"},{"schema":{"type":"string","description":"comma-separated AMC names"},"required":false,"description":"comma-separated AMC names","name":"amc_in","in":"query"},{"schema":{"type":"string","pattern":"^-?[a-z_0-9]+$","description":"metric column; prefix - for descending"},"required":false,"description":"metric column; prefix - for descending","name":"sort","in":"query"},{"schema":{"type":"string","description":"opaque pagination cursor"},"required":false,"description":"opaque pagination cursor","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"ranked screener rows (paginated)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object":{"type":"string","enum":["screener_result"]},"applied_filters":{"type":"object","additionalProperties":{}},"period":{"type":"string","enum":["1y","3y","5y","7y","10y","si"]},"as_of":{"type":"string"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]},"count":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["fund"]},"entity_id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"amc":{"type":"string"},"sebi_category":{"type":"string"},"theme":{"type":["string","null"]},"factor":{"type":["string","null"]},"metrics":{"type":"object","additionalProperties":{"type":["number","null"]}}},"required":["object","entity_id","slug","name","amc","sebi_category","theme","factor","metrics"]}}},"required":["object","applied_filters","period","as_of","has_more","next_cursor","count","items"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]},"example":{"data":{"object":"screener_result","applied_filters":{"period":"3y","as_of":"2026-04-25","category":"Equity Scheme - Flexi Cap Fund","alpha_absolute_gte":"0.02"},"period":"3y","as_of":"2026-04-25","has_more":false,"next_cursor":null,"count":1,"items":[{"object":"fund","entity_id":"mf-ppfas-parag-parikh-flexi-cap","slug":"ppfas-parag-parikh-flexi-cap","name":"Parag Parikh Flexi Cap Fund - Direct Plan - Growth","amc":"PPFAS Mutual Fund","sebi_category":"Equity Scheme - Flexi Cap Fund","theme":null,"factor":null,"metrics":{"alpha_absolute":0.0733,"sharpe_absolute":1.4}}]}}}}},"400":{"description":"invalid filter / sort","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/mf/compare":{"get":{"tags":["mf"],"summary":"Side-by-side NAV + metrics for multiple funds, aligned on common dates.","operationId":"get_GetMfCompare","parameters":[{"schema":{"type":"string","description":"comma-separated fund slugs"},"required":true,"description":"comma-separated fund slugs","name":"ids","in":"query"},{"schema":{"type":"string"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","description":"comma-separated metric names"},"required":false,"description":"comma-separated metric names","name":"metric","in":"query"},{"schema":{"type":"string","enum":["1y","3y","5y","7y","10y","si"],"default":"3y"},"required":false,"name":"period","in":"query"}],"responses":{"200":{"description":"aligned series + metrics","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object":{"type":"string","enum":["compare_result"]},"ids":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"to":{"type":"string"},"period":{"type":"string","enum":["1y","3y","5y","7y","10y","si"]},"nav":{"type":"array","items":{"type":"object","additionalProperties":{}}},"rebased_100":{"type":"array","items":{"type":"object","additionalProperties":{}}},"metrics":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":["number","null"]}}}},"required":["object","ids","from","to","period","nav","rebased_100","metrics"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/mf/amcs":{"get":{"tags":["mf"],"summary":"AMC facet list with fund counts.","operationId":"get_GetMfAmcs","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}}}}},"/latest/mf/themes":{"get":{"tags":["mf"],"summary":"Theme facet list with fund counts.","operationId":"get_GetMfThemes","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}}}}},"/latest/mf/categories":{"get":{"tags":["mf"],"summary":"SEBI category facet list with fund counts.","operationId":"get_GetMfCategories","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}}}}},"/latest/mf/snapshot/latest":{"get":{"tags":["mf"],"summary":"Bulk JSONL dump of every active fund's latest NAV (Direct Growth).","description":"Streams one JSON object per line. Use for nightly client-side mirrors; the daily delta is implicit because rows are keyed by `entity_id` and you can re-pull and overwrite. Each object includes `object: \"fund_nav_latest\"`.","operationId":"get_GetMfSnapshotLatest","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}}}}},"/latest/mf/portfolio/analyze":{"post":{"tags":["mf"],"summary":"Weighted-blend portfolio analysis. Returns blended absolute metrics (cagr, vol, sharpe, sortino, max_dd, ...), per-holding rows, and exposure breakdowns by AMC, SEBI category, and theme. Weights are value_cr / sum(value_cr); nulls are dropped before averaging so a fund missing one metric does not poison the others.","operationId":"post_PostMfPortfolioAnalyze","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"holdings":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":100},"value_cr":{"type":"number","exclusiveMinimum":0,"maximum":1000000}},"required":["slug","value_cr"]},"minItems":1,"maxItems":50},"period":{"type":"string","enum":["1y","3y","5y","7y","10y","si"]},"as_of":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["holdings"]}}}},"responses":{"200":{"description":"portfolio analysis","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["meta"]}}}},"400":{"description":"bad request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}},"404":{"description":"fund not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/mf/backtest":{"post":{"tags":["mf"],"summary":"Multi-fund portfolio backtest. Buys at `from` and rebalances at the chosen cadence (none|monthly|quarterly|annual) until `to`. Returns CAGR/vol/Sharpe/max_dd/total_return + monthly returns. include_inactive=false skips funds whose status != 'active' at as_of=to; the response always echoes inactive_funds_used so survivorship bias is auditable.","operationId":"post_PostMfBacktest","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"allocation":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":100},"weight":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["slug","weight"]},"minItems":1,"maxItems":20},"rebalance":{"type":"string","enum":["none","monthly","quarterly","annual"],"default":"none"},"initial_capital":{"type":"number","exclusiveMinimum":0,"maximum":1000000000,"default":100000},"benchmark":{"type":"string"},"include_inactive":{"type":"boolean","default":true}},"required":["from","to","allocation"]}}}},"responses":{"200":{"description":"backtest result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["meta"]}}}},"400":{"description":"bad request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}},"404":{"description":"fund not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/mf/{slug}":{"get":{"tags":["mf"],"summary":"Single-fund detail. Slug = entity_id minus the 'mf-' prefix. ?expand[]=metrics,holdings,plans,nav hydrates inline so an LLM agent can pull everything in one round-trip.","operationId":"get_GetMfDetail","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":128,"pattern":"^[a-z0-9-]+$","description":"Fund slug (entity_id without the mf- prefix)"},"required":true,"description":"Fund slug (entity_id without the mf- prefix)","name":"slug","in":"path"},{"schema":{"anyOf":[{"type":"array","items":{"type":"string","enum":["metrics","holdings","plans","nav"]}},{"type":"string"}]},"required":false,"name":"expand","in":"query"},{"schema":{"type":"string","enum":["1y","3y","5y","7y","10y","si"]},"required":false,"name":"period","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"as_of","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"nav_from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"nav_to","in":"query"},{"schema":{"type":"string","enum":["daily","weekly","monthly"]},"required":false,"name":"nav_freq","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500},"required":false,"name":"holdings_limit","in":"query"}],"responses":{"200":{"description":"fund detail (optionally with expanded relations)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object":{"type":"string","enum":["fund"]},"entity_id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"amc":{"type":"string"},"sebi_category":{"type":"string"},"theme":{"type":["string","null"]},"factor":{"type":["string","null"]},"canonical_scheme_code":{"type":"integer"},"inception_date":{"type":["string","null"]},"status":{"type":"string"},"updated_at":{"type":"string"},"expense_ratio_pct":{"type":["number","null"]},"aum_cr":{"type":["number","null"]},"benchmark_entity_id":{"type":["string","null"]}},"required":["object","entity_id","slug","name","amc","sebi_category","theme","factor","canonical_scheme_code","inception_date","status","updated_at","expense_ratio_pct","aum_cr","benchmark_entity_id"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/mf/{slug}/nav":{"get":{"tags":["mf"],"summary":"NAV series for a fund (Direct Growth plan by default).","operationId":"get_GetMfNav","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":128,"pattern":"^[a-z0-9-]+$","description":"Fund slug (entity_id without the mf- prefix)"},"required":true,"description":"Fund slug (entity_id without the mf- prefix)","name":"slug","in":"path"},{"schema":{"type":"string"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","enum":["daily","weekly","monthly"],"default":"daily"},"required":false,"name":"freq","in":"query"}],"responses":{"200":{"description":"NAV series","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["nav_point"]},"date":{"type":"string"},"nav":{"type":"number"}},"required":["object","date","nav"]}},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/mf/{slug}/metrics":{"get":{"tags":["mf"],"summary":"Computed risk metrics for a fund — all periods or one. Time-travel via ?as_of=YYYY-MM-DD (defaults to today; returns the latest snapshot ≤ as_of).","operationId":"get_GetMfMetrics","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":128,"pattern":"^[a-z0-9-]+$","description":"Fund slug (entity_id without the mf- prefix)"},"required":true,"description":"Fund slug (entity_id without the mf- prefix)","name":"slug","in":"path"},{"schema":{"type":"string","enum":["1y","3y","5y","7y","10y","si"]},"required":false,"name":"period","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"as_of","in":"query"}],"responses":{"200":{"description":"metrics","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["metrics_snapshot"]},"entity_id":{"type":"string"},"period":{"type":"string","enum":["1y","3y","5y","7y","10y","si"]},"as_of":{"type":"string"},"updated_at":{"type":"string"},"metrics":{"type":"object","properties":{"cagr":{"type":"object","properties":{"absolute":{"type":["number","null"]},"rolling":{"type":["object","null"],"properties":{"mean":{"type":["number","null"]},"median":{"type":["number","null"]},"p25":{"type":["number","null"]},"p75":{"type":["number","null"]},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"n":{"type":["integer","null"]}},"required":["mean","median","p25","p75","min","max","n"]}},"required":["absolute","rolling"]},"vol":{"type":"object","properties":{"absolute":{"type":["number","null"]},"rolling":{"type":["object","null"],"properties":{"mean":{"type":["number","null"]},"median":{"type":["number","null"]},"p25":{"type":["number","null"]},"p75":{"type":["number","null"]},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"n":{"type":["integer","null"]}},"required":["mean","median","p25","p75","min","max","n"]}},"required":["absolute","rolling"]},"sharpe":{"type":"object","properties":{"absolute":{"type":["number","null"]},"rolling":{"type":["object","null"],"properties":{"mean":{"type":["number","null"]},"median":{"type":["number","null"]},"p25":{"type":["number","null"]},"p75":{"type":["number","null"]},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"n":{"type":["integer","null"]}},"required":["mean","median","p25","p75","min","max","n"]}},"required":["absolute","rolling"]},"sortino":{"type":"object","properties":{"absolute":{"type":["number","null"]},"rolling":{"type":["object","null"],"properties":{"mean":{"type":["number","null"]},"median":{"type":["number","null"]},"p25":{"type":["number","null"]},"p75":{"type":["number","null"]},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"n":{"type":["integer","null"]}},"required":["mean","median","p25","p75","min","max","n"]}},"required":["absolute","rolling"]},"max_dd":{"type":"object","properties":{"absolute":{"type":["number","null"]},"rolling":{"type":["object","null"],"properties":{"mean":{"type":["number","null"]},"median":{"type":["number","null"]},"p25":{"type":["number","null"]},"p75":{"type":["number","null"]},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"n":{"type":["integer","null"]}},"required":["mean","median","p25","p75","min","max","n"]}},"required":["absolute","rolling"]},"ulcer":{"type":"object","properties":{"absolute":{"type":["number","null"]},"rolling":{"type":["object","null"],"properties":{"mean":{"type":["number","null"]},"median":{"type":["number","null"]},"p25":{"type":["number","null"]},"p75":{"type":["number","null"]},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"n":{"type":["integer","null"]}},"required":["mean","median","p25","p75","min","max","n"]}},"required":["absolute","rolling"]},"upi":{"type":"object","properties":{"absolute":{"type":["number","null"]},"rolling":{"type":["object","null"],"properties":{"mean":{"type":["number","null"]},"median":{"type":["number","null"]},"p25":{"type":["number","null"]},"p75":{"type":["number","null"]},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"n":{"type":["integer","null"]}},"required":["mean","median","p25","p75","min","max","n"]}},"required":["absolute","rolling"]},"calmar":{"type":"object","properties":{"absolute":{"type":["number","null"]},"rolling":{"type":["object","null"],"properties":{"mean":{"type":["number","null"]},"median":{"type":["number","null"]},"p25":{"type":["number","null"]},"p75":{"type":["number","null"]},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"n":{"type":["integer","null"]}},"required":["mean","median","p25","p75","min","max","n"]}},"required":["absolute","rolling"]}}},"benchmark":{"type":"object","additionalProperties":{"type":["number","null"]}},"tail_risk":{"type":"object","additionalProperties":{"type":["number","null"]}}},"required":["object","entity_id","period","as_of","updated_at","metrics","benchmark","tail_risk"]}},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/mf/{slug}/plans":{"get":{"tags":["mf"],"summary":"Plan variants (Direct/Regular × Growth/IDCW) with scheme_codes and ISINs.","operationId":"get_GetMfPlans","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":128,"pattern":"^[a-z0-9-]+$","description":"Fund slug (entity_id without the mf- prefix)"},"required":true,"description":"Fund slug (entity_id without the mf- prefix)","name":"slug","in":"path"}],"responses":{"200":{"description":"plans","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["plan"]},"scheme_code":{"type":"integer"},"entity_id":{"type":"string"},"isin_growth":{"type":["string","null"]},"isin_reinv":{"type":["string","null"]},"name":{"type":"string"},"plan":{"type":"string"},"option":{"type":"string"},"status":{"type":"string"}},"required":["object","scheme_code","entity_id","isin_growth","isin_reinv","name","plan","option","status"]}},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/mf/{slug}/sip":{"get":{"tags":["mf"],"summary":"Monthly SIP simulation. Buys monthly_amount worth of units on the first trading day of each calendar month between from and to, then values the position at the last NAV in the window. Returns total_invested, current_value, units, absolute_return, XIRR, and the per-month schedule.","operationId":"get_GetMfSip","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":128,"pattern":"^[a-z0-9-]+$","description":"Fund slug (entity_id without the mf- prefix)"},"required":true,"description":"Fund slug (entity_id without the mf- prefix)","name":"slug","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":true,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":100,"maximum":10000000},"required":true,"name":"monthly_amount","in":"query"},{"schema":{"type":["boolean","null"],"default":false},"required":false,"name":"include_schedule","in":"query"}],"responses":{"200":{"description":"sip result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["meta"]}}}},"400":{"description":"bad request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}},"404":{"description":"not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/mf/{slug}/holdings":{"get":{"tags":["mf"],"summary":"Latest disclosed holdings for a fund. Returns one row per instrument with weight_pct + (ticker, sid) for cross-reference into the equities universe.","operationId":"get_GetMfHoldings","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":128,"pattern":"^[a-z0-9-]+$","description":"Fund slug (entity_id without the mf- prefix)"},"required":true,"description":"Fund slug (entity_id without the mf- prefix)","name":"slug","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"as_of","in":"query"},{"schema":{"type":"string"},"required":false,"name":"asset_class","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"holdings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"404":{"description":"fund not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/mf/{slug}/overlap":{"get":{"tags":["mf"],"summary":"Holdings overlap between two funds. Returns overlap_pct (sum of min weight across shared instruments) plus the per-instrument breakdown so callers can see exactly where the funds collide.","operationId":"get_GetMfOverlap","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":128,"pattern":"^[a-z0-9-]+$","description":"Fund slug (entity_id without the mf- prefix)"},"required":true,"description":"Fund slug (entity_id without the mf- prefix)","name":"slug","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":120},"required":true,"name":"with","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"as_of","in":"query"}],"responses":{"200":{"description":"overlap result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["meta"]}}}},"404":{"description":"fund not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/concalls":{"get":{"tags":["concalls"],"summary":"List concall transcript metadata, paginated.","description":"Returns metadata (symbol, news_dt, kind, chars) across the corpus. Filter by `symbol`, `from`, `to`. Full text available via `/v1/concalls/search` or `/v1/concalls/answer`.","operationId":"get_GetConcalls","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":false,"name":"symbol","in":"query"},{"schema":{"type":"string","description":"YYYY-MM-DD inclusive"},"required":false,"description":"YYYY-MM-DD inclusive","name":"from","in":"query"},{"schema":{"type":"string","description":"YYYY-MM-DD inclusive"},"required":false,"description":"YYYY-MM-DD inclusive","name":"to","in":"query"},{"schema":{"type":"string","enum":["TXN","NSE"]},"required":false,"name":"kind","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"opaque pagination cursor"},"required":false,"description":"opaque pagination cursor","name":"cursor","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"symbol":{"type":"string"},"news_dt":{"type":"string"},"kind":{"type":"string","enum":["TXN","NSE"]},"chars":{"type":"integer"}},"required":["id","symbol","news_dt","kind","chars"]}}},"required":["results"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/concalls/search":{"get":{"tags":["concalls"],"summary":"Full-text search across concall transcripts (SQLite FTS5).","description":"Returns top-K passages matching the query. Use `symbol=X` to restrict to one issuer. Passage snippets are 240-char windows centred on the match; rank is BM25 (lower is better — we invert to score, higher = more relevant).","operationId":"get_ConcallSearch","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":200},"required":true,"name":"q","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"required":false,"name":"symbol","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"query":{"type":"string"},"count":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"transcript id; resolves at GET /v1/concalls/:id"},"symbol":{"type":"string"},"news_dt":{"type":"string"},"kind":{"type":"string","enum":["TXN","NSE"]},"score":{"type":["number","null"]},"snippet":{"type":"string"}},"required":["id","symbol","news_dt","kind","score","snippet"]}}},"required":["query","count","results"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"400":{"description":"bad query","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/concalls/{id}":{"get":{"tags":["concalls"],"summary":"Fetch one concall transcript by id (resolves citation ids).","description":"Returns the full transcript for the given numeric `id`. Citations from `/v1/concalls/search` and `/v1/concalls/answer` carry this id so callers can deep-link from a snippet to its source passage. To list all transcripts for a symbol, use `GET /v1/concalls?symbol=X`.","operationId":"get_GetConcallById","parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"symbol":{"type":"string"},"news_dt":{"type":"string"},"kind":{"type":"string","enum":["TXN","NSE"]},"chars":{"type":"integer"},"text":{"type":"string","description":"full transcript text"}},"required":["id","symbol","news_dt","kind","chars","text"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"404":{"description":"not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/concalls/answer":{"post":{"tags":["concalls"],"summary":"Answer a natural-language question from concall transcripts with citations.","description":"Retrieves top-K passages via FTS5 (optionally restricted to `symbols[]`), forwards them to Claude Haiku via OpenRouter, and returns a cited answer. **Metered billing**: charged at upstream LLM cost × 1.2, no per-call floor and no upfront balance gate -- the deduction happens after the response lands. Response carries `cost.upstream_usd`, `cost.charged_cents`, and `cost.markup` so each call is auditable.","operationId":"post_ConcallAnswer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":4,"maxLength":500},"symbols":{"type":"array","items":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9&\\-]+$"},"maxItems":10,"description":"restrict retrieval to these symbols"},"limit":{"type":"integer","minimum":1,"maximum":20,"default":8,"description":"top-k passages fed to LLM"},"model":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-zA-Z0-9._\\-\\/:]+$","default":"openai/gpt-4o-mini","description":"OpenRouter model slug; caller-selectable at request time. Default is gpt-4o-mini for speed + transparent token cost. Examples: anthropic/claude-haiku-4.5, anthropic/claude-sonnet-4.5, google/gemini-2.5-flash."},"max_tokens":{"type":"integer","minimum":64,"maximum":4096,"default":900,"description":"LLM output cap"}},"required":["question"]}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"transcript id; resolves at GET /v1/concalls/:id"},"symbol":{"type":"string"},"news_dt":{"type":"string"},"kind":{"type":"string","enum":["TXN","NSE"]},"snippet":{"type":"string"}},"required":["id","symbol","news_dt","kind","snippet"]}},"model":{"type":"string"},"tokens_in":{"type":"integer"},"tokens_out":{"type":"integer"},"cost":{"type":"object","properties":{"upstream_usd":{"type":"number","description":"dollar cost OpenRouter charged us (usage.cost, inline)"},"charged_cents":{"type":"number","description":"cents debited from your account (upstream × markup)"},"markup":{"type":"number"}},"required":["upstream_usd","charged_cents","markup"]}},"required":["question","answer","citations","model"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"400":{"description":"bad request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}},"503":{"description":"LLM backend unavailable (e.g. ANTHROPIC_API_KEY not configured)","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/taxonomy":{"get":{"tags":["taxonomy"],"summary":"Top-level sectors with entity counts.","operationId":"get_GetTaxonomyRoot","responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sectors":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyNode"}}},"required":["sectors"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/taxonomy/{code}":{"get":{"tags":["taxonomy"],"summary":"Taxonomy node by code (e.g. IN050103002 for Private Sector Bank).","operationId":"get_GetTaxonomyNode","parameters":[{"schema":{"type":"string","pattern":"^IN\\d{2,9}$"},"required":true,"name":"code","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxonomyNode"},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"404":{"description":"not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/entities/{id}":{"get":{"tags":["entities"],"summary":"Everything about a company in one call. Works for listed (ticker) and private (slug).","operationId":"get_GetEntityOverview","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9\\-_&]+$"},"required":true,"name":"id","in":"path"},{"schema":{"$ref":"#/components/schemas/TaxonomyLevel"},"required":false,"name":"peer_level","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"peer_limit","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntityOverview"},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"404":{"description":"not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}},"/latest/tags":{"get":{"tags":["tags"],"summary":"Browse all tags.","operationId":"get_ListTags","parameters":[{"schema":{"type":"string"},"required":false,"name":"kind","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}},"required":["tags"]},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}}}}},"/latest/tags/{slug}":{"get":{"tags":["tags"],"summary":"Tag with member companies (listed + private).","operationId":"get_GetTag","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9\\-]+$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tag"},"meta":{"type":"object","properties":{"as_of":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["nse_xbrl","sebi_iff","screener.in","nse_bhavcopy","nse_shp","nse_universe","derived"]},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"citation":{"type":"string"},"license":{"type":"string"}},"required":["id","name","url","citation"]}},"pagination":{"type":"object","properties":{"count":{"type":"integer"},"total":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["count","total","has_more","next_cursor"]}},"required":["as_of"]}},"required":["data","meta"]}}}},"404":{"description":"not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"instance":{"type":"string"},"request_id":{"type":"string"}},"required":["type","title","status"]}}}}}}}},"webhooks":{},"meta":{"usage":{"tier":"read","credits_used":1,"credits_remaining":null,"billable":true}}}