NPS NAV Skill
Query Indian NPS (National Pension System) fund data — NAV, scheme info, returns, history — using the free npsnav.in API.
Setup
No authentication or API keys required. The API is completely free for non-commercial use.
Ensure curl and jq are installed.
What is an NPS Scheme Code?
NPS scheme codes follow the format SM followed by 6 digits (e.g. SM001001). Each code uniquely identifies an NPS fund managed by a Pension Fund Manager (PFM). Scheme codes can be discovered via the Schemes API or from the full list of NPS funds.
Base URL
CODEBLOCK0
Usage
Get latest NAV for a scheme (plain text)
The simplest endpoint — returns just the NAV number as plain text. Perfect for spreadsheets and quick lookups.
CODEBLOCK1
List all scheme codes
CODEBLOCK2
Get latest NAV for all funds (detailed)
CODEBLOCK3
Get latest NAV for all funds (minimal)
CODEBLOCK4
Get detailed fund data with returns
CODEBLOCK5
Get historical NAV data
CODEBLOCK6
More Examples
CODEBLOCK7
Endpoints Reference
| Method | Endpoint | Description | Response |
|---|
| GET | INLINECODE4 | List all scheme codes and names | JSON |
| GET |
/api/{scheme_code} | Latest NAV for a scheme | Plain text |
| GET |
/api/latest | Latest NAV for all funds (detailed)| JSON |
| GET |
/api/latest-min | Latest NAV for all funds (minimal) | JSON |
| GET |
/api/detailed/{scheme_code} | Fund data with returns | JSON |
| GET |
/api/historical/{scheme_code}| Historical NAV data | JSON |
Notes
- - Scheme codes follow the format
SM + 6 digits (e.g. SM001001) - Dates in responses use
DD-MM-YYYY format - The Simple API (
/api/{scheme_code}) returns plain text, not JSON - The
/api/schemes endpoint returns all ~151 NPS schemes - No API keys or rate limits; unlimited non-commercial usage
- Data is sourced from Protean eGov Technologies and NPS Trust
NPS NAV 技能
使用免费的 npsnav.in API 查询印度国家养老金系统(NPS)基金数据——包括净值、计划信息、回报率和历史数据。
设置
无需身份验证或 API 密钥。该 API 完全免费用于非商业用途。
确保已安装 curl 和 jq。
什么是 NPS 计划代码?
NPS 计划代码采用 SM 后接 6 位数字的格式(例如 SM001001)。每个代码唯一标识由养老基金管理人(PFM)管理的 NPS 基金。可通过计划 API 或 NPS 基金完整列表 查询计划代码。
基础 URL
https://npsnav.in/api
使用方法
获取某个计划的最新净值(纯文本)
最简单的端点——仅以纯文本形式返回净值数字。适用于电子表格和快速查询。
bash
curl -s https://npsnav.in/api/SM001001
→ 46.7686
列出所有计划代码
bash
curl -s https://npsnav.in/api/schemes | jq .data[] | {code: .[0], name: .[1]}
获取所有基金的最新净值(详细)
bash
curl -s https://npsnav.in/api/latest | jq .data[:5]
获取所有基金的最新净值(精简)
bash
curl -s https://npsnav.in/api/latest-min | jq .data[:5]
获取包含回报率的详细基金数据
bash
curl -s https://npsnav.in/api/detailed/SM001001 | jq .
获取历史净值数据
bash
curl -s https://npsnav.in/api/historical/SM001001 | jq .data[:5]
更多示例
bash
获取 SBI 养老基金(中央政府)的净值
curl -s https://npsnav.in/api/SM001001
列出所有 NPS 计划名称
curl -s https://npsnav.in/api/schemes | jq .data[] | .[1]
获取某个计划的详细数据及回报率
curl -s https://npsnav.in/api/detailed/SM001001 | jq {name: .[Scheme Name], nav: .NAV, 1Y: .[1Y], 3Y: .[3Y]}
获取所有基金的最新净值和日期
curl -s https://npsnav.in/api/latest | jq .data[] | {code: .[Scheme Code], name: .[Scheme Name], nav: .NAV}
获取某个计划的历史净值
curl -s https://npsnav.in/api/historical/SM001001 | jq [.data[0], .data[-1]] | {latest: .[0], oldest: .[1]}
按名称查找计划(从计划列表中筛选)
curl -s https://npsnav.in/api/schemes | jq .data[] | select(.[1] | test(HDFC)) | {code: .[0], name: .[1]}
端点参考
| 方法 | 端点 | 描述 | 响应类型 |
|---|
| GET | /api/schemes | 列出所有计划代码和名称 | JSON |
| GET |
/api/{scheme_code} | 某个计划的最新净值 | 纯文本 |
| GET | /api/latest | 所有基金的最新净值(详细) | JSON |
| GET | /api/latest-min | 所有基金的最新净值(精简) | JSON |
| GET | /api/detailed/{scheme_code} | 包含回报率的基金数据 | JSON |
| GET | /api/historical/{scheme_code}| 历史净值数据 | JSON |
备注
- - 计划代码采用 SM + 6 位数字的格式(例如 SM001001)
- 响应中的日期使用 DD-MM-YYYY 格式
- 简单 API(/api/{scheme_code})返回纯文本,而非 JSON
- /api/schemes 端点返回所有约 151 个 NPS 计划
- 无需 API 密钥,无速率限制;非商业用途无限制
- 数据来源于 Protean eGov Technologies 和 NPS Trust