Refactored codebase to Strategy instead of plugin

This commit is contained in:
2026-07-30 03:42:59 +02:00
parent 72a0145860
commit 660a0cb66a
7 changed files with 25 additions and 25 deletions
+54
View File
@@ -0,0 +1,54 @@
use crate::{
general::{EventLog, Signal},
terminal::MarketItem,
};
use hypersdk::hypercore::{Candle, CandleInterval, Incoming, Subscription};
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct StrategyManifest {
pub name: String,
pub description: String,
pub author: String,
pub version: String,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub enum StrategyMessage {
Log(EventLog),
GetWatchList,
GetCandlestick {
symbol: String,
interval: CandleInterval,
count: u32,
},
Subscribe(Subscription),
Unsubscribe(Subscription),
UnsubscribeAll,
Signal(Signal),
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub enum StrategyEngineMessage {
Initialize,
WatchList(Vec<MarketItem>),
Command {
command: String,
args: Vec<String>,
},
Incoming(Incoming),
Candlestick {
symbol: String,
interval: CandleInterval,
candles: Vec<Candle>,
},
}