- RiskManager halts + flattens on max daily loss / drawdown, caps position size and trades per day; adds a manual kill switch (POST /api/bot/kill). - Telegram and webhook notifications on trades, errors and halts. - Optional API bearer token on /api, injected server-side by the frontend nginx so the browser never sees it. - Kraken and Coinbase market data (public); Coinbase live broker. Live on an unsupported exchange now errors instead of silently falling back to paper. - Strategy presets backed by the StrategyConfig table (CRUD API + UI). - Idempotent additive-column migration so existing SQLite databases upgrade in place (fixes the new strategy_configs.name column).
29 lines
907 B
Vue
29 lines
907 B
Vue
<script setup>
|
|
import { fmtTime } from '../format'
|
|
|
|
defineProps({
|
|
events: { type: Array, required: true },
|
|
})
|
|
|
|
const levelClass = {
|
|
info: 'text-slate-300',
|
|
trade: 'text-sky-300',
|
|
warning: 'text-amber-300',
|
|
error: 'text-rose-300',
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="card">
|
|
<h2 class="mb-3 font-semibold">Activity</h2>
|
|
<div class="max-h-72 space-y-1 overflow-y-auto font-mono text-xs">
|
|
<div v-for="e in events" :key="e.id" class="flex gap-2 border-b border-edge/40 py-1">
|
|
<span class="shrink-0 text-slate-500">{{ fmtTime(e.created_at) }}</span>
|
|
<span class="shrink-0" :class="levelClass[e.level] || 'text-slate-300'">[{{ e.level }}]</span>
|
|
<span :class="levelClass[e.level] || 'text-slate-300'">{{ e.message }}</span>
|
|
</div>
|
|
<div v-if="!events.length" class="py-6 text-center text-slate-500">No activity yet</div>
|
|
</div>
|
|
</div>
|
|
</template>
|