This commit is contained in:
jack
2026-03-31 07:57:54 +08:00
parent dd4bd64a09
commit f1dd0aa64f
8 changed files with 3181 additions and 2 deletions
+2 -2
View File
@@ -132,7 +132,7 @@ class AlphaManager:
def get_alphas(
self,
total_alphas: int = 5,
total_alphas: Optional[int] = None,
limit: int = 100,
delay: int = 1,
days_back: int = 7,
@@ -226,7 +226,7 @@ class AlphaManager:
pbar = tqdm(total=min(total_available, 10000), desc="扫描Alpha", unit="条")
while len(fetched_alphas) < total_alphas and offset < total_available:
while (total_alphas is None or len(fetched_alphas) < total_alphas) and offset < total_available:
# 构建请求URL(使用时间范围,移除 region 和 universe)
url = (
f"https://api.worldquantbrain.com/users/self/alphas?stage=IS&limit={limit}"