mirror of
https://github.com/RomySaputraSihananda/ares.git
synced 2026-08-15 19:58:08 +00:00
fix(web/trades): fetch deals per-day to bypass MT5 bridge per-request limit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
36037d7b2b
commit
6cd8959c2d
@@ -1,4 +1,4 @@
|
||||
import { getAccount, getDeals, type Deal } from "@/lib/mt5";
|
||||
import { getAccount, getAllDeals, type Deal } from "@/lib/mt5";
|
||||
import { formatCurrency, formatDate } from "@/lib/format";
|
||||
import EquityChart from "@/components/EquityChart";
|
||||
import TradesRefresher from "@/components/TradesRefresher";
|
||||
@@ -12,10 +12,9 @@ export default async function TradesPage() {
|
||||
let error = false;
|
||||
|
||||
try {
|
||||
const now = new Date().toISOString().slice(0, 19);
|
||||
[account, deals] = await Promise.all([
|
||||
getAccount(),
|
||||
getDeals("2026-06-01T00:00:00", now),
|
||||
getAllDeals("2026-06-10T00:00:00"),
|
||||
]);
|
||||
} catch { error = true; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user