const nav=['Home','Markets','Watchlist','Opportunities','Trading Research','AI Analyst','Alerts','Reports','Subscription','Settings']; function shell(){document.getElementById('app').innerHTML=`
Workspace / HomeEN · 简体中文

Good morning

Your unified research workspace.

ETH-USDT

Market analysis

BTC-USDT

Market analysis

Trading Research

Coming soon

`;document.getElementById('logout').onclick=async()=>{await fetch('https://api-staging.cc818.icu/api/auth/sign-out',{method:'POST',credentials:'include'});localStorage.removeItem('token');landing()};document.querySelectorAll('[data-nav]').forEach(a=>a.onclick=e=>{e.preventDefault();if(a.dataset.nav==='Markets')marketsView();else document.getElementById('content').innerHTML='

'+a.dataset.nav+'

Coming soon

'})} async function marketsView(){const c=document.getElementById('content');c.innerHTML='

Markets

Loading market data…
';try{const j=await (await fetch('https://api-staging.cc818.icu/api/markets?limit=25')).json();c.innerHTML='

Markets

Top crypto assets · Public data · Provider fallback enabled

'+j.items.map(x=>``).join('')+'
AssetPrice24hProviderStatusAction
${x.name}
${x.symbol}
${x.price==null?'—':x.price.toLocaleString()}${x.change24h==null?'—':x.change24h.toFixed(2)+'%'}${x.provider||'Unavailable'}${x.data_quality}
';c.querySelectorAll('[data-symbol]').forEach(b=>b.onclick=()=>assetView(b.dataset.symbol))}catch{c.innerHTML='

Markets

Market data unavailable
'}} async function assetView(sym){const c=document.getElementById('content');c.innerHTML='

'+sym+'

Loading…
';const j=await (await fetch('https://api-staging.cc818.icu/api/markets/'+sym)).json();c.innerHTML=`

${j.name||sym}

${sym} · ${j.provider||'Unavailable'} · ${j.data_quality}

Current price

${j.price==null?'—':j.price.toLocaleString()}

Market regime

${j.regime||'Not available'}

Direction

${j.direction||'Not available'}

Technical Indicators

Indicators will be enabled when sufficient closed-candle data is available.

`} function landing(){document.getElementById('app').innerHTML=`
● StratOS

AI-POWERED RESEARCH

Research smarter.
Trade safer.

A clean workspace for market intelligence, research and opportunities.

Build your workspace

Markets, watchlists, alerts and research in one place.

`;signin.onclick=login;start.onclick=register.onclick=register} function login(){document.getElementById('app').innerHTML=`
● StratOS

WELCOME BACK

Sign in

Create account · Forgot password?
`;reg.onclick=register;f.onsubmit=async e=>{e.preventDefault();const b=Object.fromEntries(new FormData(f));const r=await fetch('https://api-staging.cc818.icu/api/auth/sign-in/email',{method:'POST',credentials:'include',headers:{'content-type':'application/json'},body:JSON.stringify({...b,rememberMe:true})});if(r.ok){localStorage.token='cookie-session';shell()}else msg.textContent='Invalid email or password'}} function register(){document.getElementById('app').innerHTML=`
● StratOS

Create account

Sign in
`;back.onclick=login;f.onsubmit=async e=>{e.preventDefault();const b=Object.fromEntries(new FormData(f));const r=await fetch('https://api-staging.cc818.icu/api/auth/sign-up/email',{method:'POST',credentials:'include',headers:{'content-type':'application/json'},body:JSON.stringify(b)});msg.textContent=r.ok?'Account created. Please sign in.':'Registration failed'}} localStorage.token?shell():landing();