VIX Index
--.--
Trading Active
This Week
Deploy 50.90 USDT to yield
Watchlist
| Asset | Sector | Trigger |
| ARB | L2 | > $1.20 |
| FET | AI | < $1.80 |
| ONDO | RWA | Watch |
Risk Limits
Max Position
20%
Per asset
Max Alts
30%
Of portfolio
Buffer
10-15%
Stablecoins
let lastVixFetch = 0;
async function fetchMarketData() {
try {
// VIX - fetch every 60 seconds
const now = Date.now();
if (now - lastVixFetch > 60000) {
lastVixFetch = now;
let vix = null;
// Source 1: CBOE
try {
const vixResponse = await fetch('https://api.cboe.com/pub/market_quotes/indices/VIX.json', { cache: 'no-store' });
if (vixResponse.ok) {
const vixData = await vixResponse.json();
vix = vixData.VIX?.last || vixData.VIX?.prc;
}
} catch (e) { console.log('CBOE fetch failed:', e); }
// Source 2: Yahoo Finance fallback
if (!vix) {
try {
const altResponse = await fetch('https://query1.finance.yahoo.com/v8/finance/chart/%5EVIX?range=1d&interval=1m', { cache: 'no-store' });
if (altResponse.ok) {
const altData = await altResponse.json();
vix = altData.chart?.result?.[0]?.meta?.regularMarketPrice;
}
} catch (e) { console.log('Yahoo fetch failed:', e); }
}
// Source 3: Last known value
if (!vix) vix = 17.48;
updateVIXDisplay(vix);
}
// BTC/ETH prices - fetch every time
const pricesResponse = await fetch('https://api.binance.com/api/v3/ticker/price');
if (pricesResponse.ok) {
const prices = await pricesResponse.json();
const btc = prices.find(p => p.symbol === 'BTCUSDT');
const eth = prices.find(p => p.symbol === 'ETHUSDT');
if (btc) document.getElementById('btcPrice').textContent = `$${Number(btc.price).toLocaleString('en-US')}`;
if (eth) document.getElementById('ethPrice').textContent = `$${Number(eth.price).toLocaleString('en-US')}`;
}
} catch (error) {
console.error('Market data error:', error);
}
}
// Initial fetch + refresh every minute
fetchMarketData();
setInterval(fetchMarketData, 60000);
function updateVIXDisplay(vix) {
const vixValue = document.getElementById('vixValue');
const vixCard = document.getElementById('vixCard');
const vixStatus = document.getElementById('vixStatus');
const vixStatusText = document.getElementById('vixStatusText');
vixValue.textContent = vix.toFixed(2);
if (vix < 18) {
vixCard.className = 'card vix-card active';
vixStatus.className = 'status-badge status-active';
vixStatusText.textContent = 'Trading Active';
} else {
vixCard.className = 'card vix-card halted';
vixStatus.className = 'status-badge status-halted';
vixStatusText.textContent = 'Trading Halted';
}
}
// Checklist - load state from localStorage
function loadTaskState() {
const saved = localStorage.getItem('tradingTasks');
const completedTasks = saved ? JSON.parse(saved) : [];
document.querySelectorAll('.checklist-item').forEach(item => {
const task = item.querySelector('.checkbox').dataset.task;
if (completedTasks.includes(task)) {
item.classList.add('completed');
item.querySelector('.checkbox').classList.add('checked');
}
});
}
// Save task state
function saveTaskState() {
const completedTasks = [];
document.querySelectorAll('.checklist-item').forEach(item => {
if (item.classList.contains('completed')) {
const task = item.querySelector('.checkbox').dataset.task;
completedTasks.push(task);
}
});
localStorage.setItem('tradingTasks', JSON.stringify(completedTasks));
}
// Toggle task completion
document.querySelectorAll('.checkbox').forEach(cb => {
cb.addEventListener('click', function() {
const item = this.closest('.checklist-item');
this.classList.toggle('checked');
item.classList.toggle('completed');
saveTaskState();
});
});
// Load saved state on page load
loadTaskState();