/* * 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 Newtonsoft.Json; using System.Collections.Generic; namespace QuantConnect.Api { /// /// Collaborator responses /// public class Collaborator { /// /// User ID /// [JsonProperty(PropertyName = "uid")] public int Uid { get; set; } /// /// Indicate if the user have live control /// [JsonProperty(PropertyName = "liveControl")] public bool LiveControl { get; set; } /// /// The permission this user is given. Can be "read" /// or "write" /// [JsonProperty(PropertyName = "permission")] public string Permission { get; set; } /// /// The user public ID /// [JsonProperty(PropertyName = "publicId")] public string PublicId { get; set; } /// /// The url of the user profile image /// [JsonProperty(PropertyName = "profileImage")] public string ProfileImage { get; set; } /// /// The registered email of the user /// [JsonProperty(PropertyName = "email")] public string Email { get; set; } /// /// The display name of the user /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// The biography of the user /// [JsonProperty(PropertyName = "bio")] public string Bio { get; set; } /// /// Indicate if the user is the owner of the project /// [JsonProperty(PropertyName = "owner")] public bool Owner { get; set; } } /// /// Library response /// public class Library { /// /// Project Id of the library project /// [JsonProperty(PropertyName = "projectId")] public int Projectid { get; set; } /// /// Name of the library project /// [JsonProperty(PropertyName = "libraryName")] public string LibraryName { get; set; } /// /// Name of the library project owner /// [JsonProperty(PropertyName = "ownerName")] public string OwnerName { get; set; } /// /// Indicate if the library project can be accessed /// [JsonProperty(PropertyName = "access")] public bool Access { get; set; } } /// /// The chart display properties /// public class GridChart { /// /// The chart name /// [JsonProperty(PropertyName = "chartName")] public string ChartName { get; set;} /// /// Width of the chart /// [JsonProperty(PropertyName = "width")] public int Width { get; set; } /// /// Height of the chart /// [JsonProperty(PropertyName = "height")] public int Height { get; set; } /// /// Number of rows of the chart /// [JsonProperty(PropertyName = "row")] public int Row { get; set; } /// /// Number of columns of the chart /// [JsonProperty(PropertyName = "column")] public int Column { get; set; } /// /// Sort of the chart /// [JsonProperty(PropertyName = "sort")] public int Sort { get; set; } /// /// Optionally related definition /// [JsonProperty(PropertyName = "definition")] public List Definition { get; set; } } /// /// The grid arrangement of charts /// public class Grid { /// /// List of chart in the xs (Extra small) position /// [JsonProperty(PropertyName = "xs")] public List Xs { get; set; } /// /// List of chart in the sm (Small) position /// [JsonProperty(PropertyName = "sm")] public List Sm { get; set; } /// /// List of chart in the md (Medium) position /// [JsonProperty(PropertyName = "md")] public List Md { get; set; } /// /// List of chart in the lg (Large) position /// [JsonProperty(PropertyName = "lg")] public List Lg { get; set; } /// /// List of chart in the xl (Extra large) position /// [JsonProperty(PropertyName = "xl")] public List Xl { get; set; } } /// /// Encryption key details /// public class EncryptionKey { /// /// Encryption key id /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } /// /// Name of the encryption key /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } } /// /// Parameter set /// public class Parameter { /// /// Name of parameter /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Value of parameter /// [JsonProperty(PropertyName = "value")] public string Value { get; set; } } /// /// Response from reading a project by id. /// public class Project : RestResponse { /// /// Project id /// [JsonProperty(PropertyName = "projectId")] public int ProjectId { get; set; } /// /// Name of the project /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Date the project was created /// [JsonProperty(PropertyName = "created")] public DateTime Created { get; set; } /// /// Modified date for the project /// [JsonProperty(PropertyName = "modified")] public DateTime Modified { get; set; } /// /// Programming language of the project /// [JsonProperty(PropertyName = "language")] public Language Language { get; set; } /// /// The projects owner id /// [JsonProperty(PropertyName = "ownerId")] public int OwnerId { get; set; } /// /// The organization ID /// [JsonProperty(PropertyName = "organizationId")] public string OrganizationId { get; set; } /// /// List of collaborators /// [JsonProperty(PropertyName = "collaborators")] public List Collaborators { get; set; } /// /// The version of LEAN this project is running on /// [JsonProperty(PropertyName = "leanVersionId")] public int LeanVersionId { get; set; } /// /// Indicate if the project is pinned to the master branch of LEAN /// [JsonProperty(PropertyName = "leanPinnedToMaster")] public bool LeanPinnedToMaster { get; set; } /// /// Indicate if you are the owner of the project /// [JsonProperty(PropertyName = "owner")] public bool Owner { get; set; } /// /// The project description /// [JsonProperty(PropertyName = "description")] public string Description { get; set; } /// /// Channel id /// [JsonProperty(PropertyName = "channelId")] public string ChannelId { get; set; } /// /// Optimization parameters /// [JsonProperty(PropertyName = "parameters")] public List Parameters { get; set; } /// /// The library projects /// [JsonProperty(PropertyName = "libraries")] public List Libraries { get; set; } /// /// Configuration of the backtest view grid /// [JsonProperty(PropertyName = "grid" )] public Grid Grid { get; set; } /// /// Configuration of the live view grid /// [JsonProperty(PropertyName = "liveGrid")] public Grid LiveGrid { get; set; } /// /// The equity value of the last paper trading instance /// [JsonProperty(PropertyName = "paperEquity")] public decimal? PaperEquity { get; set; } /// /// The last live deployment active time /// [JsonProperty(PropertyName = "lastLiveDeployment")] public DateTime? LastLiveDeployment { get; set; } /// /// The last live wizard content used /// [JsonProperty(PropertyName = "liveForm")] public object LiveForm { get; set; } /// /// Indicates if the project is encrypted /// [JsonProperty(PropertyName = "encrypted")] public bool? Encrypted { get; set; } /// /// Indicates if the project is running or not /// [JsonProperty(PropertyName = "codeRunning")] public bool CodeRunning { get; set; } /// /// LEAN environment of the project running on /// [JsonProperty(PropertyName = "leanEnvironment")] public int LeanEnvironment { get; set; } /// /// Text file with at least 32 characters to be used to encrypt the project /// [JsonProperty(PropertyName = "encryptionKey")] public EncryptionKey EncryptionKey { get; set; } } /// /// API response for version /// public class Version { /// /// ID of the LEAN version /// [JsonProperty(PropertyName = "id")] public int Id { get; set; } /// /// Date when this version was created /// [JsonProperty(PropertyName = "created")] public DateTime? Created { get; set; } /// /// Description of the LEAN version /// [JsonProperty(PropertyName = "description")] public string Description { get; set; } /// /// Commit Hash in the LEAN repository /// [JsonProperty(PropertyName = "leanHash")] public string LeanHash { get; set; } /// /// Commit Hash in the LEAN Cloud repository /// [JsonProperty(PropertyName = "leanCloudHash")] public string LeanCloudHash { get; set; } /// /// Name of the branch where the commit is /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Reference to the branch where the commit is /// [JsonProperty(PropertyName = "ref")] public string Ref { get; set; } /// /// Indicates if the version is available for the public (1) or not (0) /// [JsonProperty(PropertyName = "public")] public bool Public { get; set; } } /// /// Read versions response /// public class VersionsResponse : RestResponse { /// /// List of LEAN versions /// [JsonProperty(PropertyName = "versions")] public List Versions { get; set; } } /// /// Project list response /// public class ProjectResponse : VersionsResponse { /// /// List of projects for the authenticated user /// [JsonProperty(PropertyName = "projects")] public List Projects { get; set; } } }