// Get's the Binance stats private void getStats() { while (true) { this.Dispatcher.BeginInvoke(new Action(() => { BinanceEndpoints.FuturesAccountInformation(); })); Thread.Sleep(TimeSpan.FromSeconds(5)); } }
public MainWindow() { InitializeComponent(); BinanceEndpoints.DirectoryCheck(); // Check for existing keys if (File.Exists(@"C:\BinanceStats\apiKey.txt")) { string apiKey = File.ReadAllText(@"C:\BinanceStats\apiKey.txt"); BinanceEndpoints.apiKey = apiKey; apiKeyText.Password = apiKey; } if (File.Exists(@"C:\BinanceStats\secretKey.txt")) { string secretKey = File.ReadAllText(@"C:\BinanceStats\secretKey.txt"); BinanceEndpoints.secretKey = secretKey; apiSecretText.Password = secretKey; } }