stock 지표 수정 및 자산 분석 탭 항목 추가
This commit is contained in:
@@ -170,24 +170,29 @@ const Stock = () => {
|
||||
}, [autoRefreshMs]);
|
||||
|
||||
useEffect(() => {
|
||||
getFearAndGreed()
|
||||
.then((data) => {
|
||||
const fg = data?.fear_and_greed ?? data;
|
||||
const score = typeof fg?.score === 'number' ? fg.score : parseFloat(fg?.score);
|
||||
if (!isNaN(score)) {
|
||||
setFgData({ score, timestamp: fg?.timestamp ?? null });
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
getVix().then(setVixData).catch(() => { });
|
||||
Promise.allSettled([getTreasury10Y(), getWTI(), getBrent()])
|
||||
.then(([t, w, b]) => {
|
||||
setMacroData({
|
||||
treasury: t.status === 'fulfilled' ? t.value : null,
|
||||
wti: w.status === 'fulfilled' ? w.value : null,
|
||||
brent: b.status === 'fulfilled' ? b.value : null,
|
||||
const loadSentiment = () => {
|
||||
getFearAndGreed()
|
||||
.then((data) => {
|
||||
const fg = data?.fear_and_greed ?? data;
|
||||
const score = typeof fg?.score === 'number' ? fg.score : parseFloat(fg?.score);
|
||||
if (!isNaN(score)) {
|
||||
setFgData({ score, timestamp: fg?.timestamp ?? null });
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
getVix().then(setVixData).catch(() => { });
|
||||
Promise.allSettled([getTreasury10Y(), getWTI(), getBrent()])
|
||||
.then(([t, w, b]) => {
|
||||
setMacroData({
|
||||
treasury: t.status === 'fulfilled' ? t.value : null,
|
||||
wti: w.status === 'fulfilled' ? w.value : null,
|
||||
brent: b.status === 'fulfilled' ? b.value : null,
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
loadSentiment();
|
||||
const timer = window.setInterval(loadSentiment, 600000); // 10분마다 갱신
|
||||
return () => window.clearInterval(timer);
|
||||
}, []);
|
||||
|
||||
const indexOrder = [
|
||||
|
||||
Reference in New Issue
Block a user