fix: latest signals use signal-history API (last triggered signal, not realtime eval)
This commit is contained in:
parent
374615dea7
commit
71192d4209
@ -118,10 +118,12 @@ function LatestSignals() {
|
|||||||
const f = async () => {
|
const f = async () => {
|
||||||
for (const sym of COINS) {
|
for (const sym of COINS) {
|
||||||
try {
|
try {
|
||||||
const r = await authFetch(`/api/signals/latest?symbol=${sym}`);
|
const r = await authFetch(`/api/signals/signal-history?symbol=${sym}&limit=1`);
|
||||||
if (r.ok) {
|
if (r.ok) {
|
||||||
const j = await r.json();
|
const j = await r.json();
|
||||||
setSignals(prev => ({ ...prev, [sym]: j }));
|
if (j.data && j.data.length > 0) {
|
||||||
|
setSignals(prev => ({ ...prev, [sym]: j.data[0] }));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user