Complete Guide to Indian Portfolio Data Extraction
Everything you need to know about extracting portfolio data from Indian financial documents - CAS statements, contract notes, and more.
What Is Portfolio Data Extraction?
Portfolio data extraction is the process of converting financial portfolio documents - like CAS (Consolidated Account Statement) PDFs - into structured, machine-readable data (JSON, CSV, Excel). This enables fintech platforms, wealth managers, and advisors to import investor portfolios programmatically.
Types of Indian Portfolio Documents
CAS (Consolidated Account Statement)
A CAS consolidates all your investment holdings into a single document. There are three types:
- CDSL CAS - Covers demat holdings: equities, mutual funds (demat), bonds, AIFs, G-Secs, insurance, NPS
- NSDL CAS - Same as CDSL but from the other depository
- CAMS/KFintech CAS - Covers non-demat mutual fund holdings with complete transaction history (up to 50+ years)
Contract Notes
Broker-issued documents for each trade. Supported brokers: Zerodha, Groww, Upstox, ICICI Direct.
The 9 Asset Classes
CASParser extracts data from all major Indian asset classes:
- Equities (Demat) - ISIN, name, units, value, transaction history
- Mutual Funds (Demat) - ISIN, scheme name, units, value, transaction history
- Mutual Funds (Non-Demat) - Folio, AMC, NAV, cost, unrealized gain, 50+ year transaction history
- AIFs - ISIN, fund name, units, value, transaction history
- Corporate Bonds - ISIN, issuer name, units, value, transaction history
- G-Secs - ISIN, security name, units, value (Gilts, SDLs, T-Bills)
- Life Insurance - Policy number, provider, sum assured, premium, status
- NPS - PRAN, tier, fund-level NAV, units, cost, fund manager
- Contract Notes - Trade details, brokerage, charges (STT/GST/stamp duty)
How CASParser Works
Step 1: Input
Upload a CAS PDF via REST API, Portfolio Connect SDK, Gmail import, or CDSL OTP fetch.
Step 2: Parse
CASParser’s smart parser auto-detects the document type and extracts all data into a unified JSON format.
Step 3: Output
Receive structured JSON with investor details, holdings, transactions, and valuations - same format regardless of source. Transaction data enables capital gains, XIRR, and CAGR calculations.
Integration Options
- REST API - Direct HTTP calls with your API key
- Portfolio Connect SDK - Drop-in React/JS widget for frontend
- Python SDK - Official
cas-parser-pythonpackage - Node.js SDK - Auto-generated TypeScript SDK
- MCP Server - 17 tools for AI agents (Claude, ChatGPT, Cursor)
Common Use Cases
- Portfolio tracking apps - Import user portfolios automatically
- Wealth management - Onboard clients with complete history
- Tax planning - Derive capital gains from transaction data
- Financial advisory - Consolidate portfolios across fund houses
- Internal audit - Verify holdings and transaction records
- Credit underwriting - Verify portfolio for loan decisions
Getting Started
- Sign up for free - 10 credits/month, no credit card
- Try the sandbox API key -
sandbox-with-json-responses - Read the API documentation
- Deploy with Portfolio Connect SDK for frontend integration