feat: 热点股追踪增加近3/5/10交易日筛选
This commit is contained in:
@@ -33,11 +33,11 @@ export interface CoreStockHistoryResponse {
|
||||
items: CoreStockHistoryItem[];
|
||||
}
|
||||
|
||||
/** 获取活跃核心股 + 最近10日涨幅矩阵 */
|
||||
export async function fetchActiveCoreStocks(): Promise<ActiveCoreStocksResponse> {
|
||||
/** 获取活跃核心股 + 最近N日涨幅矩阵 */
|
||||
export async function fetchActiveCoreStocks(days: number = 10): Promise<ActiveCoreStocksResponse> {
|
||||
const baseUrl = getApiBaseUrl();
|
||||
try {
|
||||
const resp = await fetch(`${baseUrl}/api/core-stocks/active`, { method: "GET", cache: "no-store" });
|
||||
const resp = await fetch(`${baseUrl}/api/core-stocks/active?days=${days}`, { method: "GET", cache: "no-store" });
|
||||
if (!resp.ok) return { dates: [], stocks: [] };
|
||||
return resp.json();
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user