public void Dispose() { alpacaTradingClient?.Dispose(); polygonDataClient?.Dispose(); alpacaStreamingClient?.Dispose(); polygonStreamingClient?.Dispose(); }
public static async Task StopAsync() { // TODO: Should we liquidate on stop? await Disconnect(); AlpacaTradingClient?.Dispose(); AlpacaStreamingClient?.Dispose(); PolygonDataClient?.Dispose(); PolygonStreamingClient?.Dispose(); await Scheduler?.Shutdown(); }