FastAPI backend with a single-strategy async engine, paper and Binance brokers, pure-python indicators, a backtester that shares the engine's portfolio math, and a Vue dashboard with a live WebSocket feed. Adds the Gitea Actions CI/CD workflow that deploys to Traefik via docker_default.
43 lines
1.4 KiB
Vue
43 lines
1.4 KiB
Vue
<script setup>
|
|
import { fmtNum, fmtPrice, fmtTime } from '../format'
|
|
|
|
defineProps({
|
|
orders: { type: Array, required: true },
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div class="card">
|
|
<h2 class="mb-3 font-semibold">Orders</h2>
|
|
<div class="max-h-72 overflow-y-auto">
|
|
<table class="w-full text-left text-sm">
|
|
<thead class="label sticky top-0 bg-panel">
|
|
<tr>
|
|
<th class="pb-2">Time</th>
|
|
<th class="pb-2">Side</th>
|
|
<th class="pb-2">Symbol</th>
|
|
<th class="pb-2 text-right">Qty</th>
|
|
<th class="pb-2 text-right">Price</th>
|
|
<th class="pb-2">Reason</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="o in orders" :key="o.id" class="border-t border-edge/60">
|
|
<td class="py-2 text-slate-400">{{ fmtTime(o.created_at) }}</td>
|
|
<td class="py-2" :class="o.side === 'buy' ? 'text-emerald-400' : 'text-rose-400'">
|
|
{{ o.side }}
|
|
</td>
|
|
<td class="py-2">{{ o.symbol }}</td>
|
|
<td class="py-2 text-right tabular-nums">{{ fmtNum(o.qty) }}</td>
|
|
<td class="py-2 text-right tabular-nums">{{ fmtPrice(o.price) }}</td>
|
|
<td class="py-2 text-slate-400">{{ o.reason }}</td>
|
|
</tr>
|
|
<tr v-if="!orders.length">
|
|
<td colspan="6" class="py-6 text-center text-slate-500">No orders yet</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</template>
|