看股功能更新
This commit is contained in:
@@ -135,14 +135,17 @@ export async function getStockPreview(
|
||||
adjust?: AdjustMode;
|
||||
timeframe?: Timeframe;
|
||||
mas?: number[];
|
||||
/** 向前翻页:返回该日期(不含)之前的 limit 根 K 线 + 预热好的指标 */
|
||||
end?: string;
|
||||
} = {},
|
||||
): Promise<PreviewResponse> {
|
||||
const { limit = 10000, adjust = 'qfq', timeframe = '1d', mas } = opts;
|
||||
const { limit = 500, adjust = 'qfq', timeframe = '1d', mas, end } = opts;
|
||||
const q = new URLSearchParams({
|
||||
limit: String(limit),
|
||||
adjust,
|
||||
timeframe,
|
||||
...(mas?.length ? { mas: mas.join(',') } : {}),
|
||||
...(end ? { end } : {}),
|
||||
});
|
||||
const res = await apiFetch(`/api/screener/preview/${encodeURIComponent(tsCode)}?${q.toString()}`);
|
||||
if (!res.ok) throw new ApiError(await readError(res, `获取个股详情失败 (HTTP ${res.status})`), res.status);
|
||||
|
||||
Reference in New Issue
Block a user