676 lines
22 KiB
JSON
676 lines
22 KiB
JSON
{
|
|
"components": {
|
|
"schemas": {
|
|
"BreadthDataDto": {
|
|
"properties": {
|
|
"advancing": { "type": "number" },
|
|
"declining": { "type": "number" },
|
|
"unchanged": { "nullable": true, "type": "number" }
|
|
},
|
|
"required": ["advancing", "declining", "unchanged"],
|
|
"type": "object"
|
|
},
|
|
"BreadthResponseDto": {
|
|
"properties": {
|
|
"asOf": { "format": "date-time", "type": "string" },
|
|
"data": {
|
|
"allOf": [{ "$ref": "#/components/schemas/BreadthDataDto" }],
|
|
"nullable": true,
|
|
"type": "object"
|
|
},
|
|
"snapshotId": { "type": "string" },
|
|
"source": { "enum": ["tdx"], "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"
|
|
},
|
|
"DependencyHealthDto": {
|
|
"properties": {
|
|
"detail": { "type": "string" },
|
|
"status": {
|
|
"enum": ["healthy", "unavailable", "disabled"],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["status", "detail"],
|
|
"type": "object"
|
|
},
|
|
"DetailAvailableViewsDto": {
|
|
"properties": {
|
|
"intraday": { "type": "boolean" },
|
|
"kline": { "type": "boolean" }
|
|
},
|
|
"required": ["kline", "intraday"],
|
|
"type": "object"
|
|
},
|
|
"DetailInstrumentDto": {
|
|
"properties": {
|
|
"code": { "type": "string" },
|
|
"name": { "type": "string" },
|
|
"type": { "enum": ["index", "sector"], "type": "string" }
|
|
},
|
|
"required": ["code", "name", "type"],
|
|
"type": "object"
|
|
},
|
|
"DetailQuoteDto": {
|
|
"properties": {
|
|
"changePercent": { "nullable": true, "type": "number" },
|
|
"direction": { "enum": ["up", "down", "flat"], "type": "string" },
|
|
"price": { "type": "number" },
|
|
"tradeDate": { "example": "20260818", "type": "string" }
|
|
},
|
|
"required": ["price", "direction", "tradeDate"],
|
|
"type": "object"
|
|
},
|
|
"DetailSeriesPointDto": {
|
|
"properties": {
|
|
"amount": { "nullable": true, "type": "number" },
|
|
"close": { "type": "number" },
|
|
"high": { "type": "number" },
|
|
"low": { "type": "number" },
|
|
"open": { "type": "number" },
|
|
"time": { "example": "20260818", "type": "string" },
|
|
"volume": { "nullable": true, "type": "number" }
|
|
},
|
|
"required": ["time", "open", "high", "low", "close"],
|
|
"type": "object"
|
|
},
|
|
"FundDataDto": {
|
|
"properties": {
|
|
"changePercent": { "type": "number" },
|
|
"currentAmount": { "type": "number" },
|
|
"marketCount": { "maximum": 3, "minimum": 1, "type": "number" },
|
|
"previousAmount": { "type": "number" },
|
|
"previousTradeDate": { "example": "20260817", "type": "string" },
|
|
"tradeDate": { "example": "20260818", "type": "string" },
|
|
"unit": { "example": "亿元", "type": "string" }
|
|
},
|
|
"required": [
|
|
"currentAmount",
|
|
"previousAmount",
|
|
"changePercent",
|
|
"unit",
|
|
"marketCount",
|
|
"tradeDate",
|
|
"previousTradeDate"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"FundsResponseDto": {
|
|
"properties": {
|
|
"asOf": { "format": "date-time", "type": "string" },
|
|
"data": {
|
|
"allOf": [{ "$ref": "#/components/schemas/FundDataDto" }],
|
|
"nullable": true,
|
|
"type": "object"
|
|
},
|
|
"snapshotId": { "type": "string" },
|
|
"source": { "enum": ["tdx"], "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"
|
|
},
|
|
"HealthDependenciesDto": {
|
|
"properties": {
|
|
"mysql": { "$ref": "#/components/schemas/DependencyHealthDto" },
|
|
"redis": { "$ref": "#/components/schemas/DependencyHealthDto" },
|
|
"rocketMq": { "$ref": "#/components/schemas/DependencyHealthDto" }
|
|
},
|
|
"required": ["redis", "mysql", "rocketMq"],
|
|
"type": "object"
|
|
},
|
|
"HealthResponseDto": {
|
|
"properties": {
|
|
"checkedAt": { "format": "date-time", "type": "string" },
|
|
"dependencies": {
|
|
"$ref": "#/components/schemas/HealthDependenciesDto"
|
|
},
|
|
"process": { "enum": ["api"], "type": "string" },
|
|
"status": { "enum": ["healthy", "unavailable"], "type": "string" }
|
|
},
|
|
"required": ["status", "process", "checkedAt", "dependencies"],
|
|
"type": "object"
|
|
},
|
|
"IndexDetailDataDto": {
|
|
"properties": {
|
|
"availableViews": {
|
|
"$ref": "#/components/schemas/DetailAvailableViewsDto"
|
|
},
|
|
"instrument": { "$ref": "#/components/schemas/DetailInstrumentDto" },
|
|
"quote": { "$ref": "#/components/schemas/DetailQuoteDto" },
|
|
"series": {
|
|
"items": { "$ref": "#/components/schemas/DetailSeriesPointDto" },
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": ["instrument", "quote", "series", "availableViews"],
|
|
"type": "object"
|
|
},
|
|
"IndexDetailResponseDto": {
|
|
"properties": {
|
|
"asOf": { "format": "date-time", "type": "string" },
|
|
"data": {
|
|
"allOf": [{ "$ref": "#/components/schemas/IndexDetailDataDto" }],
|
|
"nullable": true,
|
|
"type": "object"
|
|
},
|
|
"snapshotId": { "type": "string" },
|
|
"source": { "enum": ["tdx"], "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"
|
|
},
|
|
"IndexQuoteDto": {
|
|
"properties": {
|
|
"changePercent": { "nullable": true, "type": "number" },
|
|
"code": { "type": "string" },
|
|
"direction": { "enum": ["up", "down", "flat"], "type": "string" },
|
|
"name": { "type": "string" },
|
|
"price": { "type": "number" },
|
|
"tradeDate": { "type": "string" }
|
|
},
|
|
"required": ["code", "name", "price", "direction", "tradeDate"],
|
|
"type": "object"
|
|
},
|
|
"IndicesDataDto": {
|
|
"properties": {
|
|
"items": {
|
|
"items": { "$ref": "#/components/schemas/IndexQuoteDto" },
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": ["items"],
|
|
"type": "object"
|
|
},
|
|
"IndicesResponseDto": {
|
|
"properties": {
|
|
"asOf": { "format": "date-time", "type": "string" },
|
|
"data": {
|
|
"allOf": [{ "$ref": "#/components/schemas/IndicesDataDto" }],
|
|
"nullable": true,
|
|
"type": "object"
|
|
},
|
|
"snapshotId": { "type": "string" },
|
|
"source": { "enum": ["tdx"], "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"
|
|
},
|
|
"SectorDataDto": {
|
|
"properties": {
|
|
"items": {
|
|
"items": { "$ref": "#/components/schemas/SectorQuoteDto" },
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": ["items"],
|
|
"type": "object"
|
|
},
|
|
"SectorDetailDataDto": {
|
|
"properties": {
|
|
"availableViews": {
|
|
"$ref": "#/components/schemas/DetailAvailableViewsDto"
|
|
},
|
|
"instrument": { "$ref": "#/components/schemas/DetailInstrumentDto" },
|
|
"quote": { "$ref": "#/components/schemas/DetailQuoteDto" },
|
|
"series": {
|
|
"items": { "$ref": "#/components/schemas/DetailSeriesPointDto" },
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": ["instrument", "quote", "series", "availableViews"],
|
|
"type": "object"
|
|
},
|
|
"SectorDetailResponseDto": {
|
|
"properties": {
|
|
"asOf": { "format": "date-time", "type": "string" },
|
|
"data": {
|
|
"allOf": [{ "$ref": "#/components/schemas/SectorDetailDataDto" }],
|
|
"nullable": true,
|
|
"type": "object"
|
|
},
|
|
"snapshotId": { "type": "string" },
|
|
"source": { "enum": ["tdx"], "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"
|
|
},
|
|
"SectorQuoteDto": {
|
|
"properties": {
|
|
"changePercent": { "type": "number" },
|
|
"code": { "type": "string" },
|
|
"direction": { "enum": ["up", "down", "flat"], "type": "string" },
|
|
"name": { "type": "string" },
|
|
"tradeDate": { "type": "string" }
|
|
},
|
|
"required": ["code", "name", "changePercent", "direction", "tradeDate"],
|
|
"type": "object"
|
|
},
|
|
"SectorsResponseDto": {
|
|
"properties": {
|
|
"asOf": { "format": "date-time", "type": "string" },
|
|
"data": {
|
|
"allOf": [{ "$ref": "#/components/schemas/SectorDataDto" }],
|
|
"nullable": true,
|
|
"type": "object"
|
|
},
|
|
"snapshotId": { "type": "string" },
|
|
"source": { "enum": ["tdx"], "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"
|
|
},
|
|
"ShortTermConclusionDataDto": {
|
|
"properties": {
|
|
"drivers": { "items": { "type": "string" }, "type": "array" },
|
|
"risks": { "items": { "type": "string" }, "type": "array" },
|
|
"verdict": { "type": "string" }
|
|
},
|
|
"required": ["verdict", "drivers", "risks"],
|
|
"type": "object"
|
|
},
|
|
"ShortTermConclusionResponseDto": {
|
|
"properties": {
|
|
"asOf": { "format": "date-time", "type": "string" },
|
|
"data": {
|
|
"allOf": [{ "$ref": "#/components/schemas/ShortTermConclusionDataDto" }],
|
|
"nullable": true,
|
|
"type": "object"
|
|
},
|
|
"snapshotId": { "type": "string" },
|
|
"source": { "enum": ["akshare"], "type": "string" },
|
|
"status": {
|
|
"enum": ["fresh", "delayed", "partial", "unavailable"],
|
|
"type": "string"
|
|
},
|
|
"tradeDate": { "example": "20260824", "type": "string" },
|
|
"warnings": { "items": { "type": "string" }, "type": "array" }
|
|
},
|
|
"required": ["snapshotId", "asOf", "source", "tradeDate", "status", "data", "warnings"],
|
|
"type": "object"
|
|
},
|
|
"ShortTermEmotionDataDto": {
|
|
"properties": {
|
|
"brokenBoardCount": { "nullable": true, "type": "number" },
|
|
"industries": {
|
|
"items": { "$ref": "#/components/schemas/ShortTermIndustryDto" },
|
|
"type": "array"
|
|
},
|
|
"limitUpCount": { "nullable": true, "type": "number" },
|
|
"maxBoard": { "nullable": true, "type": "number" },
|
|
"previousAverageChangePercent": {
|
|
"nullable": true,
|
|
"type": "number"
|
|
},
|
|
"previousDownCount": { "nullable": true, "type": "number" },
|
|
"previousFlatCount": { "nullable": true, "type": "number" },
|
|
"previousUpCount": { "nullable": true, "type": "number" },
|
|
"sealFundsAmount": {
|
|
"description": "封板资金,亿元",
|
|
"nullable": true,
|
|
"type": "number"
|
|
},
|
|
"tiers": {
|
|
"items": { "$ref": "#/components/schemas/ShortTermTierDto" },
|
|
"type": "array"
|
|
},
|
|
"tradeDate": { "example": "20260824", "type": "string" }
|
|
},
|
|
"required": ["tradeDate", "tiers", "industries"],
|
|
"type": "object"
|
|
},
|
|
"ShortTermEmotionResponseDto": {
|
|
"properties": {
|
|
"asOf": { "format": "date-time", "type": "string" },
|
|
"data": {
|
|
"allOf": [{ "$ref": "#/components/schemas/ShortTermEmotionDataDto" }],
|
|
"nullable": true,
|
|
"type": "object"
|
|
},
|
|
"snapshotId": { "type": "string" },
|
|
"source": { "enum": ["akshare"], "type": "string" },
|
|
"status": {
|
|
"enum": ["fresh", "delayed", "partial", "unavailable"],
|
|
"type": "string"
|
|
},
|
|
"tradeDate": { "example": "20260824", "type": "string" },
|
|
"warnings": { "items": { "type": "string" }, "type": "array" }
|
|
},
|
|
"required": ["snapshotId", "asOf", "source", "tradeDate", "status", "data", "warnings"],
|
|
"type": "object"
|
|
},
|
|
"ShortTermIndustryDto": {
|
|
"properties": {
|
|
"count": { "type": "number" },
|
|
"name": { "type": "string" }
|
|
},
|
|
"required": ["name", "count"],
|
|
"type": "object"
|
|
},
|
|
"ShortTermTierDto": {
|
|
"properties": {
|
|
"board": { "type": "number" },
|
|
"count": { "type": "number" }
|
|
},
|
|
"required": ["board", "count"],
|
|
"type": "object"
|
|
},
|
|
"SummaryDataDto": {
|
|
"properties": {
|
|
"drivers": { "items": { "type": "string" }, "type": "array" },
|
|
"marketStatus": { "type": "string" },
|
|
"risks": { "items": { "type": "string" }, "type": "array" },
|
|
"sentimentStatus": { "type": "string" },
|
|
"verdict": { "type": "string" },
|
|
"volumeStatus": { "type": "string" }
|
|
},
|
|
"required": [
|
|
"verdict",
|
|
"marketStatus",
|
|
"volumeStatus",
|
|
"sentimentStatus",
|
|
"drivers",
|
|
"risks"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"SummaryResponseDto": {
|
|
"properties": {
|
|
"asOf": { "format": "date-time", "type": "string" },
|
|
"data": {
|
|
"allOf": [{ "$ref": "#/components/schemas/SummaryDataDto" }],
|
|
"nullable": true,
|
|
"type": "object"
|
|
},
|
|
"snapshotId": { "type": "string" },
|
|
"source": { "enum": ["tdx"], "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"
|
|
}
|
|
}
|
|
},
|
|
"info": {
|
|
"contact": {},
|
|
"description": "",
|
|
"title": "A 股市场分析工具 API",
|
|
"version": "0.0.8-draft"
|
|
},
|
|
"openapi": "3.0.0",
|
|
"paths": {
|
|
"/api/v1/health": {
|
|
"get": {
|
|
"operationId": "HealthController_getHealth",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/HealthResponseDto" }
|
|
}
|
|
},
|
|
"description": ""
|
|
},
|
|
"503": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/HealthResponseDto" }
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": ["health"]
|
|
}
|
|
},
|
|
"/api/v1/market-overview/breadth": {
|
|
"get": {
|
|
"operationId": "MarketOverviewController_getBreadth",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/BreadthResponseDto" }
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": ["market-overview"]
|
|
}
|
|
},
|
|
"/api/v1/market-overview/funds": {
|
|
"get": {
|
|
"operationId": "MarketOverviewController_getFunds",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/FundsResponseDto" }
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": ["market-overview"]
|
|
}
|
|
},
|
|
"/api/v1/market-overview/indices": {
|
|
"get": {
|
|
"operationId": "MarketOverviewController_getIndices",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/IndicesResponseDto" }
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": ["market-overview"]
|
|
}
|
|
},
|
|
"/api/v1/market-overview/indices/{code}/detail": {
|
|
"get": {
|
|
"operationId": "MarketDetailController_getIndexDetail",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "count",
|
|
"required": false,
|
|
"schema": {
|
|
"example": 120,
|
|
"maximum": 120,
|
|
"minimum": 1,
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "period",
|
|
"required": false,
|
|
"schema": { "enum": ["1d"], "type": "string" }
|
|
},
|
|
{
|
|
"description": "带市场后缀的指数代码",
|
|
"in": "path",
|
|
"name": "code",
|
|
"required": true,
|
|
"schema": { "example": "000001.SH" }
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/IndexDetailResponseDto"
|
|
}
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": ["market-overview-detail"]
|
|
}
|
|
},
|
|
"/api/v1/market-overview/sectors": {
|
|
"get": {
|
|
"operationId": "MarketOverviewController_getSectors",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/SectorsResponseDto" }
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": ["market-overview"]
|
|
}
|
|
},
|
|
"/api/v1/market-overview/sectors/{code}/detail": {
|
|
"get": {
|
|
"operationId": "MarketDetailController_getSectorDetail",
|
|
"parameters": [
|
|
{
|
|
"in": "query",
|
|
"name": "count",
|
|
"required": false,
|
|
"schema": {
|
|
"example": 120,
|
|
"maximum": 120,
|
|
"minimum": 1,
|
|
"type": "number"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "period",
|
|
"required": false,
|
|
"schema": { "enum": ["1d"], "type": "string" }
|
|
},
|
|
{
|
|
"description": "带市场后缀的一级行业代码",
|
|
"in": "path",
|
|
"name": "code",
|
|
"required": true,
|
|
"schema": { "example": "881001.SH" }
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SectorDetailResponseDto"
|
|
}
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": ["market-overview-detail"]
|
|
}
|
|
},
|
|
"/api/v1/market-overview/short-term/conclusion": {
|
|
"get": {
|
|
"operationId": "ShortTermMarketController_getConclusion",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ShortTermConclusionResponseDto"
|
|
}
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": ["market-overview-short-term"]
|
|
}
|
|
},
|
|
"/api/v1/market-overview/short-term/emotion": {
|
|
"get": {
|
|
"operationId": "ShortTermMarketController_getEmotion",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ShortTermEmotionResponseDto"
|
|
}
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": ["market-overview-short-term"]
|
|
}
|
|
},
|
|
"/api/v1/market-overview/summary": {
|
|
"get": {
|
|
"operationId": "MarketOverviewController_getSummary",
|
|
"parameters": [],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "$ref": "#/components/schemas/SummaryResponseDto" }
|
|
}
|
|
},
|
|
"description": ""
|
|
}
|
|
},
|
|
"tags": ["market-overview"]
|
|
}
|
|
}
|
|
},
|
|
"servers": [],
|
|
"tags": []
|
|
}
|