{"openapi":"3.1.0","info":{"title":"StocksHub API","version":"0.1.0"},"paths":{"/api/stocks":{"get":{"operationId":"get_api_stocks","summary":"Get all A-share stock spots","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","format":"double"},"changePct":{"type":"number","format":"double"},"change":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"},"amount":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"low":{"type":"number","format":"double"},"open":{"type":"number","format":"double"},"close":{"type":"number","format":"double"}},"required":["code","name","price","changePct","change","volume","amount","high","low","open","close"]}}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/kline/{symbol}":{"get":{"operationId":"get_api_kline_symbol","summary":"Get stock K-line data","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"open":{"type":"number","format":"double"},"close":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"low":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"},"amount":{"type":"number","format":"double"},"amplitude":{"type":"number","format":"double"},"changePct":{"type":"number","format":"double"},"change":{"type":"number","format":"double"},"turnover":{"type":"number","format":"double"}},"required":["date","open","close","high","low","volume","amount","amplitude","changePct","change","turnover"]}}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/quote/{symbol}":{"get":{"operationId":"get_api_quote_symbol","summary":"Get single stock/index/ETF quote","parameters":[{"name":"symbol","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","format":"double"},"changePct":{"type":"number","format":"double"},"change":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"},"amount":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"low":{"type":"number","format":"double"},"open":{"type":"number","format":"double"},"close":{"type":"number","format":"double"}},"required":["code","name","price","changePct","change","volume","amount","high","low","open","close"]}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/detail/{symbol}":{"get":{"operationId":"get_api_detail_symbol","summary":"Get single stock detail (East Money)","parameters":[{"name":"symbol","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","format":"double"},"open":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"low":{"type":"number","format":"double"},"prevClose":{"type":"number","format":"double"},"change":{"type":"number","format":"double"},"changePct":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"},"amount":{"type":"number","format":"double"},"avgPrice":{"type":"number","format":"double"},"marketCap":{"type":"number","format":"double"},"floatMarketCap":{"type":"number","format":"double"},"totalShares":{"type":"number","format":"double"},"floatShares":{"type":"number","format":"double"},"turnoverRate":{"type":"number","format":"double"},"bps":{"type":"number","format":"double"},"dividendYield":{"type":"number","format":"double"},"listingDate":{"type":"string"},"high52w":{"type":"number","format":"double"},"low52w":{"type":"number","format":"double"},"trailingPE":{"type":"number","format":"double"},"forwardPE":{"type":"number","format":"double"},"ma20":{"type":"number","format":"double"},"ma60":{"type":"number","format":"double"},"avgVolume5":{"type":"number","format":"double"},"recentHigh20":{"type":"number","format":"double"},"recentLow20":{"type":"number","format":"double"},"industry":{"type":"string"},"subIndustry":{"type":"string"},"concepts":{"type":"array","items":{"type":"string"}},"pbRatio":{"type":"number","format":"double"},"epsTtm":{"type":"number","format":"double"}},"required":["code","name","price","open","high","low","prevClose","change","changePct","volume","amount","avgPrice","marketCap","floatMarketCap","totalShares","floatShares","turnoverRate","bps","dividendYield","listingDate","high52w","low52w","trailingPE","forwardPE","ma20","ma60","avgVolume5","recentHigh20","recentLow20","industry","subIndustry","concepts","pbRatio","epsTtm"]}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/market-stats":{"get":{"operationId":"get_api_market_stats","summary":"Get A-share market statistics","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"upCount":{"type":"integer","format":"int64"},"downCount":{"type":"integer","format":"int64"},"flatCount":{"type":"integer","format":"int64"},"limitUpCount":{"type":"integer","format":"int64"},"limitDownCount":{"type":"integer","format":"int64"},"totalAmount":{"type":"number","format":"double"}},"required":["upCount","downCount","flatCount","limitUpCount","limitDownCount","totalAmount"]}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/market-status":{"get":{"operationId":"get_api_market_status","summary":"Get A-share market open status","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"open":{"type":"boolean"},"session":{"type":"string"},"tradingDay":{"type":"boolean"}},"required":["open","session","tradingDay"]}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/hot-sectors":{"get":{"operationId":"get_api_hot_sectors","summary":"Get hot industries and concepts","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"industries":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"avgChangePct":{"type":"number","format":"double"},"stockCount":{"type":"integer","format":"int64"}},"required":["name","avgChangePct","stockCount"]}},"concepts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"avgChangePct":{"type":"number","format":"double"},"stockCount":{"type":"integer","format":"int64"}},"required":["name","avgChangePct","stockCount"]}}},"required":["industries","concepts"]}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/stocks-by-industry/{industry}":{"get":{"operationId":"get_api_stocks_by_industry_industry","summary":"Get stocks by industry","parameters":[{"name":"industry","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","format":"double"},"changePct":{"type":"number","format":"double"},"change":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"},"amount":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"low":{"type":"number","format":"double"},"open":{"type":"number","format":"double"},"close":{"type":"number","format":"double"}},"required":["code","name","price","changePct","change","volume","amount","high","low","open","close"]}}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/stocks-by-concept/{cname}":{"get":{"operationId":"get_api_stocks_by_concept_cname","summary":"Get stocks by concept","parameters":[{"name":"cname","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"price":{"type":"number","format":"double"},"changePct":{"type":"number","format":"double"},"change":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"},"amount":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"low":{"type":"number","format":"double"},"open":{"type":"number","format":"double"},"close":{"type":"number","format":"double"}},"required":["code","name","price","changePct","change","volume","amount","high","low","open","close"]}}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/search":{"get":{"operationId":"get_api_search","summary":"Search symbols by code, name, pinyin, or abbreviation","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"region":{"type":"string"},"name":{"type":"string"},"pinyin":{"type":"string"},"abbr":{"type":"string"},"exchange":{"type":"string"},"assetType":{"type":"integer","format":"int64"}},"required":["code","region","name","pinyin","abbr","exchange","assetType"]}}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/strategies":{"get":{"operationId":"get_api_strategies","summary":"List all supported strategy patterns","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"minDays":{"type":"integer","format":"int64"},"successRate":{"type":"string"}},"required":["name","description","minDays","successRate"]}}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}},"/api/strategy/{name}":{"get":{"operationId":"get_api_strategy_name","summary":"Scan stocks matching a strategy pattern","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"strategy":{"type":"string"},"description":{"type":"string"},"minDays":{"type":"integer","format":"int64"},"successRate":{"type":"string"},"matches":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"matchDate":{"type":"string"},"close":{"type":"number","format":"double"},"changePct":{"type":"number","format":"double"},"volume":{"type":"number","format":"double"},"amount":{"type":"number","format":"double"},"industry":{"type":"string"},"subIndustry":{"type":"string"},"concepts":{"type":"array","items":{"type":"string"}}},"required":["code","name","matchDate","close","changePct","volume","amount","industry","subIndustry","concepts"]}}},"required":["strategy","description","minDays","successRate","matches"]}}}},"400":{"description":"Invalid request"},"500":{"description":"Internal server error"}}}}}}