stock/templates/index.html
2025-08-15 12:32:27 +02:00

115 lines
2.9 KiB
HTML

<!doctype html>
<html lang="pl">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Trading Dashboard</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<header>
<h1>Trading Dashboard</h1>
<div class="meta">
<span id="last-update">Ostatnia aktualizacja: —</span>
<button id="refresh-btn">Odśwież teraz</button>
</div>
</header>
<main>
<!-- KARTY -->
<section class="cards">
<div class="card">
<div class="card-title">Gotówka</div>
<div class="card-value" id="cash"></div>
</div>
<div class="card">
<div class="card-title">Wartość konta (total)</div>
<div class="card-value" id="total-value"></div>
</div>
<div class="card">
<div class="card-title">Zysk (otwarte pozycje)</div>
<div class="card-value" id="unrealized"></div>
</div>
<div class="card">
<div class="card-title">Otwarte pozycje</div>
<div class="card-value" id="open-pos"></div>
</div>
</section>
<!-- WYKRES WARTOŚCI KONTA (TOTAL) -->
<section>
<h2>Wartość konta (total) — wykres</h2>
<div class="chart-wrap">
<canvas id="totalChart" width="1200" height="300"></canvas>
</div>
</section>
<!-- WYKRES GOTÓWKI -->
<section>
<h2>Gotówka — wykres</h2>
<div class="chart-wrap">
<canvas id="cashChart" width="1200" height="300"></canvas>
</div>
</section>
<!-- Otwarte pozycje -->
<section>
<h2>Otwarte pozycje</h2>
<table id="positions-table">
<thead>
<tr>
<th>Ticker</th>
<th>Qty</th>
<th>Entry</th>
<th>Side</th>
<th>Last price</th>
<th>Unreal. PnL</th>
<th>Unreal. PnL %</th>
</tr>
</thead>
<tbody></tbody>
</table>
</section>
<!-- Ostatnie sygnały -->
<section>
<h2>Ostatnie sygnały</h2>
<table id="signals-table">
<thead>
<tr>
<th>Ticker</th>
<th>Time</th>
<th>Price</th>
<th>Signal</th>
<th>Interval</th>
</tr>
</thead>
<tbody></tbody>
</table>
</section>
<!-- Transakcje -->
<section>
<h2>Transakcje (ostatnie 50)</h2>
<table id="trades-table">
<thead>
<tr>
<th>Time</th>
<th>Action</th>
<th>Ticker</th>
<th>Price</th>
<th>Qty</th>
<th>PnL</th>
<th>PnL %</th>
<th>Cash po</th>
</tr>
</thead>
<tbody></tbody>
</table>
</section>
</main>
<script src="{{ url_for('static', filename='app.js') }}"></script>
</body>
</html>