Format trade prices to 3 decimals and round on ingest.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-21 10:30:21 +08:00
parent c436b76e64
commit a6062fbacc
4 changed files with 49 additions and 11 deletions
+3 -3
View File
@@ -56,10 +56,10 @@
<td>{{ t.symbol }}</td>
<td><span class="tag {% if t.side=='buy' %}green{% else %}red{% endif %}">{{ t.side }}</span></td>
<td>{{ t.volume }}</td>
<td>{{ t.open_price }}</td>
<td>{{ t.close_price if t.close_price is not none else '—' }}</td>
<td>{{ t.open_price|fmt_price }}</td>
<td>{{ t.close_price|fmt_price }}</td>
<td style="color:{% if t.profit and t.profit>0 %}var(--green){% elif t.profit and t.profit<0 %}var(--red){% else %}inherit{% endif %}">
{{ t.profit if t.profit is not none else '—' }}
{{ t.profit|fmt_money }}
</td>
<td class="muted" style="white-space:nowrap">{{ t.open_time_fmt }}</td>
<td class="muted" style="white-space:nowrap">{{ t.close_time_fmt }}</td>