* Start building with orlean * Add missing file * Serialize grain state * Remove grain and proxies * update and add plan * Update a bit * Fix backtest grain * Fix backtest grain * Clean a bit
44 lines
1.0 KiB
C#
44 lines
1.0 KiB
C#
using Managing.Domain.Trades;
|
|
using Orleans;
|
|
|
|
namespace Managing.Domain.Bots;
|
|
|
|
[GenerateSerializer]
|
|
public class TradingBotBackup
|
|
{
|
|
/// <summary>
|
|
/// The complete trading bot configuration
|
|
/// </summary>
|
|
[Id(0)]
|
|
public TradingBotConfig Config { get; set; }
|
|
|
|
/// <summary>
|
|
/// Runtime state: Active signals for the bot
|
|
/// </summary>
|
|
[Id(1)]
|
|
public HashSet<LightSignal> Signals { get; set; }
|
|
|
|
/// <summary>
|
|
/// Runtime state: Open and closed positions for the bot
|
|
/// </summary>
|
|
[Id(2)]
|
|
public List<Position> Positions { get; set; }
|
|
|
|
/// <summary>
|
|
/// Runtime state: Historical wallet balances over time
|
|
/// </summary>
|
|
[Id(3)]
|
|
public Dictionary<DateTime, decimal> WalletBalances { get; set; }
|
|
|
|
/// <summary>
|
|
/// Runtime state: When the bot was started
|
|
/// </summary>
|
|
[Id(4)]
|
|
public DateTime StartupTime { get; set; }
|
|
|
|
/// <summary>
|
|
/// Runtime state: When the bot was created
|
|
/// </summary>
|
|
[Id(5)]
|
|
public DateTime CreateDate { get; set; }
|
|
} |