Throttle OKX amp-stats candle pagination and retry on 429.
Add page pauses, exponential backoff, and cooldown before swap fallback to avoid rate limits. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -274,7 +274,7 @@
|
||||
const startHour = Number(el("amp-start-hour")?.value || 16);
|
||||
const period = el("amp-period")?.value || "2m";
|
||||
const customDays = Number(el("amp-custom-days")?.value || 60);
|
||||
setStatus("计算中…(首次拉取 OKX K 线可能需数十秒)");
|
||||
setStatus("计算中…(长周期会分页拉 OKX,遇限频会自动重试,请稍候)");
|
||||
try {
|
||||
const data = await apiFetch("/api/amp-stats/compute", {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user