public void OnHuobiLinkClicked() { var settingsPersisted = !string.IsNullOrWhiteSpace(Properties.Settings.Default.ApiKeyHuobi); var settings = new SetApiKeyView.SetApiKeyView(settingsPersisted, "Huobi API Credentials", "Permissions Needed: Read-Only, Trade", _keys.ApiKeyHuobi, _keys.SecretHuobi); var dr = settings.ShowDialog(); if (dr == DialogResult.OK) { _keys.ApiKeyHuobi = settings.ApiKey; _keys.SecretHuobi = settings.Secret; Properties.Settings.Default.ApiKeyHuobi = settings.PersistKeys ? settings.ApiKey : ""; Properties.Settings.Default.SecretHuobi = settings.PersistKeys ? settings.Secret : ""; Properties.Settings.Default.Save(); } }
public void OnBinanceLinkClicked() { var settingsPersisted = !string.IsNullOrWhiteSpace(Properties.Settings.Default.ApiKeyBinance); var settings = new SetApiKeyView.SetApiKeyView(settingsPersisted, "Binance API Credentials", "Permissions Needed: Can Read, Enable Spot Trading", _keys.ApiKeyBinance, _keys.SecretBinance); var dr = settings.ShowDialog(); if (dr == DialogResult.OK) { _keys.ApiKeyBinance = settings.ApiKey; _keys.SecretBinance = settings.Secret; Properties.Settings.Default.ApiKeyBinance = settings.PersistKeys ? settings.ApiKey : ""; Properties.Settings.Default.SecretBinance = settings.PersistKeys ? settings.Secret : ""; Properties.Settings.Default.Save(); } }
public async Task On3CommasLinkClicked() { var settingsPersisted = !string.IsNullOrWhiteSpace(Properties.Settings.Default.ApiKey3Commas); var settings = new SetApiKeyView.SetApiKeyView(settingsPersisted, "3Commas API Credentials", "Permissions Needed: BotsRead, BotsWrite, AccountsRead", _keys.ApiKey3Commas, _keys.Secret3Commas); var dr = settings.ShowDialog(); if (dr == DialogResult.OK) { _keys.ApiKey3Commas = settings.ApiKey; _keys.Secret3Commas = settings.Secret; Properties.Settings.Default.ApiKey3Commas = settings.PersistKeys ? settings.ApiKey : ""; Properties.Settings.Default.Secret3Commas = settings.PersistKeys ? settings.Secret : ""; Properties.Settings.Default.Save(); await RefreshExchangesAndBlacklist(); } }