Overview
CAS Generator triggers a mutual fund CAS statement to be emailed to your user — no manual portal visits needed.
Coverage: Uses KFintech’s email mailback service. KFintech and CAMS have a mutual partnership that provides data from both RTAs (Registrar and Transfer Agents), so this endpoint retrieves mutual fund data from both KFintech and CAMS, covering all mutual funds in India.
Use cases:
- Client onboarding (request 50 years of history)
- Automated monthly portfolio updates
- Filling gaps in transaction history
KFintech emails the CAS to the user’s registered email within a few minutes. The CAS is not returned in the API response.
Request a CAS statement
import requests
response = requests.post(
"https://api.casparser.in/v4/kfintech/generate",
headers={"x-api-key": "YOUR_API_KEY"},
json={
"email": "investor@example.com",
"from_date": "1990-01-01",
"to_date": "2024-01-15",
"password": "Abcdefghi12$"
}
)
data = response.json()
# {"status": "success", "msg": "CAS request submitted. Check email shortly."}
Parameters
| Parameter | Required | Description |
|---|
email | Yes | User’s email registered with KFintech |
pan_no | No | User’s PAN number (optional) |
from_date | Yes | Start date (YYYY-MM-DD) |
to_date | Yes | End date (YYYY-MM-DD) |
password | Yes | Password for the PDF |
Integration patterns
Pattern 1: Generate + Gmail Import
Combine CAS Generator with Gmail Inbox Import for a seamless flow:
# 1. Request CAS generation
requests.post(
"https://api.casparser.in/v4/kfintech/generate",
headers={"x-api-key": API_KEY},
json={
"email": "user@gmail.com",
"from_date": "2020-01-01",
"to_date": "2024-12-31",
"password": "Abcdefghi12$"
}
)
# 2. Wait for email (1-2 minutes)
time.sleep(120)
# 3. Import from Gmail
response = requests.post(
"https://api.casparser.in/v4/inbox/cas",
headers={
"x-api-key": API_KEY,
"x-inbox-token": inbox_token
}
)
Pattern 2: User-initiated
Let users trigger generation and upload manually:
// Frontend
const requestCAS = async () => {
await fetch('/api/generate-cas', {
method: 'POST',
body: JSON.stringify({ email: user.email, pan: user.pan })
});
alert('CAS will arrive in your email in 1-2 minutes. Upload it here when received.');
};
Timing expectations
| Step | Duration |
|---|
| API request | < 1 second |
| KFintech processing | 1-2 minutes |
| Email delivery | Depends on email provider |
Date range options
from datetime import datetime, timedelta
# Last 1 year
requests.post(..., json={
"email": "user@example.com",
"from_date": (datetime.now() - timedelta(days=365)).strftime("%Y-%m-%d"),
"to_date": datetime.now().strftime("%Y-%m-%d"),
"password": "Abcdefghi12$"
})
# Complete history (50+ years)
requests.post(..., json={
"email": "user@example.com",
"from_date": "1970-01-01",
"to_date": datetime.now().strftime("%Y-%m-%d"),
"password": "Abcdefghi12$"
})
Credit usage
| Operation | Credits |
|---|
| Generate CAS | 0.5 |
Comparison: CDSL Fetch vs CAS Generator
| Feature | CDSL Fetch | CAS Generator |
|---|
| Speed | Real-time (~20s) | 1-2 minutes |
| Data source | CDSL eCAS (all holdings) | KFintech + CAMS (all MFs) |
| History | Current holdings | 50+ years transactions |
| User input | PAN + BO ID + DOB + OTP | Email + date range |
| Asset classes | Demat + Non-Demat (stocks, bonds, MFs, etc.) | Mutual funds |
Important: CDSL eCAS statements contain holdings from both CDSL and NSDL depositories. Similarly, NSDL eCAS contains both NSDL and CDSL holdings. This is a consolidated view across all depositories, not limited to the issuing depository.
Next steps