feat(FEAT-MO-005): 增加行业题材板块排行接口

This commit is contained in:
2026-08-25 01:51:23 +08:00
parent b6a9f40ed8
commit 8174f3f698
8 changed files with 459 additions and 1 deletions
+101
View File
@@ -271,6 +271,66 @@
"required": ["code", "name", "changePercent", "direction", "tradeDate"],
"type": "object"
},
"SectorRankingItemDto": {
"properties": {
"advancingCount": { "nullable": true, "type": "number" },
"category": {
"enum": ["industry", "concept", "board"],
"type": "string"
},
"changePercent": { "nullable": true, "type": "number" },
"code": { "type": "string" },
"decliningCount": { "nullable": true, "type": "number" },
"leader": { "nullable": true, "type": "string" },
"name": { "type": "string" },
"tradeDate": {
"example": "20260825",
"nullable": true,
"type": "string"
},
"turnoverAmount": {
"description": "亿元",
"nullable": true,
"type": "number"
}
},
"required": ["category", "code", "name"],
"type": "object"
},
"SectorRankingsDataDto": {
"properties": {
"category": {
"enum": ["industry", "concept", "board"],
"type": "string"
},
"items": {
"items": { "$ref": "#/components/schemas/SectorRankingItemDto" },
"type": "array"
},
"sort": { "enum": ["rise", "fall", "turnover"], "type": "string" }
},
"required": ["items", "sort", "category"],
"type": "object"
},
"SectorRankingsResponseDto": {
"properties": {
"asOf": { "format": "date-time", "type": "string" },
"data": {
"allOf": [{ "$ref": "#/components/schemas/SectorRankingsDataDto" }],
"nullable": true,
"type": "object"
},
"snapshotId": { "type": "string" },
"source": { "enum": ["tdx", "aktools", "mixed"], "type": "string" },
"status": {
"enum": ["fresh", "delayed", "partial", "unavailable"],
"type": "string"
},
"warnings": { "items": { "type": "string" }, "type": "array" }
},
"required": ["snapshotId", "asOf", "source", "status", "warnings", "data"],
"type": "object"
},
"SectorsResponseDto": {
"properties": {
"asOf": { "format": "date-time", "type": "string" },
@@ -553,6 +613,47 @@
"tags": ["market-overview-detail"]
}
},
"/api/v1/market-overview/sector-rankings": {
"get": {
"operationId": "MarketStructureController_getSectorRankings",
"parameters": [
{
"in": "query",
"name": "limit",
"required": false,
"schema": { "maximum": 100, "minimum": 1, "type": "number" }
},
{
"in": "query",
"name": "sort",
"required": false,
"schema": { "enum": ["rise", "fall", "turnover"], "type": "string" }
},
{
"in": "query",
"name": "category",
"required": false,
"schema": {
"enum": ["industry", "concept", "board"],
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SectorRankingsResponseDto"
}
}
},
"description": ""
}
},
"tags": ["market-overview-structure"]
}
},
"/api/v1/market-overview/sectors": {
"get": {
"operationId": "MarketOverviewController_getSectors",