Bugfixes, Formatting and MainCurrency now comes from API
This commit is contained in:
parent
757479ad3e
commit
f8747bfe20
|
@ -36,16 +36,16 @@ namespace Core.Main.DataObjects.PTMagicData
|
|||
public bool TestMode { get; set; } = true;
|
||||
public bool EnableBetaFeatures { get; set; } = false;
|
||||
public string ProfitTrailerPath { get; set; }
|
||||
public string ProfitTrailerLicense { get; set; }
|
||||
public string ProfitTrailerLicense { get; set; } = "";
|
||||
public string ProfitTrailerServerAPIToken { get; set; }
|
||||
public string ProfitTrailerMonitorURL { get; set; } = "http://localhost:8081/";
|
||||
public string ProfitTrailerDefaultSettingName { get; set; } = "default";
|
||||
public bool AlwaysLoadDefaultBeforeSwitch { get; set; } = true;
|
||||
public int FloodProtectionMinutes { get; set; } = 15;
|
||||
public string Exchange { get; set; }
|
||||
public double StartBalance { get; set; }
|
||||
public double StartBalance { get; set; } = 0;
|
||||
public string InstanceName { get; set; } = "PT Magic";
|
||||
public string TimezoneOffset { get; set; }
|
||||
public string TimezoneOffset { get; set; } = "+0:00";
|
||||
public string MainFiatCurrency { get; set; } = "USD";
|
||||
public string CoinMarketCapAPIKey { get; set; }
|
||||
}
|
||||
|
|
|
@ -609,6 +609,9 @@ namespace Core.Main
|
|||
{
|
||||
bool result = true;
|
||||
|
||||
//Import Initial ProfitTrailer Information
|
||||
SettingsAPI.GetInitialProfitTrailerSettings(this.PTMagicConfiguration);
|
||||
|
||||
// Check for valid default setting
|
||||
GlobalSetting defaultSetting = this.PTMagicConfiguration.AnalyzerSettings.GlobalSettings.Find(s => s.SettingName.Equals("default", StringComparison.InvariantCultureIgnoreCase));
|
||||
if (defaultSetting == null)
|
||||
|
@ -738,9 +741,6 @@ namespace Core.Main
|
|||
result = false;
|
||||
}
|
||||
|
||||
//Import Initial ProfitTrailer Information
|
||||
SettingsAPI.GetInitialProfitTrailerSettings(this.PTMagicConfiguration);
|
||||
|
||||
if (result)
|
||||
{
|
||||
this.Log.DoLogInfo("========== CHECKS FOR Profit Trailer COMPLETED! ==========");
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace Core.MarketAnalyzer
|
|||
|
||||
for (int i = 0; i < jsonObject["data"].Count; i++)
|
||||
{
|
||||
|
||||
if (jsonObject["data"][i]["quote"]["USD"] != null)
|
||||
{
|
||||
Market market = new Market();
|
||||
|
|
|
@ -45,6 +45,7 @@ namespace Core.ProfitTrailer
|
|||
systemConfiguration.GeneralSettings.Application.Exchange = json.exchange;
|
||||
systemConfiguration.GeneralSettings.Application.TimezoneOffset = json.timeZoneOffset;
|
||||
systemConfiguration.GeneralSettings.Application.StartBalance = json.startBalance;
|
||||
systemConfiguration.GeneralSettings.Application.MainFiatCurrency = json.settings.currency;
|
||||
}
|
||||
public static List<string> GetPropertyLinesFromAPI(string ptFileName, PTMagicConfiguration systemConfiguration, LogHelper log)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
"ProfitTrailerServerAPIToken": "", //Your Profit Trailer Server API Token
|
||||
"ProfitTrailerMonitorURL": "http://localhost:8081/", // The URL to your profit trailer monitor (needed to change your settings for PT 2.0 and above)
|
||||
"ProfitTrailerDefaultSettingName": "default", // Your Profit Trailer default setting name (needed to change your settings for PT 2.0 and above)
|
||||
"MainFiatCurrency": "USD", // Your main fiat currency that will be used in the monitor
|
||||
"AlwaysLoadDefaultBeforeSwitch": true, // If this is enabled, PTMagic will always load default settings before switching to another setting
|
||||
"FloodProtectionMinutes": 15, // If a price trend is just zig-zagging around its trigger, you may want to protect your settings from getting switched back and forth every minute
|
||||
"InstanceName": "PT Magic", // The name of the instance of this bot. This will be used in your monitor and your Telegram messages. In case you are running more than one bot, you may set different names to separate them
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
"ProfitTrailerServerAPIToken": "", //Your Profit Trailer Server API Token
|
||||
"ProfitTrailerMonitorURL": "http://localhost:8081/", // The URL to your profit trailer monitor (needed to change your settings for PT 2.0 and above)
|
||||
"ProfitTrailerDefaultSettingName": "default", // Your Profit Trailer default setting name (needed to change your settings for PT 2.0 and above)
|
||||
"MainFiatCurrency": "USD", // Your main fiat currency that will be used in the monitor
|
||||
"AlwaysLoadDefaultBeforeSwitch": true, // If this is enabled, PTMagic will always load default settings before switching to another setting
|
||||
"FloodProtectionMinutes": 15, // If a price trend is just zig-zagging around its trigger, you may want to protect your settings from getting switched back and forth every minute
|
||||
"InstanceName": "PT Magic", // The name of the instance of this bot. This will be used in your monitor and your Telegram messages. In case you are running more than one bot, you may set different names to separate them
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
"ProfitTrailerServerAPIToken": "", //Your Profit Trailer Server API Token
|
||||
"ProfitTrailerMonitorURL": "http://localhost:8081/", // The URL to your profit trailer monitor (needed to change your settings for PT 2.0 and above)
|
||||
"ProfitTrailerDefaultSettingName": "default", // Your Profit Trailer default setting name (needed to change your settings for PT 2.0 and above)
|
||||
"MainFiatCurrency": "USD", // Your main fiat currency that will be used in the monitor
|
||||
"AlwaysLoadDefaultBeforeSwitch": true, // If this is enabled, PTMagic will always load default settings before switching to another setting
|
||||
"FloodProtectionMinutes": 15, // If a price trend is just zig-zagging around its trigger, you may want to protect your settings from getting switched back and forth every minute
|
||||
"InstanceName": "PT Magic", // The name of the instance of this bot. This will be used in your monitor and your Telegram messages. In case you are running more than one bot, you may set different names to separate them
|
||||
|
|
Loading…
Reference in New Issue