$npx -y skills add ajeeshworkspace/indian-trading-skills --skill fii-dii-flow-trackerTrack and analyze FII/DII daily buy/sell flows in Indian markets. Use when user asks about institutional flows, FII selling/buying trends, DII activity, or institutional impact on Nifty/market direction.
| 1 | # FII/DII Flow Tracker |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | This skill tracks Foreign Institutional Investor (FII) and Domestic Institutional Investor (DII) daily buy/sell flows in Indian equity markets and correlates them with Nifty 50 movement. It provides actionable insights on institutional positioning, flow trends, regime changes, and market implications. |
| 6 | |
| 7 | ## When to Use |
| 8 | |
| 9 | Activate this skill when the user asks about: |
| 10 | |
| 11 | - FII or DII daily, weekly, or monthly buy/sell data |
| 12 | - Institutional flow trends and their market impact |
| 13 | - Whether FII are net buyers or net sellers |
| 14 | - DII activity and mutual fund flow support |
| 15 | - Correlation between institutional flows and Nifty direction |
| 16 | - Sector-wise institutional allocation |
| 17 | - Impact of FII flows on INR (Indian Rupee) |
| 18 | - Historical institutional flow patterns during market events |
| 19 | - Flow regime assessment (bullish/bearish/neutral institutional positioning) |
| 20 | |
| 21 | ## Workflow |
| 22 | |
| 23 | Follow these steps in order when the user requests FII/DII flow analysis: |
| 24 | |
| 25 | ### Step 1: Fetch Current FII/DII Flow Data |
| 26 | |
| 27 | Use web search to retrieve the latest FII/DII cash market data from authoritative sources: |
| 28 | |
| 29 | ``` |
| 30 | WebSearch: "FII DII data today {current_date} cash market net buy sell" |
| 31 | WebSearch: "NSDL FII activity {current_month} {current_year}" |
| 32 | WebSearch: "MoneyControl FII DII activity {current_date}" |
| 33 | ``` |
| 34 | |
| 35 | Primary data sources to query: |
| 36 | - **NSDL** (National Securities Depository Limited): Official FII/FPI transaction data |
| 37 | - **NSE** (National Stock Exchange): Daily institutional trading statistics |
| 38 | - **MoneyControl FII/DII page**: Aggregated daily flow data with historical tables |
| 39 | - **CDSL** (Central Depository Services Limited): Supplementary FPI data |
| 40 | - **Trendlyne / Tickertape**: Pre-computed flow summaries and charts |
| 41 | |
| 42 | Extract the following data points: |
| 43 | - FII gross buy value (in crores) |
| 44 | - FII gross sell value (in crores) |
| 45 | - FII net buy/sell value (in crores) |
| 46 | - DII gross buy value (in crores) |
| 47 | - DII gross sell value (in crores) |
| 48 | - DII net buy/sell value (in crores) |
| 49 | - Date of the data |
| 50 | |
| 51 | ### Step 2: Fetch Historical Flow Data for Trend Analysis |
| 52 | |
| 53 | Use web search to gather flow data for the trailing period: |
| 54 | |
| 55 | ``` |
| 56 | WebSearch: "FII DII data last 10 trading days {current_month} {current_year}" |
| 57 | WebSearch: "FII net investment {current_month} {current_year} month to date" |
| 58 | WebSearch: "FII DII yearly data {current_year} year to date" |
| 59 | ``` |
| 60 | |
| 61 | Build a table of the last 10 trading days with daily FII and DII net values. |
| 62 | |
| 63 | ### Step 3: Fetch Nifty 50 Price Data |
| 64 | |
| 65 | Use Groww MCP tools to get Nifty price data for correlation analysis: |
| 66 | |
| 67 | ```python |
| 68 | # Get current Nifty LTP |
| 69 | get_ltp(search_queries=["NIFTY"], segment="CASH", query_type="stocks") |
| 70 | |
| 71 | # Get historical Nifty data for correlation (last 30 trading days, daily candles) |
| 72 | fetch_historical_candle_data( |
| 73 | trading_symbol="NIFTY", |
| 74 | start_time="{30_trading_days_ago} 09:15:00", |
| 75 | end_time="{today} 15:30:00", |
| 76 | interval_in_minutes="1440", |
| 77 | exchange="NSE", |
| 78 | segment="CASH" |
| 79 | ) |
| 80 | ``` |
| 81 | |
| 82 | Use `resolve_market_time_and_calendar` to determine the correct trading day range: |
| 83 | |
| 84 | ```python |
| 85 | resolve_market_time_and_calendar( |
| 86 | time_period_unit="day", |
| 87 | number_of_periods=30, |
| 88 | period_relative_position="previous" |
| 89 | ) |
| 90 | ``` |
| 91 | |
| 92 | ### Step 4: Analyze Flow Patterns |
| 93 | |
| 94 | Perform the following analyses on the collected data: |
| 95 | |
| 96 | **A. Daily Flow Assessment** |
| 97 | - Classify today's FII flow: significant buy (> +2000cr), significant sell (< -2000cr), or neutral |
| 98 | - Classify today's DII flow using the same thresholds |
| 99 | - Compare FII vs DII: Are they aligned or divergent? |
| 100 | |
| 101 | **B. Trend Analysis (10-day rolling)** |
| 102 | - Count net buying days vs net selling days for both FII and DII |
| 103 | - Calculate cumulative 10-day net flow |
| 104 | - Identify if selling/buying is accelerating or decelerating (compare last 5 days vs prior 5 days) |
| 105 | |
| 106 | **C. Monthly and Yearly Context** |
| 107 | - MTD (Month-to-Date) cumulative flow for FII and DII |
| 108 | - YTD (Year-to-Date) cumulative flow for FII and DII |
| 109 | - Compare current month's pace to previous months |
| 110 | |
| 111 | **D. FII:DII Flow Ratio** |
| 112 | - Calculate the ratio of FII net to DII net |
| 113 | - Positive ratio with both positive = strong bullish signal |
| 114 | - FII negative, DII positive = DII absorbing FII selling (support floor) |
| 115 | - Both negative = danger signal |
| 116 | |
| 117 | ### Step 5: Identify Flow Regime |
| 118 | |
| 119 | Classify the current institutional flow regime: |
| 120 | |
| 121 | | Regime | Definition | Market Implication | |
| 122 | |--------|------------|-------------------| |
| 123 | | **FII Net Buyer** | FII net positive for 5+ consecutive d |