/* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using System.Collections.Generic; using Newtonsoft.Json; namespace QuantConnect.Api { /// /// Class representing the REST response from QC API when creating or reading a live algorithm /// public class BaseLiveAlgorithm : RestResponse { /// /// Project id for the live instance /// public int ProjectId { get; set; } /// /// Unique live algorithm deployment identifier (similar to a backtest id). /// public string DeployId { get; set; } } /// /// Class representing the REST response from QC API when creating a live algorithm /// public class CreateLiveAlgorithmResponse : BaseLiveAlgorithm { /// /// The version of the Lean used to run the algorithm /// public int VersionId { get; set; } /// /// Id of the node that will run the algorithm /// public string Source { get; set; } /// /// HTTP status response code /// public string ResponseCode { get; set; } } /// /// Response from List Live Algorithms request to QuantConnect Rest API. /// public class LiveAlgorithmSummary : BaseLiveAlgorithm { /// /// Algorithm status: running, stopped or runtime error. /// public AlgorithmStatus Status { get; set; } /// /// Datetime the algorithm was launched in UTC. /// public DateTime Launched { get; set; } /// /// Datetime the algorithm was stopped in UTC, null if its still running. /// public DateTime? Stopped { get; set; } /// /// Brokerage /// public string Brokerage { get; set; } /// /// Chart we're subscribed to /// /// /// Data limitations mean we can only stream one chart at a time to the consumer. See which chart you're watching here. /// public string Subscription { get; set; } /// /// Live algorithm error message from a crash or algorithm runtime error. /// public string Error { get; set; } } /// /// List of the live algorithms running which match the requested status /// public class LiveList : RestResponse { /// /// Algorithm list matching the requested status. /// [JsonProperty(PropertyName = "live")] public List Algorithms { get; set; } } }