public void Dispose()
 {
     alpacaTradingClient?.Dispose();
     polygonDataClient?.Dispose();
     alpacaStreamingClient?.Dispose();
     polygonStreamingClient?.Dispose();
 }
Exemple #2
0
        public static async Task StopAsync()
        {
            // TODO: Should we liquidate on stop?
            await Disconnect();

            AlpacaTradingClient?.Dispose();
            AlpacaStreamingClient?.Dispose();
            PolygonDataClient?.Dispose();
            PolygonStreamingClient?.Dispose();
            await Scheduler?.Shutdown();
        }