portfolio-datacas-parsingguide

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.

CASParser Team ·

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:

  1. CDSL CAS - Covers demat holdings: equities, mutual funds (demat), bonds, AIFs, G-Secs, insurance, NPS
  2. NSDL CAS - Same as CDSL but from the other depository
  3. 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:

  1. Equities (Demat) - ISIN, name, units, value, transaction history
  2. Mutual Funds (Demat) - ISIN, scheme name, units, value, transaction history
  3. Mutual Funds (Non-Demat) - Folio, AMC, NAV, cost, unrealized gain, 50+ year transaction history
  4. AIFs - ISIN, fund name, units, value, transaction history
  5. Corporate Bonds - ISIN, issuer name, units, value, transaction history
  6. G-Secs - ISIN, security name, units, value (Gilts, SDLs, T-Bills)
  7. Life Insurance - Policy number, provider, sum assured, premium, status
  8. NPS - PRAN, tier, fund-level NAV, units, cost, fund manager
  9. 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-python package
  • 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

  1. Sign up for free - 10 credits/month, no credit card
  2. Try the sandbox API key - sandbox-with-json-responses
  3. Read the API documentation
  4. Deploy with Portfolio Connect SDK for frontend integration