{"openapi":"3.1.0","info":{"title":"Indian API","description":"\n# 🇮🇳 Indian Financial Market Data\n\nComprehensive data for the Indian stock market, mutual funds, IPOs, commodities, and more through a single, unified REST API.\n\n---\n\n## 🚀 Quick Start\n\n**1. Get your API key** at [indianapi.in](https://indianapi.in)\n\n**2. Set the base URL**\n\n```bash\nhttps://analyst.indianapi.in\n```\n\n**3. Make your first request**\n\n```bash\ncurl -H \"X-API-Key: YOUR_API_KEY\" https://analyst.indianapi.in/stock?name=Reliance\n```\n\nThat's it! You'll get comprehensive company data financials, key metrics, analyst views, shareholding, and more.\n\n---\n\n## 🔐 Authentication\n\nAll endpoints require an **API key** passed via the `X-API-Key` header.\n\n| Header | Value | Required |\n|--------|-------|----------|\n| `X-API-Key` | Your API key | ✅ Yes |\n\n---\n\n## 📊 What's Available\n\n- **🔍 Search & Discovery** — Look up stocks by name/symbol, search industries & mutual funds\n- **📈 Market Overview** — Trending stocks, indices, 52-week highs/lows, most active, price shockers\n- **💰 Live Pricing** — Delayed live pricesbatch prices (NSE & BSE) and 1-day intraday data\n- **🏢 Company Fundamentals** — Corporate actions, credit ratings, conference calls, annual reports, logos\n- **📊 Historical & Financials** — Price charts, quarterly results, balance sheets, cash flows, ratios\n- **🔮 Forecasts & Targets** — Analyst consensus estimates (EPS, Revenue, etc.) and price targets\n- **🏦 Mutual Funds** — Fund categories, NAV history, portfolio holdings\n- **🚀 IPO** — Upcoming, open & listed IPOs with subscription data and SEBI filings\n- **📰 News & Insights** — Market news, company news, and AI-curated financial summaries\n- **🌐 Commodities** — Live MCX futures data (Gold, Silver, Crude Oil, and more)\n\n---\n\n## 📋 Stock & Mutual Fund Lists\n\nBrowse the full list of supported stocks and mutual funds via JSON files. We frequently update this file.\n\n**All Stocks** — `https://analyst.indianapi.in/static/all_stocks.json`\n\n```json\n[\n  {\n    \"bse-code\": \"500247\",\n    \"name\": \"Kotak Mahindra Bank\",\n    \"id\": \"S0003043\",\n    \"nse-code\": \"KOTAKBANK\"\n  },\n  {\n    \"bse-code\": \"532540\",\n    \"name\": \"Tata Consultancy Services\",\n    \"id\": \"S0003051\",\n    \"nse-code\": \"TCS\"\n  }\n]\n```\n\n**All Mutual Funds** — `https://analyst.indianapi.in/static/all_mf.json`\n\n```json\n{\n  \"Debt\": { \"...\" },\n  \"Equity\": { \"...\" },\n  \"Global Fund of Funds\": { \"...\" },\n  \"Hybrid\": { \"...\" },\n  \"Index Funds\": { \"...\" },\n  \"Other\": { \"...\" },\n  \"Solutions Oriented\": { \"...\" }\n}\n```\n\nEach fund entry contains:\n\n| Field | Description |\n|-------|-------------|\n| `id` | Mutual fund ID (e.g., `MF007625`) |\n| `mfName` | Fund name |\n| `lastestNav` | Latest NAV value |\n| `year1Returns` / `year3Returns` / `year5Returns` | Historical returns |\n| `starRating` | Fund star rating |\n| `categoryName` / `subCategoryName` | Classification |\n\n---\n\n## ⚡ Rate Limits & Usage\n\nTrack your API usage with the `/usage` endpoint.\n\n```bash\ncurl -H \"X-API-Key: YOUR_API_KEY\" https://analyst.indianapi.in/usage\n```\n\n---\n\n## 📝 Notes\n\n- All prices are in **INR (₹)** unless otherwise noted\n- Timestamps are in **Indian Standard Time (IST)**\n- Market data may be stale when exchanges are closed\n","version":"2.0.0"},"paths":{"/stock":{"get":{"tags":["🔍 Search & Discovery"],"summary":"Get Stock Details","description":"\nRetrieve **comprehensive company data** including financial statements, key metrics, analyst views, shareholding patterns, corporate actions, and more.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `name` | string | One of these is required | Company name (e.g., `Reliance`, `TCS`, `Infosys`) |\n| `symbol` | string | | NSE/BSE symbol (e.g., `INFY`, `500325`) |\n| `id` | string | | Indian API stock ID (e.g., `S0003032`) |\n\n> **Tip:** You only need to provide **one** of `name`, `symbol`, or `id`.\n\n### Response Fields\n\n| Field | Description |\n|-------|-------------|\n| `companyName` | Full legal name of the company |\n| `industry` | Industry classification |\n| `companyProfile` | Detailed company description, officers, sector info, ISIN |\n| `currentPrice` | Current price on both BSE and NSE |\n| `stockTechnicalData` | Technical indicators and analysis |\n| `percentChange` | Today's percentage change |\n| `yearHigh` / `yearLow` | 52-week high and low prices |\n| `financials` | Revenue, profit, and other financial data |\n| `keyMetrics` | P/E ratio, EPS, market cap, dividend yield, and more |\n| `futureExpiryDates` | F&O contract expiry dates |\n| `futureOverviewData` | Futures market overview |\n| `analystView` | Buy/Sell/Hold recommendations |\n| `recosBar` | Analyst recommendation distribution |\n| `riskMeter` | Company risk assessment |\n| `shareholding` | Promoter, FII, DII, and public shareholding breakdown |\n| `stockCorporateActionData` | Dividends, splits, bonuses |\n| `recentNews` | Latest news articles about the company |\n\n### Example\n\n```\nGET /stock?name=TCS\nGET /stock?symbol=INFY\nGET /stock?id=S0003032\n```\n","operationId":"stock_details_stock_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","title":"Name"}},{"name":"symbol","in":"query","required":false,"schema":{"type":"string","title":"Symbol"}},{"name":"id","in":"query","required":false,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Stock details retrieved successfully","content":{"application/json":{"schema":{},"example":{"companyName":"Tata Consultancy Services","industry":"Software & Programming","companyProfile":{"companyDescription":"Tata Consultancy Services Ltd is an India-based company engaged in providing IT services...","mgIndustry":"Software & Programming","isInId":"INE467B01029"},"currentPrice":{"BSE":3890.5,"NSE":3888.75},"stockTechnicalData":{"...":"technical indicators"},"percentChange":-0.45,"yearHigh":4592.25,"yearLow":3311.8,"financials":{"...":"financial data"},"keyMetrics":{"...":"PE, EPS, market cap etc."},"analystView":{"...":"buy/sell/hold ratings"},"shareholding":{"...":"promoter, FII, DII breakdown"},"recentNews":[{"headline":"...","url":"..."}]}}}},"422":{"description":"Validation Error — no parameter provided","content":{"application/json":{"example":{"error":"Please provide either name, symbol or id"}}}}}}},"/industry_search":{"get":{"tags":["🔍 Search & Discovery"],"summary":"Search by Industry","description":"\nSearch for companies within a specific **industry or sector**. Returns matching stocks with exchange codes, sector classification, and trend analysis.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `query` | string | ✅ | Industry or company search term (e.g.,`Banking`, `Power`, `Tata`) |\n\n### Response Fields\n\nEach result includes:\n\n| Field | Description |\n|-------|-------------|\n| `id` | Indian API stock ID |\n| `commonName` | Company display name |\n| `mgIndustry` | Industry classification |\n| `mgSector` | Sector classification |\n| `stockType` | Security type (Equity, etc.) |\n| `exchangeCodeBse` | BSE script code |\n| `exchangeCodeNsi` | NSE symbol |\n| `activeStockTrends` | Short-term, long-term, and overall trend ratings |\n\n### Example\n\n```\nGET /industry_search?query=Banking\n```\n","operationId":"industry_search_industry_search_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","title":"Query"}}],"responses":{"200":{"description":"Industry search results","content":{"application/json":{"schema":{},"example":[{"id":"S0003051","commonName":"Tata Consultancy Services","mgIndustry":"Software & Programming","mgSector":"Technology","stockType":"Equity","exchangeCodeBse":"532540","exchangeCodeNsi":"TCS","activeStockTrends":{"shortTermTrends":"Bearish","longTermTrends":"Moderately Bearish","overallRating":"Moderately Bearish"}}]}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mutual_fund_search":{"get":{"tags":["🔍 Search & Discovery"],"summary":"Search Mutual Funds","description":"\nSearch for mutual fund schemes by name or keyword. Returns matching schemes with ISIN, scheme type, and category.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `query` | string | ✅ | Mutual fund name or keyword (e.g., `Nippon`, `ELSS`, `SBI Bluechip`) |\n\n### Example\n\n```\nGET /mutual_fund_search?query=Nippon\n```\n","operationId":"mutual_fund_search_mutual_fund_search_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","title":"Query"}}],"responses":{"200":{"description":"Mutual fund search results","content":{"application/json":{"schema":{},"example":[{"id":"MF000063","schemeName":"Nippon India Equity Savings Bonus","isin":"INF204KA1W02","schemeType":"Open Ended Investment Company","categoryId":"MFCAT002"},{"id":"MF000021","schemeName":"Nippon India ELSS Tax Saver Fund Direct Plan","isin":"INF204K01L30","schemeType":"Open Ended Investment Company","categoryId":"MFCAT003"}]}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/1D_intraday_data":{"post":{"tags":["💰 Live Pricing"],"summary":"1-Day Intraday Data","description":"\nFetch **1-day intraday price data** at 5-minute intervals for a given stock. Once the market closes, the data will be updated with 1 minute interval data.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_id` | string | ✅ | Indian API stock ticker ID (e.g., `S0003105`). See `/static/all_stocks.json` for all IDs. |\n\n> **Note:** This is a **POST** endpoint. Timestamps are in IST.\n\n### Response\n\n```json\n[\n  {\n    \"tickerId\": \"S0003105\",\n    \"returnValue\": 3.76,\n    \"values\": [\n      {\"timeStamp\": \"2024-10-18 09:20:00\", \"price\": 544.35},\n      {\"timeStamp\": \"2024-10-18 09:25:00\", \"price\": 548.90}\n    ]\n  }\n]\n```\n\n### Example\n\n```\nPOST /1D_intraday_data?stock_id=S0003105\n```\n","operationId":"one_day_intraday_data_1D_intraday_data_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_id","in":"query","required":true,"schema":{"type":"string","title":"Stock Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/nse_stock_batch_live_price":{"post":{"tags":["💰 Live Pricing"],"summary":"NSE Batch Live Price","description":"\nFetch **delayed live prices** for multiple NSE stocks in a single request.\n\n### Request Body\n\n```json\n{\n  \"stock_symbols\": [\"INFY\", \"TCS\", \"RELIANCE\"]\n}\n```\n\n### Response Fields\n\nFor each stock symbol:\n\n| Field | Description |\n|-------|-------------|\n| `open` / `high` / `low` / `close` | OHLC data |\n| `ltp` | Last Traded Price |\n| `volume` | Total traded volume |\n| `timestamp` | Last trade timestamp |\n| `day_change` / `day_change_percent` | Change from previous close |\n| `total_buy_qty` / `total_sell_qty` | Market depth |\n| `last_trade_qty` / `last_trade_time` | Last trade details |\n\n### Example\n\n```\nPOST /nse_stock_batch_live_price\nBody: {\"stock_symbols\": [\"INFY\", \"TCS\"]}\n```\n","operationId":"fetch_nse_stock_batch_live_price_nse_stock_batch_live_price_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockSymbolList"}}},"required":true},"responses":{"200":{"description":"Batch live prices","content":{"application/json":{"schema":{},"example":{"INFY":{"open":1957.9,"high":1964,"low":1914.1,"close":1952.75,"ltp":1919,"volume":4782119,"timestamp":"2024-10-10 15:59:25","day_change":-33.75,"day_change_percent":-1.73,"total_buy_qty":529,"total_sell_qty":0,"last_trade_qty":1,"last_trade_time":"2024-10-10 15:59:25"},"TCS":{"open":4253.25,"high":4293.85,"low":4198.6,"close":4252.95,"ltp":4227.4,"volume":2378875,"timestamp":"2024-10-10 15:59:42","day_change":-25.55,"day_change_percent":-0.6,"total_buy_qty":250,"total_sell_qty":0}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/bse_stock_batch_live_price":{"post":{"tags":["💰 Live Pricing"],"summary":"BSE Batch Live Price","description":"\nFetch **delayed live prices prices** for multiple BSE stocks in a single request.\n\n### Request Body\n\n```json\n{\n  \"stock_symbols\": [\"532822\", \"543257\"]\n}\n```\n\n> **Note:** BSE stocks use numeric script codes instead of ticker symbols.\n\n### Example\n\n```\nPOST /bse_stock_batch_live_price\nBody: {\"stock_symbols\": [\"532822\", \"543257\"]}\n```\n","operationId":"fetch_bse_stock_batch_live_price_bse_stock_batch_live_price_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockSymbolList"}}},"required":true},"responses":{"200":{"description":"Batch live prices (BSE)","content":{"application/json":{"schema":{},"example":{"532822":{"open":9.25,"high":9.44,"low":9.2,"close":9.19,"ltp":9.32,"volume":26185410,"timestamp":"2024-10-10 15:59:47","day_change":0.13,"day_change_percent":1.41},"543257":{"open":154.05,"high":154.35,"low":151.1,"close":153.55,"ltp":151.45,"volume":1429697,"timestamp":"2024-10-10 15:59:31","day_change":-2.1,"day_change_percent":-1.37}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/get_stock_data":{"get":{"tags":["💰 Live Pricing"],"summary":"Get Live Stock Data","description":"\nFetch **current market data** for a single stock by name — price, volume, OHLC, and change.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Stock name or symbol (e.g., `INFY`, `TCS`, `Reliance`) |\n\n### Response Fields\n\n| Field | Description |\n|-------|-------------|\n| `open` / `high` / `low` / `close` | OHLC data |\n| `ltp` | Last Traded Price |\n| `volume` | Total traded volume |\n| `timestamp` | Last trade timestamp |\n| `day_change` / `day_change_percent` | Change from previous close |\n\n### Example\n\n```\nGET /get_stock_data?stock_name=INFY\n```\n","operationId":"fetch_stock_data_get_stock_data_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":false,"schema":{"type":"string","title":"Stock Name"}},{"name":"name","in":"query","required":false,"schema":{"type":"string","title":"Name"}},{"name":"symbol","in":"query","required":false,"schema":{"type":"string","title":"Symbol"}},{"name":"id","in":"query","required":false,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Live stock data","content":{"application/json":{"schema":{},"example":{"INFY":{"open":1957.9,"high":1964,"low":1914.1,"close":1952.75,"ltp":1919,"volume":4782119,"timestamp":"2024-10-10 15:59:25","day_change":-33.75,"day_change_percent":-1.73}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/indices":{"get":{"tags":["📈 Market Overview"],"summary":"Market Indices","description":"\nFetch **live market indices** data for NSE and BSE — SENSEX, NIFTY 50, Bank Nifty, sectoral indices, and more.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `exchange` | enum | ❌ | Filter by exchange: `NSE` or `BSE`. Omit for both. |\n| `index_type` | enum | ❌ | Filter by type: `POPULAR` (Key Indices) or `SECTOR` (Sectoral Indices) |\n\n### Response Fields\n\n| Field | Description |\n|-------|-------------|\n| `name` | Index name (e.g., SENSEX, NIFTY 50) |\n| `price` | Current index value |\n| `percentChange` | Percentage change |\n| `netChange` | Absolute change |\n| `tickerId` | Internal index ID |\n| `exchangeType` | Exchange (BSE / NSI) |\n| `date` / `time` | Last updated timestamp |\n\n### Examples\n\n```\nGET /indices\nGET /indices?exchange=NSE\nGET /indices?exchange=BSE&index_type=SECTOR\n```\n","operationId":"fetch_indices_data_indices_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"exchange","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ExchangeEnum"},{"type":"null"}],"description":"Filter by exchange type (NSE or BSE)","title":"Exchange"},"description":"Filter by exchange type (NSE or BSE)"},{"name":"index_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/IndexTypeEnum"},{"type":"null"}],"description":"Filter by index type (POPULAR or SECTOR)","title":"Index Type"},"description":"Filter by index type (POPULAR or SECTOR)"}],"responses":{"200":{"description":"Indices data","content":{"application/json":{"schema":{},"example":{"indices":[{"name":"SENSEX","price":"82814.71","percentChange":"0.38","netChange":"316.57","tickerId":"I0001","exchangeType":"BSE","date":"2026-02-20","time":"10:45:08"},{"name":"NIFTY 50","price":"25571.25","percentChange":"0.46","netChange":"116.90","tickerId":"I0002","exchangeType":"NSI","date":"2026-02-20","time":"10:01:21"}]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trending":{"get":{"tags":["📈 Market Overview"],"summary":"Trending Stocks","description":"\nGet the **top gaining** and **top losing** stocks in real-time. Provides a snapshot of the most volatile stocks with comprehensive market data.\n\n### Response Structure\n\n```json\n{\n  \"trending_stocks\": {\n    \"top_gainers\": [...],\n    \"top_losers\": [...]\n  }\n}\n```\n\nEach stock object includes:\n\n| Field | Description |\n|-------|-------------|\n| `ticker_id` | Unique stock identifier |\n| `company_name` | Company display name |\n| `price` | Current trading price |\n| `percent_change` | Percentage change from previous close |\n| `net_change` | Absolute change in price |\n| `bid` / `ask` | Best bid and ask prices |\n| `high` / `low` / `open` / `close` | OHLC data |\n| `low_circuit_limit` / `up_circuit_limit` | Circuit limit prices |\n| `volume` | Total traded volume |\n| `date` / `time` | Last updated timestamp |\n| `bid_size` / `ask_size` | Order book depth |\n| `exchange_type` | Exchange (NSI / BSE) |\n| `lot_size` | Trading lot size |\n| `overall_rating` | Technical trend rating (Bullish, Bearish, Neutral) |\n| `short_term_trends` / `long_term_trends` | Trend indicators |\n| `total_share_outstanding` | Shares outstanding (in Cr) |\n| `year_high` / `year_low` | 52-week high and low |\n| `ric` | Reuters Instrument Code |\n\n> **Note:** Data may return empty when the market is closed.\n\n### Example\n\n```\nGET /trending\n```\n","operationId":"trending_stocks_trending_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"exchange","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ExchangeEnum"},{"type":"null"}],"description":"Optional exchange filter. Defaults to BSE; use NSE for all NSE securities.","title":"Exchange"},"description":"Optional exchange filter. Defaults to BSE; use NSE for all NSE securities."}],"responses":{"200":{"description":"Trending stocks data","content":{"application/json":{"schema":{},"example":{"trending_stocks":{"top_gainers":[{"ticker_id":"S0003057","company_name":"NTPC","price":"382.75","percent_change":"1.94","net_change":"7.30","bid":"0.00","ask":"382.75","high":"385.00","low":"373.55","open":"374.95","low_circuit_limit":"337.95","up_circuit_limit":"412.95","volume":"20774556","date":"2026-02-24","time":"10:20:08","close":"375.45","bid_size":"0.00","ask_size":"26537","exchange_type":"NSI","lot_size":"1.00","overall_rating":"Bullish","short_term_trends":"Bullish","long_term_trends":"Bullish","total_share_outstanding":"969.67","year_low":"306.55","year_high":"376.50","ric":"NTPC.NS"},{"ticker_id":"S0003044","company_name":"Coal India","price":"430.95","percent_change":"1.16","net_change":"4.95","bid":"430.95","ask":"0.00","high":"432.00","low":"422.10","open":"424.00","low_circuit_limit":"383.40","up_circuit_limit":"468.60","volume":"8946076","date":"2026-02-24","time":"10:21:11","close":"426.00","bid_size":"4187","ask_size":"0.00","exchange_type":"NSI","lot_size":"1.00","overall_rating":"Bullish","short_term_trends":"Bullish","long_term_trends":"Bullish","total_share_outstanding":"616.27","year_low":"352.40","year_high":"461.55","ric":"COAL.NS"}],"top_losers":[{"ticker_id":"S0003115","company_name":"Tech Mahindra","price":"1345.40","percent_change":"-6.63","net_change":"-95.50","bid":"1345.40","ask":"0.00","high":"1423.20","low":"1335.30","open":"1420","low_circuit_limit":"1296.90","up_circuit_limit":"1584.90","volume":"7440256","date":"2026-02-24","time":"10:10:46","close":"1440.90","bid_size":"691","ask_size":"0.00","exchange_type":"NSI","lot_size":"1","overall_rating":"Bearish","short_term_trends":"Bearish","long_term_trends":"Bearish","total_share_outstanding":"97.98","year_low":"1209.40","year_high":"1854","ric":"TEML.NS"},{"ticker_id":"S0003045","company_name":"HCL Technologies","price":"1339.20","percent_change":"-6.10","net_change":"-87","bid":"1339.20","ask":"0.00","high":"1406.70","low":"1322.50","open":"1402.30","low_circuit_limit":"1283.60","up_circuit_limit":"1568.80","volume":"10004618","date":"2026-02-24","time":"10:19:35","close":"1426.20","bid_size":"3109","ask_size":"0.00","exchange_type":"NSI","lot_size":"1.00","overall_rating":"Bearish","short_term_trends":"Bearish","long_term_trends":"Bearish","total_share_outstanding":"271.37","year_low":"1302.75","year_high":"1780.10","ric":"HCLT.NS"}]}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fetch_52_week_high_low_data":{"get":{"tags":["📈 Market Overview"],"summary":"52-Week High/Low","description":"\nRetrieve stocks at their **52-week highs and lows** from both BSE and NSE exchanges.\n\n### Response Structure\n\n```json\n{\n  \"BSE_52WeekHighLow\": {\n    \"high52Week\": [...],\n    \"low52Week\": [...]\n  },\n  \"NSE_52WeekHighLow\": {\n    \"high52Week\": [...],\n    \"low52Week\": [...]\n  }\n}\n```\n\nEach stock includes:\n\n| Field | Description |\n|-------|-------------|\n| `tickerId` | Stock identifier |\n| `displayName` | Company name |\n| `price` | Current price |\n| `52_week_high` / `52_week_low` | 52-week high and low |\n| `percentChange` | Day's percentage change |\n| `yearHigh` / `yearLow` | 52-week high and low |\n| `yearHighDate` / `yearLowDate` | Dates of 52-week extremes |\n| `volume` | Traded volume |\n\n> **Note:** Response may return empty lists when the market is closed.\n\n### Example\n\n```\nGET /fetch_52_week_high_low_data\n```\n","operationId":"fetch_52_week_high_low_fetch_52_week_high_low_data_get","responses":{"200":{"description":"52-week high/low stocks","content":{"application/json":{"schema":{},"example":{"BSE_52WeekHighLow":{"high52Week":[{"tickerId":"S0003105","displayName":"Reliance Industries","price":"2850.55","percentChange":"2.35","yearHigh":"2856.15","yearHighDate":"2026-02-20","volume":"12500000"}],"low52Week":[]},"NSE_52WeekHighLow":{"high52Week":["..."],"low52Week":["..."]}}}}}},"security":[{"APIKeyHeader":[]}]}},"/NSE_most_active":{"get":{"tags":["📈 Market Overview"],"summary":"NSE Most Active","description":"\nGet the **most actively traded stocks** on the National Stock Exchange (NSE) ranked by trading volume.\n\n### Response Fields\n\n| Field | Description |\n|-------|-------------|\n| `ticker` | Reuters Instrument Code (e.g., `INFY.NS`) |\n| `company` | Company name |\n| `price` | Current price |\n| `percent_change` / `net_change` | Day's change |\n| `bid` / `ask` | Best bid and ask prices |\n| `high` / `low` / `open` / `close` | OHLC data |\n| `low_circuit_limit` / `up_circuit_limit` | Circuit limit prices |\n| `volume` | Total traded volume |\n| `overall_rating` | Technical trend rating (Bullish, Bearish, Neutral) |\n| `short_term_trend` / `long_term_trend` | Trend indicators |\n| `52_week_high` / `52_week_low` | 52-week high and low |\n\n### Example\n\n```\nGET /NSE_most_active\n```\n","operationId":"NSE_most_active_stocks_NSE_most_active_get","responses":{"200":{"description":"NSE most active stocks","content":{"application/json":{"schema":{},"example":[{"ticker":"ETEA.NS","company":"Eternal","price":254,"percent_change":-5.22,"net_change":-14,"bid":254,"ask":0,"high":264.9,"low":251.8,"open":260,"low_circuit_limit":241.2,"up_circuit_limit":294.8,"volume":76836130,"close":268,"overall_rating":"Bearish","short_term_trend":"Bearish","long_term_trend":"Bearish","52_week_low":194.8,"52_week_high":368.45},{"ticker":"HDBK.NS","company":"HDFC Bank","price":910.5,"percent_change":-1.42,"net_change":-13.1,"bid":910.5,"ask":0,"high":927.95,"low":909.15,"open":927.95,"low_circuit_limit":831.25,"up_circuit_limit":1015.95,"volume":31313890,"close":923.6,"overall_rating":"Bearish","short_term_trend":"Bearish","long_term_trend":"Bearish","52_week_low":828.49,"52_week_high":1020.5}]}}}},"security":[{"APIKeyHeader":[]}]}},"/BSE_most_active":{"get":{"tags":["📈 Market Overview"],"summary":"BSE Most Active","description":"\nGet the **most actively traded stocks** on the Bombay Stock Exchange (BSE) ranked by trading volume.\n\n### Response Fields\n\n| Field | Description |\n|-------|-------------|\n| `ticker` | Reuters Instrument Code (e.g., `500180.BO`) |\n| `company` | Company name |\n| `price` | Current price |\n| `percent_change` / `net_change` | Day's change |\n| `bid` / `ask` | Best bid and ask prices |\n| `high` / `low` / `open` / `close` | OHLC data |\n| `low_circuit_limit` / `up_circuit_limit` | Circuit limit prices |\n| `volume` | Total traded volume |\n| `overall_rating` | Technical trend rating (Bullish, Bearish, Neutral) |\n| `short_term_trend` / `long_term_trend` | Trend indicators |\n| `52_week_high` / `52_week_low` | 52-week high and low |\n\n### Example\n\n```\nGET /BSE_most_active\n```\n","operationId":"BSE_most_active_stocks_BSE_most_active_get","responses":{"200":{"description":"BSE most active stocks","content":{"application/json":{"schema":{},"example":[{"ticker":"ETEA.BO","company":"Eternal","price":253.95,"percent_change":-5.28,"net_change":-14.15,"bid":0,"ask":0,"high":264.75,"low":251.9,"open":260.65,"low_circuit_limit":228.6,"up_circuit_limit":279.3,"volume":7142150,"close":268.1,"overall_rating":"Bearish","short_term_trend":"Bearish","long_term_trend":"Bearish","52_week_low":189.6,"52_week_high":368.4},{"ticker":"YESB.BO","company":"Yes Bank","price":20.82,"percent_change":-0.29,"net_change":-0.06,"bid":0,"ask":0,"high":21,"low":20.61,"open":20.89,"low_circuit_limit":18.74,"up_circuit_limit":22.9,"volume":2371000,"close":20.88,"overall_rating":"Bearish","short_term_trend":"Bearish","long_term_trend":"Bearish","52_week_low":16.02,"52_week_high":24.3}]}}}},"security":[{"APIKeyHeader":[]}]}},"/mutual_funds":{"get":{"tags":["🏦 Mutual Funds"],"summary":"All Mutual Funds","description":"\nBrowse the **complete mutual fund universe** organized by category — Equity, Debt, Hybrid, and more. Each category is further divided into sub-categories (Large Cap, Mid Cap, Small Cap, etc.).\n\n### Response Structure\n\nOrganized hierarchically by asset type and category:\n\n```json\n{\n  \"Equity\": {\n    \"Large Cap\": [{...}],\n    \"Mid Cap\": [{...}]\n  },\n  \"Debt\": {\n    \"Floating Rate\": [{...}]\n  }\n}\n```\n\nEach fund includes:\n\n| Field | Description |\n|-------|-------------|\n| `fund_name` | Fund scheme name |\n| `latest_nav` | Current NAV |\n| `percentage_change` | Today's NAV change % |\n| `asset_size` | AUM in ₹ Cr |\n| `1_month_return` through `5_year_return` | Period returns |\n| `star_rating` | Fund rating (1-5) |\n\n### Example\n\n```\nGET /mutual_funds\n```\n","operationId":"mutual_funds_data_mutual_funds_get","responses":{"200":{"description":"Mutual funds data by category","content":{"application/json":{"schema":{},"example":{"Debt":{"Floating Rate":[{"fund_name":"DSP Floater Fund Regular Growth","latest_nav":13.67,"percentage_change":0.1,"asset_size":449.1,"1_month_return":0.69,"3_month_return":1.07,"6_month_return":2.45,"1_year_return":7.19,"3_year_return":8.08,"star_rating":4}]},"Equity":{"Large Cap":["..."]}}}}}},"security":[{"APIKeyHeader":[]}]}},"/mutual_funds_details":{"get":{"tags":["🏦 Mutual Funds"],"summary":"Mutual Fund Details","description":"\nGet **detailed information** about a specific mutual fund scheme — full fund profile, returns, risk metrics, and fund manager info.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Mutual fund name (e.g., `Axis Floater Fund`) |\n\n> **Note:** Only full fund names are supported currently.\n\n### Example\n\n```\nGET /mutual_funds_details?stock_name=Axis Floater Fund\n```\n","operationId":"get_mutual_fund_details_mutual_funds_details_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ipo":{"get":{"tags":["🚀 IPO"],"summary":"IPO Data","description":"\nGet a list of **upcoming, open, and recently listed IPOs** with basic information.\n\n### Response Fields\n\n| Field | Description |\n|-------|-------------|\n| `symbol` | Trading symbol |\n| `name` | Company name |\n| `status` | IPO status (upcoming, open, listed) |\n| `is_sme` | Whether it's an SME IPO |\n| `min_price` / `max_price` | Price band |\n| `issue_price` | Final issue price |\n| `listing_gains` | Listing day gain/loss % |\n| `bidding_start_date` / `bidding_end_date` | Subscription dates |\n| `listing_date` | Expected listing date |\n| `document_url` | SEBI filing link |\n\n### Example\n\n```\nGET /ipo\n```\n","operationId":"ipo_data_ipo_get","responses":{"200":{"description":"IPO listings","content":{"application/json":{"schema":{},"example":{"upcoming":[{"symbol":"FABINDIA","name":"FabIndia","status":"upcoming","is_sme":false,"additional_text":"Bidding dates yet to be announced","document_url":"https://www.sebi.gov.in/..."}],"listed":["..."],"open":["..."]}}}}},"security":[{"APIKeyHeader":[]}]}},"/ipo/v2":{"get":{"tags":["🚀 IPO"],"summary":"Enhanced IPO Data (v2)","description":"\n`🧪 Beta`\n\nFetch **enhanced IPO data** with more detailed information, filtering by status and issue type.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `status` | string | ✅ | IPO status: `open`, `closed`, `listed`, `upcoming` |\n| `issue_type` | string | ❌ | Filter: `mainboard` or `sme` |\n\n### Response Includes\n\n- **Summary**: Total count, mainboard count, SME count\n- **IPO List**: Detailed data per IPO including ISIN, exchange listing, lot size, face value, issue size, price band, bidding dates, and prospectus links\n\n### Example\n\n```\nGET /ipo/v2?status=upcoming\nGET /ipo/v2?status=open&issue_type=mainboard\n```\n","operationId":"ipo_data_v2_ipo_v2_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"status","in":"query","required":true,"schema":{"type":"string","title":"Status"}},{"name":"issue_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue Type"}}],"responses":{"200":{"description":"Enhanced IPO data","content":{"application/json":{"schema":{},"example":{"summary":{"count":2,"mainboardCount":2,"smeCount":0},"ipos":[{"id":"company-name","name":"Company Name","status":"upcoming","issueType":"Mainboard","industry":"Finance","isin":"INE123456789","minimumPrice":100,"maximumPrice":110,"lotSize":136,"biddingStartDate":"2024-10-28T00:00:00.000","biddingEndDate":"2024-10-30T00:00:00.000"}]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ipo/{id}":{"get":{"tags":["🚀 IPO"],"summary":"IPO Details by ID","description":"\n`🧪 Beta`\n\nGet **comprehensive details** about a specific IPO including pricing, subscription data, timeline, registrar info, and listing performance.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `id` | string | ✅ | IPO identifier (slug format, e.g., `company-name`) |\n\n### Response Includes\n\n- **Basic Info**: Name, symbol, status, industry\n- **Pricing**: Price range, cut-off, face value\n- **Issue Details**: Size, lot size, minimum investment\n- **Timeline**: Bidding dates, allotment, listing date\n- **Subscription Data**: Day-wise subscription ratios by category (Retail, NII, QIB)\n- **Links**: RHP, DRHP, allotment status\n- **Performance**: IPO price vs listing price vs current price\n\n### Example\n\n```\nGET /ipo/company-name\n```\n","operationId":"get_ipo_by_id_ipo__id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logo":{"get":{"tags":["🏢 Company Fundamentals"],"summary":"Company Logo","description":"\nFetch the **company logo** as a base64-encoded image string.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | One required | Company name (e.g., `infosys`) |\n| `mutual_fund` | string | | Mutual fund name |\n\n### Response\n\n```json\n{\n  \"content_type\": \"image/png\",\n  \"base64_image\": \"iVBORw0KGgoAAAANSUhEUg...\"\n}\n```\n\n### Decoding the Image (Python)\n\n```python\nimport base64\n\nimage_data = base64.b64decode(response[\"base64_image\"])\nwith open(\"logo.png\", \"wb\") as f:\n    f.write(image_data)\n```\n\n### Example\n\n```\nGET /logo?stock_name=infosys\nGET /logo?mutual_fund=SBI Bluechip Fund\n```\n","operationId":"logo_data_logo_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Stock Name"}},{"name":"mutual_fund","in":"query","required":false,"schema":{"type":"string","default":"","title":"Mutual Fund"}}],"responses":{"200":{"description":"Logo data as base64","content":{"application/json":{"schema":{},"example":{"content_type":"image/png","base64_image":"iVBORw0KGgoAAAANSUhEUgAAALQ..."}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/news":{"get":{"tags":["📰 News & Insights"],"summary":"Market News","description":"\nGet the latest **stock market news** with pagination support.\n\n### Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `page_no` | int | ❌ | `1` | Page number |\n| `size` | int | ❌ | `20` | Number of articles per page |\n\n### Response Fields\n\n| Field | Description |\n|-------|-------------|\n| `title` | News headline |\n| `summary` | Article summary |\n| `url` | Full article URL |\n| `image_url` | Thumbnail image |\n| `pub_date` | Publication timestamp |\n| `source` | News source |\n| `topics` | Related topics/tags |\n\n### Example\n\n```\nGET /news?page_no=1&size=10\n```\n","operationId":"news_data_news_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"page_no","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page No"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Size"}}],"responses":{"200":{"description":"News articles","content":{"application/json":{"schema":{},"example":[{"title":"India's IT giants are rewriting the services playbook","summary":"Artificial intelligence is triggering a structural reset across the Indian IT services industry...","url":"https://example.com/article","image_url":"https://example.com/image.jpg","pub_date":"2026-02-22T15:48:34","source":"Financial News","topics":["Cost Cutting","Artificial Intelligence"]}]}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/company_news":{"get":{"tags":["📰 News & Insights"],"summary":"Company-Specific News","description":"\nGet the latest **news articles** specific to a company.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Company name or symbol |\n\n### Example\n\n```\nGET /company_news?stock_name=Reliance\n```\n","operationId":"company_news_data_company_news_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/corporate_actions":{"get":{"tags":["🏢 Company Fundamentals"],"summary":"Corporate Actions","description":"\nRetrieve **corporate actions** history for a stock — dividends, stock splits, bonuses, rights issues, and more.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Company name or NSE symbol |\n\n### Example\n\n```\nGET /corporate_actions?stock_name=Infosys\n```\n","operationId":"corporate_actions_data_corporate_actions_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credit_ratings":{"get":{"tags":["🏢 Company Fundamentals"],"summary":"Credit Ratings","description":"\nFetch **credit ratings** assigned to a company by major rating agencies (CRISIL, ICRA, CARE, etc.).\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Company name or NSE symbol |\n\n### Example\n\n```\nGET /credit_ratings?stock_name=Reliance\n```\n","operationId":"credit_ratings_data_credit_ratings_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/concalls":{"get":{"tags":["🏢 Company Fundamentals"],"summary":"Conference Calls","description":"\nGet **conference call transcripts** and recordings for a company's earnings calls.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Company name or NSE symbol |\n\n### Example\n\n```\nGET /concalls?stock_name=TCS\n```\n","operationId":"concalls_data_concalls_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annual_reports":{"get":{"tags":["🏢 Company Fundamentals"],"summary":"Annual Reports","description":"\nDownload links for a company's **annual reports** across multiple years.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Company name or NSE symbol |\n\n### Example\n\n```\nGET /annual_reports?stock_name=HDFC Bank\n```\n","operationId":"annual_reports_data_annual_reports_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents":{"get":{"tags":["🏢 Company Fundamentals"],"summary":"Company Documents","description":"\nAccess all **regulatory filings and documents** for a company — quarterly results, investor presentations, notices, and more.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Company name or NSE symbol |\n\n### Example\n\n```\nGET /documents?stock_name=Wipro\n```\n","operationId":"documents_data_documents_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price_shockers":{"get":{"tags":["📈 Market Overview"],"summary":"Price Shockers","description":"\nIdentify stocks with **significant price deviations** from their average — the biggest movers on both BSE and NSE.\n\n### Response Structure\n\n```json\n{\n  \"BSE_PriceShocker\": [...],\n  \"NSE_PriceShocker\": [...]\n}\n```\n\nEach stock includes `deviation` (% deviation from average price), `averagePrice`, and full market data.\n\n### Example\n\n```\nGET /price_shockers\n```\n","operationId":"price_shockers_data_price_shockers_get","responses":{"200":{"description":"Price shockers data","content":{"application/json":{"schema":{},"example":{"BSE_PriceShocker":[{"tickerId":"S0005103","displayName":"Krishna Institute Of Medical Sciences","price":"693.25","percentChange":"-0.86","averagePrice":"865.54","deviation":"19.91","volume":"5284","shortTermTrends":"Bearish","longTermTrends":"Bearish","overallRating":"Bearish"}],"NSE_PriceShocker":["..."]}}}}},"security":[{"APIKeyHeader":[]}]}},"/historical_data":{"get":{"tags":["📊 Historical & Financials"],"summary":"Historical Price Data","description":"\nFetch **historical price charts** with multiple metrics and time periods. Includes price, 50-DMA, 200-DMA, and volume data.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Company name or NSE symbol |\n| `period` | enum | ✅ | Time period: `1m`, `6m`, `1yr`, `3yr`, `5yr`, `10yr`, `max` |\n| `filter` | enum | ✅ | Data metric to chart |\n\n### Filter Options\n\n| Filter | Description |\n|--------|-------------|\n| `default` | Standard price chart with moving averages |\n| `price` | Price only |\n| `pe` | Price-to-Earnings ratio |\n| `sm` | Sales multiple |\n| `evebitda` | EV/EBITDA ratio |\n| `ptb` | Price-to-Book ratio |\n| `mcs` | Market Cap / Sales |\n\n### Response\n\nReturns an array of datasets, each with metric name, label, and time-series values:\n\n```json\n{\n  \"datasets\": [\n    {\n      \"metric\": \"Price\",\n      \"label\": \"Price on NSE\",\n      \"values\": [[\"2024-06-27\", \"3934.15\"], ...],\n      \"meta\": {\"is_weekly\": false}\n    },\n    {\n      \"metric\": \"DMA50\",\n      \"label\": \"50 DMA\",\n      \"values\": [[\"2024-06-27\", \"3856.07\"], ...]\n    },\n    {\n      \"metric\": \"Volume\",\n      \"label\": \"Volume\",\n      \"values\": [[\"2024-06-27\", 4727409, {\"delivery\": null}], ...]\n    }\n  ]\n}\n```\n\n### Example\n\n```\nGET /historical_data?stock_name=TATAMOTORS&period=1yr&filter=price\n```\n","operationId":"historical_data_historical_data_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}},{"name":"period","in":"query","required":true,"schema":{"$ref":"#/components/schemas/PeriodEnum"}},{"name":"filter","in":"query","required":true,"schema":{"$ref":"#/components/schemas/FilterEnum"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/historical_stats":{"get":{"tags":["📊 Historical & Financials"],"summary":"Historical Financial Stats","description":"\nRetrieve **detailed financial statistics** — quarterly results, P&L statements, balance sheets, cash flows, ratios, and shareholding patterns.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Company name or NSE symbol |\n| `stats` | enum | ✅ | Type of financial data |\n\n### Stats Options\n\n| Value | Description |\n|-------|-------------|\n| `quarter_results` | Quarterly financial results |\n| `yoy_results` | Year-over-year results |\n| `balancesheet` | Balance sheet data |\n| `cashflow` | Cash flow statement |\n| `ratios` | Financial ratios |\n| `profit_loss_stats` | Compounded growth rates and ROE |\n| `all` | All of the above combined |\n\n### Example\n\n```\nGET /historical_stats?stock_name=TCS&stats=quarter_results\nGET /historical_stats?stock_name=INFY&stats=all\n```\n","operationId":"historical_stats_endpoint_historical_stats_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}},{"name":"stats","in":"query","required":true,"schema":{"type":"string","title":"Stats"}}],"responses":{"200":{"description":"Historical stats data","content":{"application/json":{"schema":{},"example":{"Sales":{"Jun 2023":59381,"Sep 2023":59692,"Dec 2023":60583,"Mar 2024":61237},"Expenses":{"Jun 2023":44383,"Sep 2023":43946,"Dec 2023":44195,"Mar 2024":44073},"Operating Profit":{"Jun 2023":14998,"Sep 2023":15746,"Dec 2023":16388,"Mar 2024":17164},"OPM %":{"Jun 2023":25,"Sep 2023":26,"Dec 2023":27,"Mar 2024":28},"Net Profit":{"Jun 2023":11120,"Sep 2023":11380,"Dec 2023":11097,"Mar 2024":12502},"EPS in Rs":{"Jun 2023":30.26,"Sep 2023":31.0,"Dec 2023":30.56,"Mar 2024":34.37}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/statement":{"get":{"tags":["📊 Historical & Financials"],"summary":"Financial Statements","description":"\nGet the **latest financial statement** values for a company — most recent quarter results, TTM, YoY P&L, balance sheet, or cash flow.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Company name or NSE symbol |\n| `stats` | enum | ✅ | Statement type |\n\n### Stats Options\n\n| Value | Returns |\n|-------|---------|\n| `quarter_results` | Latest quarter: Sales, Expenses, OPM, Net Profit, EPS |\n| `ttm_results` | Trailing Twelve Months data |\n| `yoy_results` | Year-over-year comparison |\n| `balancesheet` | Assets, liabilities, share capital, reserves |\n| `cashflow` | Operating, investing, and financing cash flows |\n\n### Example\n\n```\nGET /statement?stock_name=Reliance&stats=quarter_results\n```\n","operationId":"statement_endpoint_statement_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}},{"name":"stats","in":"query","required":true,"schema":{"type":"string","title":"Stats"}}],"responses":{"200":{"description":"Financial statement","content":{"application/json":{"schema":{},"example":{"sales":"62,613","expenses":"45,951","operating_profit":"16,662","opm":"27%","net_profit":"12,105","eps":"33.28"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stock_forecasts":{"get":{"tags":["🔮 Forecasts & Targets"],"summary":"Stock Forecasts","description":"\nRetrieve **analyst consensus forecasts** for a stock across multiple financial measures. Supports filtering by period, data type, and historical snapshots.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_id` | string | ✅ | Stock ticker ID |\n| `measure_code` | enum | ✅ | Financial measure to forecast |\n| `period_type` | enum | ✅ | `Annual` or `Interim` |\n| `data_type` | enum | ✅ | `Actuals` or `Estimates` |\n| `age` | enum | ✅ | Data snapshot age |\n\n### Measure Codes\n\n| Code | Description |\n|------|-------------|\n| `EPS` | Earnings Per Share |\n| `CPS` | Cash Flow per Share |\n| `CPX` | Capital Expenditure |\n| `DPS` | Dividends Per Share |\n| `EBI` | EBIT |\n| `EBT` | EBITDA |\n| `GPS` | EPS - Fully Reported |\n| `GRM` | Gross Margin |\n| `NAV` | Net Asset Value |\n| `NDT` | Net Debt |\n| `NET` | Net Income |\n| `PRE` | Pre-tax Profit |\n| `ROA` | Return on Assets |\n| `ROE` | Return on Equity |\n| `SAL` | Revenue |\n\n### Period Type\n\n| Value | Description |\n|-------|-------------|\n| `Annual` | Full year forecasts |\n| `Interim` | Quarterly/half-yearly |\n\n### Data Type\n\n| Value | Description |\n|-------|-------------|\n| `Actuals` | Reported actual values |\n| `Estimates` | Analyst consensus estimates |\n\n### Age (Snapshot)\n\n| Value | Description |\n|-------|-------------|\n| `Current` | Latest available data |\n| `OneWeekAgo` | Snapshot from 1 week ago |\n| `ThirtyDaysAgo` | Snapshot from 30 days ago |\n| `SixtyDaysAgo` | Snapshot from 60 days ago |\n| `NinetyDaysAgo` | Snapshot from 90 days ago |\n\n### Example\n\n```\nGET /stock_forecasts?stock_id=TCS&measure_code=EPS&period_type=Annual&data_type=Actuals&age=Current\n```\n","operationId":"stock_forecasts_endpoint_stock_forecasts_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_id","in":"query","required":true,"schema":{"type":"string","title":"Stock Id"}},{"name":"measure_code","in":"query","required":true,"schema":{"$ref":"#/components/schemas/MeasureCode"}},{"name":"period_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/PeriodType"}},{"name":"data_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DataType"}},{"name":"age","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DataAge"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stock_target_price":{"get":{"tags":["🔮 Forecasts & Targets"],"summary":"Stock Target Price","description":"\nGet **analyst consensus price targets** for a stock — mean, median, high, low, and number of estimates. Also includes recommendation data (Buy/Hold/Sell distribution).\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_id` | string | ✅ | Stock ticker ID |\n\n### Response Includes\n\n- **Price Target**: Mean, Median, High, Low, Standard Deviation, Number of Estimates\n- **Price Target Snapshots**: Historical targets (1 week, 30/60/90 days ago)\n- **Recommendation**: Mean rating, distribution across 1 (Strong Buy) to 5 (Strong Sell)\n- **Recommendation Snapshots**: Historical recommendation distribution\n\n### Example\n\n```\nGET /stock_target_price?stock_id=TCS\n```\n","operationId":"stock_target_price_endpoint_stock_target_price_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_id","in":"query","required":true,"schema":{"type":"string","title":"Stock Id"}}],"responses":{"200":{"description":"Target price and recommendations","content":{"application/json":{"schema":{},"example":{"priceTarget":{"CurrencyCode":"INR","Mean":4305.17,"High":4800,"Low":3165,"NumberOfEstimates":41,"Median":4400,"StandardDeviation":354.84},"recommendation":{"Mean":2.47,"NumberOfRecommendations":43,"Statistics":{"Statistic":[{"Recommendation":1,"NumberOfAnalysts":6},{"Recommendation":2,"NumberOfAnalysts":20},{"Recommendation":3,"NumberOfAnalysts":10},{"Recommendation":4,"NumberOfAnalysts":5},{"Recommendation":5,"NumberOfAnalysts":2}]}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recent_announcements":{"get":{"tags":["🏢 Company Fundamentals"],"summary":"Recent Announcements","description":"\nGet the latest **stock exchange announcements** filed by a company (board meetings, results declarations, insider trading disclosures, etc.).\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_name` | string | ✅ | Company name or NSE symbol |\n\n### Example\n\n```\nGET /recent_announcements?stock_name=Infosys\n```\n","operationId":"recent_announcements_recent_announcements_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_name","in":"query","required":true,"schema":{"type":"string","title":"Stock Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/commodities":{"get":{"tags":["🌐 Commodities"],"summary":"Commodity Futures","description":"\nGet **live commodity futures data** — Gold, Silver, Crude Oil, Natural Gas, Copper, and more.\n\n### Response Fields\n\n| Field | Description |\n|-------|-------------|\n| `product` | Commodity name (e.g., GOLDPETAL, CRUDEOIL, SILVER) |\n| `expiry` | Contract expiry date |\n| `last_traded_price` | LTP |\n| `open_price` / `high_price` / `low_price` / `close_price` | OHLC data |\n| `total_quantity_traded` | Volume |\n| `open_interest` | OI value |\n| `open_interest_change` | Change in OI |\n| `open_interest_per_change` | OI change % |\n| `change` / `per_change` | Price change and % |\n| `oiResult` | OI analysis (Long Build Up, Short Covering, etc.) |\n| `product_month` | Contract month |\n\n### Example\n\n```\nGET /commodities\n```\n","operationId":"commodities_data_commodities_get","responses":{"200":{"description":"Commodity futures data","content":{"application/json":{"schema":{},"example":[{"product":"GOLDPETAL","expiry":"27 Feb 2026","last_traded_price":"15911.00","open_price":"15899.00","high_price":"15981.00","low_price":"15830.00","close_price":"15912.00","total_quantity_traded":"141195","open_interest":"135911","open_interest_change":-1913.0,"open_interest_per_change":-1.39,"change":-1.0,"per_change":-0.01,"oiResult":"Call Unwinding","product_month":"FEB2026"}]}}}},"security":[{"APIKeyHeader":[]}]}},"/ai_news":{"get":{"tags":["📰 News & Insights"],"summary":"AI-Curated News","description":"\n`🧪 Beta`\n\nGet **AI-curated financial news** categorized by topic. News is processed and summarized using AI for quick consumption.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `category` | string | ❌ | Filter by topic category |\n\n### Categories\n\n| Category | Description |\n|----------|-------------|\n| `stock_market` | Stock market updates |\n| `mutual_funds` | Mutual fund news |\n| `ipo` | IPO announcements and updates |\n| `investing` | General investing insights |\n| `economy` | Economic indicators and policy |\n| `commodities` | Commodity market updates |\n\n> Omit `category` to get all news across all categories.\n\n### Example\n\n```\nGET /ai_news?category=stock_market\nGET /ai_news\n```\n","operationId":"ai_news_data_ai_news_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get_mf_historical_data":{"get":{"tags":["🏦 Mutual Funds"],"summary":"Mutual Fund NAV History","description":"\nFetch **historical NAV data** for a mutual fund scheme over various time periods.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_id` | string | ✅ | Mutual fund ID (e.g., `MF007605`) |\n| `stats` | enum | ✅ | Time period: `5D`, `1M`, `6M`, `1Y`, `5Y`, `MAX` |\n\n### Example\n\n```\nGET /get_mf_historical_data?stock_id=MF007605&stats=1Y\n```\n","operationId":"get_mf_historical_nav_data_get_mf_historical_data_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_id","in":"query","required":true,"schema":{"type":"string","title":"Stock Id"}},{"name":"stats","in":"query","required":true,"schema":{"type":"string","title":"Stats"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mf_holdings":{"get":{"tags":["🏦 Mutual Funds"],"summary":"Mutual Fund Holdings","description":"\nGet the **portfolio holdings** of a mutual fund scheme — the stocks and securities it currently holds, along with allocation percentages.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `stock_id` | string | ✅ | Mutual fund ID (e.g., `MF007605`) |\n\n### Example\n\n```\nGET /mf_holdings?stock_id=MF007605\n```\n","operationId":"mf_holdings_data_mf_holdings_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"stock_id","in":"query","required":true,"schema":{"type":"string","title":"Stock Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ping":{"get":{"tags":["⚙️ Utility"],"summary":"Health Check","description":"\nSimple health check endpoint to verify API availability.\n\n### Example\n\n```\nGET /ping\n```\n\n### Response\n\n```json\n{\"message\": \"Pong!\"}\n```\n","operationId":"ping_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/usage":{"get":{"tags":["⚙️ Utility"],"summary":"API Usage Stats","description":"\nTrack your **API usage** — total requests made, remaining quota, and per-endpoint breakdown.\n\n### Response Fields\n\n| Field | Description |\n|-------|-------------|\n| `total_requests` | Total API calls made with your key |\n| `hard_limit` | Maximum requests allowed |\n| `remaining_requests` | Requests remaining |\n| `endpoint_usage` | Per-endpoint call count |\n\n### Example\n\n```\nGET /usage\n```\n","operationId":"get_usage_usage_get","responses":{"200":{"description":"Usage statistics","content":{"application/json":{"schema":{},"example":{"total_requests":1250,"hard_limit":10000,"remaining_requests":8750,"endpoint_usage":{"/stock":500,"/trending":200,"/news":150,"/indices":400}}}}}},"security":[{"APIKeyHeader":[]}]}}},"components":{"schemas":{"DataAge":{"type":"string","enum":["OneWeekAgo","ThirtyDaysAgo","SixtyDaysAgo","NinetyDaysAgo","Current"],"title":"DataAge"},"DataType":{"type":"string","enum":["Actuals","Estimates"],"title":"DataType"},"ExchangeEnum":{"type":"string","enum":["NSE","BSE"],"title":"ExchangeEnum"},"FilterEnum":{"type":"string","enum":["default","price","pe","sm","evebitda","ptb","mcs"],"title":"FilterEnum"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IndexTypeEnum":{"type":"string","enum":["POPULAR","SECTOR"],"title":"IndexTypeEnum"},"MeasureCode":{"type":"string","enum":["EPS","CPS","CPX","DPS","EBI","EBT","GPS","GRM","NAV","NDT","NET","PRE","ROA","ROE","SAL"],"title":"MeasureCode"},"PeriodEnum":{"type":"string","enum":["1m","6m","1yr","3yr","5yr","10yr","max"],"title":"PeriodEnum"},"PeriodType":{"type":"string","enum":["Annual","Interim"],"title":"PeriodType"},"StockSymbolList":{"properties":{"stock_symbols":{"items":{"type":"string"},"type":"array","title":"Stock Symbols"}},"type":"object","required":["stock_symbols"],"title":"StockSymbolList"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"tags":[{"name":"🔍 Search & Discovery","description":"Look up stocks by name, symbol, or ID. Search across industries and mutual fund schemes."},{"name":"📈 Market Overview","description":"Get a snapshot of the market — trending stocks, indices, 52-week highs/lows, most active stocks, and price shockers."},{"name":"💰 Live Pricing","description":"Fetch delayed live price data and intraday stock prices. Supports batch queries for both NSE and BSE."},{"name":"🏢 Company Fundamentals","description":"Access corporate actions, credit ratings, conference call transcripts, annual reports, regulatory documents, and company logos."},{"name":"📊 Historical & Financials","description":"Retrieve historical price charts, quarterly/yearly results, balance sheets, cash flows, ratios, and shareholding patterns."},{"name":"🔮 Forecasts & Targets","description":"Analyst consensus forecasts (EPS, Revenue, EBITDA, etc.) and price targets with historical snapshots."},{"name":"🏦 Mutual Funds","description":"Browse mutual fund categories, get detailed fund information, NAV history, and portfolio holdings."},{"name":"📰 News & Insights","description":"Latest stock market news, company-specific news, and AI-curated financial insights."},{"name":"🚀 IPO","description":"Track upcoming, open, closed, and listed IPOs with detailed subscription data and prospectus links."},{"name":"🌐 Commodities","description":"Live commodity futures data from MCX — Gold, Silver, Crude Oil, Natural Gas, and more."},{"name":"⚙️ Utility","description":"Health checks and API usage tracking."}]}