Fund Performance Rankings
Fund Performance Rankings
Documentation
API Overview
This API provides detailed performance data for a single fund. By passing the fund code, it returns the fund's gain/loss, average gain/loss for its category, category ranking, and excess return relative to the CSI 300 index across various time dimensions (last week, last month, last quarter, year-to-date, last two years, last three years, last five years).
Use Cases
- Financial News Applications: Display multi-dimensional historical performance trends and rankings on fund detail pages.
- Investment Research Analysis Tools: Quantitatively analyze fund long-term stability, comparing it against category averages and benchmark indices.
- Robo-Advisor Systems: Filter high-quality fund targets based on historical rankings and returns.
Request and Response Details
- Request Method: POST
- Core Parameters:
fundCode(string, required), the six-digit code of the fund to be queried. - Response Data:
data.lastWeek/lastMonth/lastQuarter, etc.: Actual gain/loss for the corresponding period.data.lastWeekRank/lastMonthRank, etc.: Ranking within the same fund category for the corresponding period.data.lastWeekAvg/lastMonthAvg, etc.: Average gain/loss for funds in the same category for the corresponding period.data.lastWeekHS300, etc.: Performance relative to the CSI 300 index for the corresponding period.data.foundDate: Fund inception date.
Integration Suggestions
- Caching Strategy: Fund net asset value and ranking data are typically updated once daily; it is recommended to cache query results for the same fund code locally for at least 24 hours to reduce API call costs.
- Error Handling: Please check the returned
codefield; if it's a non-200 status code, error handling is required based on themsgprompt (e.g., fund code does not exist). - Data Display: When displaying rankings on the frontend, it is recommended to combine with total count fields like
lastWeekCountto calculate percentage rankings (e.g., 'top 10%') to enhance user experience.
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Request Example
{
"fundCode": "基金代码"
}Response Example
{
"code": 200,
"msg": "成功",
"taskNo": "492823910191448773171202",
"data": {
"twoYear": -38.46,
"fiveYearCount": 757,
"allYearHS300": 0,
"nowYearRank": 2499,
"lastWeekCount": 4350,
"lastMonthAvg": -2.15,
"lastMonth": 2.17,
"lastQuarterAvg": -6.32,
"thirdYearAvg": -36.24,
"lastHalfYearAvg": 7.82,
"lastHalfYearRank": 4019,
"nowYearHS300": 0.32,
"lastYearRank": 3688,
"twoYearCount": 3133,
"lastQuarter": -6.31,
"allYearCount": 0,
"fiveYearHS300": -10.25,
"lastWeekAvg": 1.56,
"lastWeekHS300": 0.7,
"foundDate": "2017-12-14",
"lastQuarterHS300": -4.5,
"lastQuarterRank": 2095,
"lastWeek": 6.51,
"lastWeekRank": 34,
"lastMonthHS300": -0.57,
"fiveYear": -27.58,
"lastYearCount": 3822,
"nowYear": -9.91,
"twoYearAvg": -27.66,
"thirdYearCount": 2063,
"lastMonthRank": 227,
"thirdYearRank": 1447,
"nowYearAvg": -7.31,
"fiveYearAvg": 22.95,
"allYearAvg": "",
"twoYearHS300": -17.46,
"lastHalfYearCount": 4171,
"allYearRank": 0,
"lastYearAvg": -17.7,
"thirdYear": -44.54,
"fiveYearRank": 737,
"allYear": -24.08,
"dataDate": "2024-07-31",
"thirdYearHS300": -28.46,
"lastHalfYearHS300": 7.05,
"lastYearHS300": -14.26,
"nowYearCount": 4123,
"twoYearRank": 2547,
"lastYear": -34.4,
"lastQuarterCount": 4295,
"lastHalfYear": -6.16,
"lastMonthCount": 4357
}
}Request Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
| properties | object | {...} |
| properties.fundCode | object | {...} |
| properties.fundCode.type | string | string |
| properties.fundCode.description | string | 基金代码 |
| required | array | "fundCode" |
| required[] | string | fundCode |
Response Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
| properties | object | {...} |
| properties.code | object | {...} |
| properties.code.type | string | number |
| properties.code.example | number | 200 |
| properties.code.description | string | 返回码,详见返回码说明 |
| properties.msg | object |