1use std::collections::HashMap;
2
3use crate::model::candle::Candle;
4use crate::model::signal::Signal;
5use crate::model::tick::Tick;
6use crate::order_manager::{OrderHistorySnapshot, OrderUpdate};
7
8#[derive(Debug, Clone)]
9pub enum WsConnectionStatus {
10 Connected,
11 Disconnected,
12 Reconnecting { attempt: u32, delay_ms: u64 },
13}
14
15#[derive(Debug, Clone)]
16pub enum AppEvent {
17 MarketTick(Tick),
18 StrategySignal(Signal),
19 StrategyState {
20 fast_sma: Option<f64>,
21 slow_sma: Option<f64>,
22 },
23 OrderUpdate(OrderUpdate),
24 WsStatus(WsConnectionStatus),
25 HistoricalCandles {
26 candles: Vec<Candle>,
27 interval_ms: u64,
28 interval: String,
29 },
30 BalanceUpdate(HashMap<String, f64>),
31 OrderHistoryUpdate(OrderHistorySnapshot),
32 LogMessage(String),
33 Error(String),
34}