2018-05-22 10:11:50 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
namespace Core.Main.DataObjects.PTMagicData
|
|
|
|
|
{
|
|
|
|
|
public class GeneralSettingsWrapper
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public GeneralSettings GeneralSettings { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class AnalyzerSettingsWrapper
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public AnalyzerSettings AnalyzerSettings { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class SecureSettingsWrapper
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public SecureSettings SecureSettings { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-07 22:53:49 +01:00
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class GeneralSettings
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public Application Application { get; set; }
|
|
|
|
|
public Monitor Monitor { get; set; }
|
|
|
|
|
public Backup Backup { get; set; }
|
|
|
|
|
public Telegram Telegram { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class Application
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public bool IsEnabled { get; set; } = true;
|
|
|
|
|
public bool TestMode { get; set; } = true;
|
|
|
|
|
public bool EnableBetaFeatures { get; set; } = false;
|
2018-12-29 04:09:00 +01:00
|
|
|
|
public string ProfitTrailerLicense { get; set; } = "";
|
2021-06-20 20:07:55 +02:00
|
|
|
|
public string ProfitTrailerLicenseXtra { get; set; } = "";
|
2019-01-07 15:33:02 +01:00
|
|
|
|
public string ProfitTrailerServerAPIToken { get; set; }
|
2021-06-20 20:07:55 +02:00
|
|
|
|
public string ProfitTrailerMonitorURL { get; set; } = "";
|
|
|
|
|
public string ProfitTrailerMonitorURLXtra { get; set; } = "";
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string ProfitTrailerDefaultSettingName { get; set; } = "default";
|
|
|
|
|
public int FloodProtectionMinutes { get; set; } = 15;
|
|
|
|
|
public string Exchange { get; set; }
|
|
|
|
|
public string InstanceName { get; set; } = "PT Magic";
|
2024-01-23 19:05:28 +01:00
|
|
|
|
//public string TimezoneOffset { get; set; } = "+0:00";
|
2018-12-01 15:05:35 +01:00
|
|
|
|
public string CoinMarketCapAPIKey { get; set; }
|
2023-12-14 03:54:28 +01:00
|
|
|
|
//public string FreeCurrencyConverterAPIKey { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class Monitor
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
private string _rootUrl = "/";
|
|
|
|
|
|
|
|
|
|
public bool IsPasswordProtected { get; set; } = true;
|
|
|
|
|
public bool OpenBrowserOnStart { get; set; } = false;
|
|
|
|
|
public int Port { get; set; } = 5000;
|
2020-01-16 12:50:42 +01:00
|
|
|
|
public string AnalyzerChart { get; set; } = "";
|
2024-01-23 19:05:28 +01:00
|
|
|
|
public int LiveTCVTimeframeMinutes { get; set; } = 60;
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public int GraphIntervalMinutes { get; set; } = 60;
|
|
|
|
|
public int GraphMaxTimeframeHours { get; set; } = 24;
|
2024-01-10 16:58:09 +01:00
|
|
|
|
public int ProfitsMaxTimeframeDays { get; set; } = 60;
|
2024-02-02 18:22:39 +01:00
|
|
|
|
public int DashboardChartsRefreshSeconds { get; set; } = 30;
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public int BagAnalyzerRefreshSeconds { get; set; } = 5;
|
|
|
|
|
public int BuyAnalyzerRefreshSeconds { get; set; } = 5;
|
|
|
|
|
public int MaxTopMarkets { get; set; } = 20;
|
|
|
|
|
public int MaxDailySummaries { get; set; } = 10;
|
|
|
|
|
public int MaxMonthlySummaries { get; set; } = 10;
|
|
|
|
|
public int MaxDashboardBuyEntries { get; set; } = 10;
|
|
|
|
|
public int MaxDashboardBagEntries { get; set; } = 10;
|
|
|
|
|
public int MaxDCAPairs { get; set; } = 24;
|
|
|
|
|
public int MaxSettingsLogEntries { get; set; } = 20;
|
|
|
|
|
public string LinkPlatform { get; set; } = "TradingView";
|
2024-01-23 19:05:28 +01:00
|
|
|
|
public string TVCustomLayout { get; set; } = "";
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string DefaultDCAMode { get; set; } = "Simple";
|
2019-01-14 04:21:30 +01:00
|
|
|
|
public string TvStudyA { get; set; } = "";
|
|
|
|
|
public string TvStudyB { get; set; } = "";
|
|
|
|
|
public string TvStudyC { get; set; } = "";
|
|
|
|
|
public string TvStudyD { get; set; } = "";
|
2019-03-19 00:32:10 +01:00
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public string RootUrl
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
if (!_rootUrl.EndsWith("/")) _rootUrl += "/";
|
|
|
|
|
return _rootUrl;
|
|
|
|
|
}
|
2018-12-15 22:07:29 +01:00
|
|
|
|
set
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
_rootUrl = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class Backup
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public bool IsEnabled { get; set; } = true;
|
|
|
|
|
public int MaxHours { get; set; } = 48;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class Telegram
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public bool IsEnabled { get; set; } = false;
|
|
|
|
|
public string BotToken { get; set; }
|
|
|
|
|
public Int64 ChatId { get; set; }
|
|
|
|
|
public bool SilentMode { get; set; } = false;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class AnalyzerSettings
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public MarketAnalyzer MarketAnalyzer { get; set; }
|
|
|
|
|
public List<GlobalSetting> GlobalSettings { get; set; }
|
|
|
|
|
public List<SingleMarketSetting> SingleMarketSettings { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class MarketAnalyzer
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public int StoreDataMaxHours { get; set; }
|
|
|
|
|
public int IntervalMinutes { get; set; } = 5;
|
|
|
|
|
public bool ExcludeMainCurrency { get; set; } = true;
|
|
|
|
|
public List<MarketTrend> MarketTrends { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class MarketTrend
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string Platform { get; set; } = "Exchange";
|
|
|
|
|
|
|
|
|
|
[DefaultValue("Market")]
|
|
|
|
|
public string TrendCurrency { get; set; } = "Market";
|
2024-01-10 16:58:09 +01:00
|
|
|
|
public string SplitCamelCaseName { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
|
|
|
|
|
[DefaultValue(0)]
|
|
|
|
|
public int MaxMarkets { get; set; } = 0;
|
|
|
|
|
public int TrendMinutes { get; set; } = 0;
|
|
|
|
|
|
|
|
|
|
[DefaultValue(true)]
|
|
|
|
|
public bool DisplayGraph { get; set; } = true;
|
|
|
|
|
|
|
|
|
|
[DefaultValue(true)]
|
|
|
|
|
public bool DisplayOnMarketAnalyzerList { get; set; } = true;
|
|
|
|
|
|
|
|
|
|
[DefaultValue("")]
|
|
|
|
|
public string IgnoredMarkets { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
[DefaultValue("")]
|
|
|
|
|
public string AllowedMarkets { get; set; } = "";
|
|
|
|
|
|
2021-01-30 17:32:36 +01:00
|
|
|
|
[DefaultValue(0)]
|
2021-01-31 18:29:15 +01:00
|
|
|
|
public int TrendThreshold { get; set; } = 0;
|
2021-01-30 17:32:36 +01:00
|
|
|
|
|
2018-05-22 10:11:50 +02:00
|
|
|
|
[DefaultValue(true)]
|
|
|
|
|
public bool ExcludeMainCurrency { get; set; } = true;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class GlobalSetting
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string SettingName { get; set; }
|
|
|
|
|
public string TriggerConnection { get; set; } = "AND";
|
|
|
|
|
public List<Trigger> Triggers { get; set; } = new List<Trigger>();
|
|
|
|
|
public Dictionary<string, object> PairsProperties { get; set; } = new Dictionary<string, object>();
|
|
|
|
|
public Dictionary<string, object> DCAProperties { get; set; } = new Dictionary<string, object>();
|
|
|
|
|
public Dictionary<string, object> IndicatorsProperties { get; set; } = new Dictionary<string, object>();
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class SingleMarketSetting
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string SettingName { get; set; }
|
2024-01-28 11:52:37 +01:00
|
|
|
|
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string TriggerConnection { get; set; } = "AND";
|
|
|
|
|
|
|
|
|
|
[DefaultValue("AND")]
|
|
|
|
|
public string OffTriggerConnection { get; set; } = "AND";
|
|
|
|
|
|
|
|
|
|
[DefaultValue(true)]
|
|
|
|
|
public bool RefreshOffTriggers { get; set; } = true;
|
|
|
|
|
|
|
|
|
|
[DefaultValue("")]
|
|
|
|
|
public string IgnoredMarkets { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
[DefaultValue("")]
|
|
|
|
|
public string AllowedMarkets { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
[DefaultValue("")]
|
|
|
|
|
public string IgnoredGlobalSettings { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
[DefaultValue("")]
|
|
|
|
|
public string AllowedGlobalSettings { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
[DefaultValue(false)]
|
|
|
|
|
public bool StopProcessWhenTriggered { get; set; } = false;
|
|
|
|
|
public List<Trigger> Triggers { get; set; } = new List<Trigger>();
|
|
|
|
|
public List<OffTrigger> OffTriggers { get; set; } = new List<OffTrigger>();
|
|
|
|
|
public Dictionary<string, object> PairsProperties { get; set; } = new Dictionary<string, object>();
|
|
|
|
|
public Dictionary<string, object> DCAProperties { get; set; } = new Dictionary<string, object>();
|
|
|
|
|
public Dictionary<string, object> IndicatorsProperties { get; set; } = new Dictionary<string, object>();
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class Trigger
|
2024-01-28 11:52:37 +01:00
|
|
|
|
{
|
|
|
|
|
[DefaultValue("")]
|
2024-01-29 10:50:32 +01:00
|
|
|
|
public string Tag { get; set; } = "";
|
2024-01-28 11:52:37 +01:00
|
|
|
|
|
2018-05-22 10:11:50 +02:00
|
|
|
|
[DefaultValue("")]
|
|
|
|
|
public string MarketTrendName { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
[DefaultValue("Relative")]
|
|
|
|
|
public string MarketTrendRelation { get; set; } = "Relative";
|
|
|
|
|
|
|
|
|
|
[DefaultValue(Constants.MaxTrendChange)]
|
|
|
|
|
public double MaxChange { get; set; } = Constants.MaxTrendChange;
|
|
|
|
|
|
|
|
|
|
[DefaultValue(Constants.MinTrendChange)]
|
|
|
|
|
public double MinChange { get; set; } = Constants.MinTrendChange;
|
|
|
|
|
|
|
|
|
|
[DefaultValue(Constants.Max24hVolume)]
|
|
|
|
|
public double Max24hVolume { get; set; } = Constants.Max24hVolume;
|
|
|
|
|
|
|
|
|
|
[DefaultValue(0.0)]
|
|
|
|
|
public double Min24hVolume { get; set; } = 0.0;
|
|
|
|
|
|
|
|
|
|
[DefaultValue(0)]
|
|
|
|
|
public int AgeDaysLowerThan { get; set; } = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class OffTrigger
|
2024-01-28 11:52:37 +01:00
|
|
|
|
{
|
|
|
|
|
[DefaultValue("")]
|
2024-01-29 10:50:32 +01:00
|
|
|
|
public string Tag { get; set; } = "";
|
2024-01-28 11:52:37 +01:00
|
|
|
|
|
2018-05-22 10:11:50 +02:00
|
|
|
|
[DefaultValue("")]
|
|
|
|
|
public string MarketTrendName { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
[DefaultValue("Relative")]
|
|
|
|
|
public string MarketTrendRelation { get; set; } = "Relative";
|
|
|
|
|
|
|
|
|
|
[DefaultValue(Constants.MaxTrendChange)]
|
|
|
|
|
public double MaxChange { get; set; } = Constants.MaxTrendChange;
|
|
|
|
|
|
|
|
|
|
[DefaultValue(Constants.MinTrendChange)]
|
|
|
|
|
public double MinChange { get; set; } = Constants.MinTrendChange;
|
|
|
|
|
|
|
|
|
|
[DefaultValue(Constants.Max24hVolume)]
|
|
|
|
|
public double Max24hVolume { get; set; } = Constants.Max24hVolume;
|
|
|
|
|
|
|
|
|
|
[DefaultValue(0.0)]
|
|
|
|
|
public double Min24hVolume { get; set; } = 0.0;
|
|
|
|
|
|
|
|
|
|
[DefaultValue(0)]
|
|
|
|
|
public int HoursSinceTriggered { get; set; } = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class SecureSettings
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string MonitorPassword { get; set; } = "";
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class Market
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public int Position;
|
|
|
|
|
public string Name = "";
|
|
|
|
|
public string Symbol = "";
|
|
|
|
|
public double Volume24h = 0.0;
|
|
|
|
|
public double Price = 0.0;
|
|
|
|
|
public double TrendChange24h = 0.0;
|
|
|
|
|
public double MainCurrencyPriceUSD = 0.0;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class MarketTick
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public double Volume24h = 0.0;
|
|
|
|
|
public double Price = 0.0;
|
|
|
|
|
public DateTime Time = Constants.confMinDate;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class MarketTrendChange
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string MarketTrendName = "";
|
|
|
|
|
public string Market = "";
|
|
|
|
|
public double LastPrice = 0.0;
|
|
|
|
|
public double Volume24h = 0.0;
|
|
|
|
|
public double TrendMinutes = 0.0;
|
|
|
|
|
public double TrendChange = 0.0;
|
|
|
|
|
public DateTime TrendDateTime = Constants.confMinDate;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class MarketInfo
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string Name = "";
|
|
|
|
|
public DateTime FirstSeen = Constants.confMinDate;
|
|
|
|
|
public DateTime LastSeen = Constants.confMaxDate;
|
|
|
|
|
}
|
2024-01-07 22:53:49 +01:00
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class Summary
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string Version { get; set; } = "";
|
|
|
|
|
public DateTime LastRuntime { get; set; } = Constants.confMinDate;
|
|
|
|
|
public int LastRuntimeSeconds { get; set; } = 0;
|
|
|
|
|
public DateTime LastGlobalSettingSwitch { get; set; } = Constants.confMinDate;
|
|
|
|
|
public GlobalSetting CurrentGlobalSetting { get; set; } = null;
|
|
|
|
|
public GlobalSetting FloodProtectedSetting { get; set; } = null;
|
|
|
|
|
public bool IsSOMActive { get; set; } = false;
|
|
|
|
|
public Dictionary<string, MarketPairSummary> MarketSummary { get; set; } = new Dictionary<string, MarketPairSummary>();
|
|
|
|
|
public Dictionary<string, List<MarketTrendChange>> MarketTrendChanges { get; set; } = new Dictionary<string, List<MarketTrendChange>>();
|
|
|
|
|
public List<GlobalSettingSummary> GlobalSettingSummary { get; set; } = new List<DataObjects.PTMagicData.GlobalSettingSummary>();
|
|
|
|
|
public double BuyValue { get; set; } = 0;
|
|
|
|
|
public double TrailingBuy { get; set; } = 0;
|
|
|
|
|
public double SellValue { get; set; } = 0;
|
|
|
|
|
public double TrailingProfit { get; set; } = 0;
|
|
|
|
|
public double MaxTradingPairs { get; set; } = 0;
|
|
|
|
|
public double MaxCost { get; set; } = 0;
|
|
|
|
|
public double MaxCostPercentage { get; set; } = 0;
|
|
|
|
|
public double MinBuyVolume { get; set; } = 0;
|
|
|
|
|
public double DCALevels { get; set; } = 0;
|
|
|
|
|
public double DCATrigger { get; set; } = 0;
|
|
|
|
|
public Dictionary<int, double> DCATriggers { get; set; } = new Dictionary<int, double>();
|
|
|
|
|
public double DCAPercentage { get; set; } = 0;
|
|
|
|
|
public Dictionary<int, double> DCAPercentages { get; set; } = new Dictionary<int, double>();
|
|
|
|
|
public string DCABuyStrategy { get; set; } = "";
|
|
|
|
|
public string BuyStrategy { get; set; } = "";
|
|
|
|
|
public string SellStrategy { get; set; } = "";
|
|
|
|
|
public string MainMarket { get; set; } = "";
|
|
|
|
|
public double MainMarketPrice { get; set; } = 0;
|
2024-01-07 22:53:49 +01:00
|
|
|
|
private PropertiesData _propertiesData = new PropertiesData();
|
|
|
|
|
public string MainFiatCurrency => _propertiesData.Currency;
|
2024-01-15 15:12:46 +01:00
|
|
|
|
private MiscData _miscData = new MiscData();
|
|
|
|
|
public double MainFiatCurrencyExchangeRate => _miscData.FiatConversionRate;
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public List<StrategySummary> BuyStrategies { get; set; } = new List<StrategySummary>();
|
|
|
|
|
public List<StrategySummary> SellStrategies { get; set; } = new List<StrategySummary>();
|
|
|
|
|
public List<StrategySummary> DCABuyStrategies { get; set; } = new List<StrategySummary>();
|
|
|
|
|
public List<StrategySummary> DCASellStrategies { get; set; } = new List<StrategySummary>();
|
|
|
|
|
}
|
2024-01-07 22:53:49 +01:00
|
|
|
|
public class PropertiesData
|
|
|
|
|
{
|
|
|
|
|
public string Currency { get; set; } = "";
|
|
|
|
|
public bool Shorting { get; set; } = false;
|
|
|
|
|
public bool Margin { get; set; } = false;
|
|
|
|
|
public string UpTime { get; set; } = "";
|
|
|
|
|
public int Port { get; set; } = 0;
|
|
|
|
|
public bool IsLeverageExchange { get; set; } = false;
|
|
|
|
|
public string BaseUrl { get; set; } = "";
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class StrategySummary
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string Name { get; set; } = "";
|
|
|
|
|
public double Value { get; set; } = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class GlobalSettingSummary
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string SettingName { get; set; }
|
|
|
|
|
public DateTime SwitchDateTime { get; set; }
|
|
|
|
|
public int ActiveSeconds { get; set; } = 0;
|
|
|
|
|
public Dictionary<string, MarketTrendChange> MarketTrendChanges { get; set; } = new Dictionary<string, MarketTrendChange>();
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class MarketPairSummary
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public bool IsTradingEnabled { get; set; } = false;
|
|
|
|
|
public bool IsSOMActive { get; set; } = false;
|
|
|
|
|
public bool IsDCAEnabled { get; set; } = false;
|
|
|
|
|
public List<SingleMarketSetting> ActiveSingleSettings { get; set; } = null;
|
|
|
|
|
public double CurrentBuyValue { get; set; } = 0;
|
|
|
|
|
public double CurrentTrailingBuy { get; set; } = 0;
|
|
|
|
|
public double CurrentSellValue { get; set; } = 0;
|
|
|
|
|
public double CurrentTrailingProfit { get; set; } = 0;
|
|
|
|
|
public double LatestPrice { get; set; } = 0;
|
|
|
|
|
public double Latest24hVolume { get; set; } = 0;
|
|
|
|
|
public Dictionary<string, double> MarketTrendChanges { get; set; } = new Dictionary<string, double>();
|
|
|
|
|
public List<StrategySummary> BuyStrategies { get; set; } = new List<StrategySummary>();
|
|
|
|
|
public List<StrategySummary> SellStrategies { get; set; } = new List<StrategySummary>();
|
|
|
|
|
public List<StrategySummary> DCABuyStrategies { get; set; } = new List<StrategySummary>();
|
|
|
|
|
public List<StrategySummary> DCASellStrategies { get; set; } = new List<StrategySummary>();
|
|
|
|
|
}
|
2024-01-07 22:53:49 +01:00
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class Transaction
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string GUID { get; set; } = "";
|
|
|
|
|
public DateTime UTCDateTime { get; set; } = Constants.confMinDate;
|
|
|
|
|
public double Amount { get; set; } = 0.0;
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public DateTime GetLocalDateTime(string offset)
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
DateTimeOffset result = this.UTCDateTime;
|
|
|
|
|
|
|
|
|
|
// Convert UTC sales time to local offset time
|
|
|
|
|
TimeSpan offsetTimeSpan = TimeSpan.Parse(offset.Replace("+", ""));
|
|
|
|
|
result = result.ToOffset(offsetTimeSpan);
|
|
|
|
|
|
|
|
|
|
return result.DateTime;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-01-07 22:53:49 +01:00
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class SingleMarketSettingSummary
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string Market { get; set; } = "";
|
|
|
|
|
public DateTime ActivationDateTimeUTC { get; set; } = Constants.confMinDate;
|
|
|
|
|
public SingleMarketSetting SingleMarketSetting { get; set; } = null;
|
|
|
|
|
public TriggerSnapshot TriggerSnapshot { get; set; } = null;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class TriggerSnapshot
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public Dictionary<int, double> RelevantTriggers { get; set; } = new Dictionary<int, double>();
|
|
|
|
|
public List<string> MatchedTriggersContent { get; set; } = new List<string>();
|
|
|
|
|
public double LastPrice { get; set; } = 0;
|
|
|
|
|
public double Last24hVolume { get; set; } = 0;
|
|
|
|
|
}
|
2023-12-30 06:46:45 +01:00
|
|
|
|
|
|
|
|
|
public class StatsData
|
|
|
|
|
{
|
|
|
|
|
public double SalesToday { get; set; }
|
|
|
|
|
public double ProfitToday { get; set; }
|
|
|
|
|
public double ProfitPercToday { get; set; }
|
|
|
|
|
public double SalesYesterday { get; set; }
|
|
|
|
|
public double ProfitYesterday { get; set; }
|
|
|
|
|
public double ProfitPercYesterday { get; set; }
|
|
|
|
|
public double SalesWeek { get; set; }
|
|
|
|
|
public double ProfitWeek { get; set; }
|
|
|
|
|
public double ProfitPercWeek { get; set; }
|
2024-01-07 22:53:49 +01:00
|
|
|
|
public double SalesThisMonth { get; set; }
|
|
|
|
|
public double ProfitThisMonth { get; set; }
|
|
|
|
|
public double ProfitPercThisMonth { get; set; }
|
|
|
|
|
public double SalesLastMonth { get; set; }
|
|
|
|
|
public double ProfitLastMonth { get; set; }
|
|
|
|
|
public double ProfitPercLastMonth { get; set; }
|
2023-12-30 06:46:45 +01:00
|
|
|
|
public double TotalProfit { get; set; }
|
|
|
|
|
public double TotalSales { get; set; }
|
|
|
|
|
public double TotalProfitPerc { get; set; }
|
|
|
|
|
public double FundingToday { get; set; }
|
|
|
|
|
public double FundingYesterday { get; set; }
|
|
|
|
|
public double FundingWeek { get; set; }
|
2024-01-07 22:53:49 +01:00
|
|
|
|
public double FundingThisMonth { get; set; }
|
|
|
|
|
public double FundingLastMonth { get; set; }
|
2023-12-30 06:46:45 +01:00
|
|
|
|
public double FundingTotal { get; set; }
|
2024-01-16 17:56:52 +01:00
|
|
|
|
public double TotalFundingPerc { get; set; }
|
|
|
|
|
public double TotalFundingPercYesterday { get; set; }
|
|
|
|
|
public double TotalFundingPercWeek { get; set; }
|
|
|
|
|
public double TotalFundingPercToday { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
}
|
|
|
|
|
|
2024-01-07 22:53:49 +01:00
|
|
|
|
public class DailyPNLData
|
|
|
|
|
{
|
|
|
|
|
public string Date { get; set; }
|
|
|
|
|
public double CumulativeProfitCurrency { get; set; }
|
|
|
|
|
public double Order { get; set; }
|
2024-01-15 15:12:46 +01:00
|
|
|
|
|
2024-01-16 17:56:52 +01:00
|
|
|
|
}
|
|
|
|
|
public class DailyTCVData
|
|
|
|
|
{
|
|
|
|
|
public string Date { get; set; }
|
|
|
|
|
public double TCV { get; set; }
|
|
|
|
|
public double Order { get; set; }
|
|
|
|
|
|
2024-01-15 15:12:46 +01:00
|
|
|
|
}
|
|
|
|
|
public class MonthlyStatsData
|
|
|
|
|
{
|
|
|
|
|
public string Month { get; set; }
|
|
|
|
|
public double TotalProfitCurrency { get; set; }
|
|
|
|
|
public double TotalSales { get; set; }
|
|
|
|
|
public double AvgGrowth { get; set; }
|
2024-01-16 17:56:52 +01:00
|
|
|
|
public double Order { get; set; }
|
2024-01-17 18:13:09 +01:00
|
|
|
|
}
|
|
|
|
|
public class ProfitablePairsData
|
|
|
|
|
{
|
|
|
|
|
public string Coin { get; set; }
|
|
|
|
|
public double ProfitCurrency { get; set; }
|
|
|
|
|
public int SoldTimes { get; set; }
|
|
|
|
|
public double Avg { get; set; }
|
2024-01-07 22:53:49 +01:00
|
|
|
|
}
|
2024-01-19 00:11:16 +01:00
|
|
|
|
public class DailyStatsData
|
|
|
|
|
{
|
|
|
|
|
public string Date { get; set; }
|
|
|
|
|
public int TotalSales { get; set; }
|
|
|
|
|
public int TotalBuys { get; set; }
|
|
|
|
|
public double TotalProfit { get; set; }
|
|
|
|
|
public double AvgProfit { get; set; }
|
|
|
|
|
|
|
|
|
|
public double AvgGrowth { get; set; }
|
|
|
|
|
}
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class PTStrategy
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string type { get; set; }
|
|
|
|
|
public string name { get; set; }
|
|
|
|
|
public double entryValue { get; set; }
|
|
|
|
|
public double entryValueLimit { get; set; }
|
|
|
|
|
public double triggerValue { get; set; }
|
|
|
|
|
public double currentValue { get; set; }
|
|
|
|
|
public double currentValuePercentage { get; set; }
|
|
|
|
|
public int decimals { get; set; }
|
|
|
|
|
public string positive { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class Strategy
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string Type { get; set; }
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public double EntryValue { get; set; }
|
|
|
|
|
public double EntryValueLimit { get; set; }
|
|
|
|
|
public double TriggerValue { get; set; }
|
|
|
|
|
public double CurrentValue { get; set; }
|
|
|
|
|
public double CurrentValuePercentage { get; set; }
|
|
|
|
|
public int Decimals { get; set; }
|
|
|
|
|
public bool IsTrailing { get; set; }
|
2018-06-05 09:40:22 +02:00
|
|
|
|
public bool IsTrue { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class DCALogData
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public int BoughtTimes { get; set; }
|
|
|
|
|
public double CurrentLowBBValue { get; set; }
|
|
|
|
|
public double CurrentHighBBValue { get; set; }
|
|
|
|
|
public double BBTrigger { get; set; }
|
|
|
|
|
public double BuyTriggerPercent { get; set; }
|
|
|
|
|
public bool IsTrailing { get; set; }
|
2018-06-05 09:40:22 +02:00
|
|
|
|
public bool IsTrue { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string Market { get; set; }
|
|
|
|
|
public double ProfitPercent { get; set; }
|
|
|
|
|
public double AverageBuyPrice { get; set; }
|
|
|
|
|
public double TotalCost { get; set; }
|
2019-03-26 01:01:43 +01:00
|
|
|
|
public double CurrentValue { get; set; }
|
2024-04-10 12:02:36 +02:00
|
|
|
|
public double? TargetGainValue { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public double Amount { get; set; }
|
|
|
|
|
public double CurrentPrice { get; set; }
|
|
|
|
|
public double SellTrigger { get; set; }
|
|
|
|
|
public double PercChange { get; set; }
|
|
|
|
|
public DateTime FirstBoughtDate { get; set; }
|
|
|
|
|
public string SellStrategy { get; set; }
|
|
|
|
|
public string BuyStrategy { get; set; }
|
2020-07-17 13:35:43 +02:00
|
|
|
|
public double Leverage { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public List<Strategy> BuyStrategies { get; set; } = new List<Strategy>();
|
|
|
|
|
public List<Strategy> SellStrategies { get; set; } = new List<Strategy>();
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-15 22:07:29 +01:00
|
|
|
|
public class BuyLogData
|
|
|
|
|
{
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public double CurrentLowBBValue { get; set; }
|
|
|
|
|
public double CurrentHighBBValue { get; set; }
|
|
|
|
|
public double BBTrigger { get; set; }
|
2019-03-26 01:01:43 +01:00
|
|
|
|
public double CurrentValue { get; set; }
|
|
|
|
|
public double TriggerValue { get; set; }
|
|
|
|
|
public string BuyStrategy { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public bool IsTrailing { get; set; }
|
2018-06-05 09:40:22 +02:00
|
|
|
|
public bool IsTrue { get; set; }
|
2019-03-19 00:32:10 +01:00
|
|
|
|
public bool IsSom { get; set; }
|
|
|
|
|
public int TrueStrategyCount { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string Market { get; set; }
|
|
|
|
|
public double ProfitPercent { get; set; }
|
|
|
|
|
public double CurrentPrice { get; set; }
|
2019-03-26 01:01:43 +01:00
|
|
|
|
public int BoughtTimes { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public double PercChange { get; set; }
|
2020-07-21 23:29:07 +02:00
|
|
|
|
public double Volume24h { get; set; }
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public List<Strategy> BuyStrategies { get; set; } = new List<Strategy>();
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-15 15:12:46 +01:00
|
|
|
|
public class MiscData
|
|
|
|
|
{
|
|
|
|
|
public double Balance { get; set; }
|
2019-03-26 01:01:43 +01:00
|
|
|
|
public double StartBalance { get; set; }
|
2024-01-07 22:53:49 +01:00
|
|
|
|
public double FiatConversionRate { get; set; }
|
2019-03-26 01:01:43 +01:00
|
|
|
|
public double PairsValue { get; set; }
|
|
|
|
|
public double DCAValue { get; set; }
|
|
|
|
|
public double PendingValue { get; set; }
|
|
|
|
|
public double DustValue { get; set; }
|
|
|
|
|
public string Market { get; set; }
|
2024-01-15 15:12:46 +01:00
|
|
|
|
public string TotalCurrentValue { get; set; }
|
|
|
|
|
public string TimeZoneOffset { get; set; }
|
2024-01-23 19:05:28 +01:00
|
|
|
|
public string ExchangeURL { get; set; }
|
|
|
|
|
public string PTVersion { get; set; }
|
2019-03-26 01:01:43 +01:00
|
|
|
|
}
|
2021-06-20 20:07:55 +02:00
|
|
|
|
}
|