Read Live Algorithm

Live Algorithm Statistics

Introduction

If a ReadLiveAlgorithmRequest is provided details on a live algorithm are returned. If a ListLiveAlgorithmsRequest is passed get a list of live running algorithms.

Request

Dynamic arguement to specify whether seeking single project or list response. The /live/read API accepts requests in the following format:

ReadLiveAlgorithmRequest Model - Request to read out a single algorithm.
projectId integer
Id of the project to read.
deployId string
Specific instance Id to read.
Example
{
  "projectId": 0,
  "deployId": "string"
}
ListLiveAlgorithmsRequest Model - Request for a list of live running algorithms.
status string Enum
States of a live deployment. Options : ['DeployError', 'InQueue', 'Running', 'Stopped', 'Liquidated', 'Deleted', 'Completed', 'RuntimeError', 'Invalid', 'LoggingIn', 'Initializing', 'History']
start string($date-time)
Earliest launched time of the algorithms.
end string($date-time)
Latest launched time of the algorithms.
Example
{
  "status": "DeployError",
  "start": "2021-11-26T15:18:27.693Z",
  "end": "2021-11-26T15:18:27.693Z"
}
AlgorithmStatus Model - States of a live deployment.
AlgorithmStatus string Enum
States of a live deployment. Options : ['DeployError', 'InQueue', 'Running', 'Stopped', 'Liquidated', 'Deleted', 'Completed', 'RuntimeError', 'Invalid', 'LoggingIn', 'Initializing', 'History']
Example
{
  "AlgorithmStatus": "DeployError"
}

Responses

The /live/read API provides a response in the following format:

200 Success

LiveAlgorithmResults Model - Details a live algorithm from the live/read API endpoint.
LiveResults LiveResultsData object
Holds information about the state and operation of the live running algorithm.
success boolean
Indicate if the API request was successful.
errors string Array
List of errors with the API call.
Example
{
  "LiveResults": {
    "version": 0,
    "resolution": "10minute",
    "results": {
      "Holdings": {
        "Symbol": {
          "Value": "string",
          "ID": "string",
          "Permtick": "string"
        },
        "Type": "Base",
        "CurrencySymbol": "$",
        "AveragePrice": 0,
        "Quantity": 0,
        "MarketPrice": 0,
        "ConversionRate": 0,
        "MarketValue": 0,
        "UnrealizedPnl": 0
      },
      "Cash": {
        "Symbol": "string",
        "Amount": 0,
        "ConversionRate": 0,
        "CurrencySymbol": ,
        "ValueInAccountCurrency": 0
      },
      "AlphaRuntimeStatistics": {
        "MeanPopulationScore": {
          "UpdatedTimeUtc": "2021-11-26T15:18:27.693Z",
          "Direction": 0,
          "Magnitude": 0,
          "IsFinalScore": true
        },
        "RollingAveragedPopulationScore": {
          "UpdatedTimeUtc": "2021-11-26T15:18:27.693Z",
          "Direction": 0,
          "Magnitude": 0,
          "IsFinalScore": true
        },
        "LongCount": "string",
        "ShortCount": "string",
        "LongShortRatio": 0,
        "TotalAccumulatedEstimatedAlphaValue": 0,
        "KellyCriterionEstimate": 0,
        "KellyCriterionProbabilityValue": 0,
        "FitnessScore": 0,
        "PortfolioTurnover": 0,
        "ReturnOverMaxDrawdown": 0,
        "SortinoRatio": 0,
        "EstimatedMonthlyAlphaValue": 0,
        "TotalInsightsGenerated": "string",
        "TotalInsightsClosed": "string",
        "TotalInsightsAnalysisCompleted": "string",
        "MeanPopulationEstimatedInsightValue": 0
      },
      "Charts": {
        "Name": "string",
        "ChartType": "Overlay",
        "Series": {
          "Name": "string",
          "Unit": "string",
          "Index": 0,
          "Values": [
            {
              "x": "string",
              "y": 0
            }
          ],
          "SeriesType": "Line",
          "Color": "string",
          "ScatterMarkerSymbol": "none"
        }
      },
      "Orders": {
        "Id": 0,
        "ContingentId": 0,
        "BrokerId": [
          "string"
        ],
        "Symbol": {
          "Value": "string",
          "ID": "string",
          "Permtick": "string"
        },
        "Price": 0,
        "PriceCurrency": "string",
        "Time": "2021-11-26T15:18:27.693Z",
        "CreatedTime": "2021-11-26T15:18:27.693Z",
        "LastFillTime": "2021-11-26T15:18:27.693Z",
        "LastUpdateTime": "2021-11-26T15:18:27.693Z",
        "CanceledTime": "2021-11-26T15:18:27.693Z",
        "Quantity": 0,
        "Type": "Market",
        "Status": "New",
        "Tag": "string",
        "SecurityType": "Base",
        "Direction": "Buy",
        "Value": 0,
        "OrderSubmissionData": {
          "BidPrice": 0,
          "AskPrice": 0,
          "LastPrice": 0
        },
        "IsMarketable": true
      },
      "OrderEvents": [
        {
          "SymbolValue": "string",
          "SymbolPermtick": "string",
          "OrderId": 0,
          "Id": 0,
          "Symbol": {
            "Value": "string",
            "ID": "string",
            "Permtick": "string"
          },
          "UtcTime": "2021-11-26T15:18:27.693Z",
          "Status": {
            "OrderId": 0,
            "Id": 0,
            "Symbol": {
              "Value": "string",
              "ID": "string",
              "Permtick": "string"
            },
            "UtcTime": "2021-11-26T15:18:27.693Z",
            "Status": "New",
            "FillPrice": 0,
            "FillPriceCurrency": "string",
            "FillQuantity": 0,
            "Direction": "Buy",
            "Message": "string",
            "IsAssignment": true,
            "StopPrice": 0,
            "LimitPrice": 0,
            "Quantity": 0
          },
          "OrderFee": {
            "Value": {
              "Amount": 0,
              "Currency": "string"
            }
          },
          "FillPrice": 0,
          "FillPriceCurrency": "string",
          "FillQuantity": 0,
          "Direction": "Buy",
          "Message": "string",
          "IsAssignment": true,
          "StopPrice": 0,
          "LimitPrice": 0,
          "Quantity": 0
        }
      ],
      "ProfitLoss": "number",
      "Statistics": "string",
      "RuntimeStatistics": "string",
      "ServerStatistics": "string"
    }
  },
  "success": true,
  "errors": [
    "string"
  ]
}
LiveList Model - List of the live algorithms running which match the requested status.
Algorithms LiveAlgorithm Array
Algorithm list matching the requested status.
success boolean
Indicate if the API request was successful.
errors string Array
List of errors with the API call.
Example
{
  "Algorithms": [
    {
      "projectId": 0,
      "deployId": "string",
      "status": "DeployError",
      "launched": "2021-11-26T15:18:27.693Z",
      "stopped": "2021-11-26T15:18:27.693Z",
      "brokerage": "Interactive",
      "subscription": "string",
      "error": "string",
      "success": true,
      "errors": [
        "string"
      ]
    }
  ],
  "success": true,
  "errors": [
    "string"
  ]
}
LiveResultsData Model - Holds information about the state and operation of the live running algorithm.
version integer
Results version.
resolution string Enum
Storage format of the charting data. Options : ['10minute', 'minute', 'second']
results LiveResult object
Live results object class for packaging live result data.
Example
{
  "version": 0,
  "resolution": "10minute",
  "results": {
    "Holdings": {
      "Symbol": {
        "Value": "string",
        "ID": "string",
        "Permtick": "string"
      },
      "Type": "Base",
      "CurrencySymbol": "$",
      "AveragePrice": 0,
      "Quantity": 0,
      "MarketPrice": 0,
      "ConversionRate": 0,
      "MarketValue": 0,
      "UnrealizedPnl": 0
    },
    "Cash": {
      "Symbol": "string",
      "Amount": 0,
      "ConversionRate": 0,
      "CurrencySymbol": ,
      "ValueInAccountCurrency": 0
    },
    "AlphaRuntimeStatistics": {
      "MeanPopulationScore": {
        "UpdatedTimeUtc": "2021-11-26T15:18:27.693Z",
        "Direction": 0,
        "Magnitude": 0,
        "IsFinalScore": true
      },
      "RollingAveragedPopulationScore": {
        "UpdatedTimeUtc": "2021-11-26T15:18:27.693Z",
        "Direction": 0,
        "Magnitude": 0,
        "IsFinalScore": true
      },
      "LongCount": "string",
      "ShortCount": "string",
      "LongShortRatio": 0,
      "TotalAccumulatedEstimatedAlphaValue": 0,
      "KellyCriterionEstimate": 0,
      "KellyCriterionProbabilityValue": 0,
      "FitnessScore": 0,
      "PortfolioTurnover": 0,
      "ReturnOverMaxDrawdown": 0,
      "SortinoRatio": 0,
      "EstimatedMonthlyAlphaValue": 0,
      "TotalInsightsGenerated": "string",
      "TotalInsightsClosed": "string",
      "TotalInsightsAnalysisCompleted": "string",
      "MeanPopulationEstimatedInsightValue": 0
    },
    "Charts": {
      "Name": "string",
      "ChartType": "Overlay",
      "Series": {
        "Name": "string",
        "Unit": "string",
        "Index": 0,
        "Values": [
          {
            "x": "string",
            "y": 0
          }
        ],
        "SeriesType": "Line",
        "Color": "string",
        "ScatterMarkerSymbol": "none"
      }
    },
    "Orders": {
      "Id": 0,
      "ContingentId": 0,
      "BrokerId": [
        "string"
      ],
      "Symbol": {
        "Value": "string",
        "ID": "string",
        "Permtick": "string"
      },
      "Price": 0,
      "PriceCurrency": "string",
      "Time": "2021-11-26T15:18:27.693Z",
      "CreatedTime": "2021-11-26T15:18:27.693Z",
      "LastFillTime": "2021-11-26T15:18:27.693Z",
      "LastUpdateTime": "2021-11-26T15:18:27.693Z",
      "CanceledTime": "2021-11-26T15:18:27.693Z",
      "Quantity": 0,
      "Type": "Market",
      "Status": "New",
      "Tag": "string",
      "SecurityType": "Base",
      "Direction": "Buy",
      "Value": 0,
      "OrderSubmissionData": {
        "BidPrice": 0,
        "AskPrice": 0,
        "LastPrice": 0
      },
      "IsMarketable": true
    },
    "OrderEvents": [
      {
        "SymbolValue": "string",
        "SymbolPermtick": "string",
        "OrderId": 0,
        "Id": 0,
        "Symbol": {
          "Value": "string",
          "ID": "string",
          "Permtick": "string"
        },
        "UtcTime": "2021-11-26T15:18:27.693Z",
        "Status": {
          "OrderId": 0,
          "Id": 0,
          "Symbol": {
            "Value": "string",
            "ID": "string",
            "Permtick": "string"
          },
          "UtcTime": "2021-11-26T15:18:27.693Z",
          "Status": "New",
          "FillPrice": 0,
          "FillPriceCurrency": "string",
          "FillQuantity": 0,
          "Direction": "Buy",
          "Message": "string",
          "IsAssignment": true,
          "StopPrice": 0,
          "LimitPrice": 0,
          "Quantity": 0
        },
        "OrderFee": {
          "Value": {
            "Amount": 0,
            "Currency": "string"
          }
        },
        "FillPrice": 0,
        "FillPriceCurrency": "string",
        "FillQuantity": 0,
        "Direction": "Buy",
        "Message": "string",
        "IsAssignment": true,
        "StopPrice": 0,
        "LimitPrice": 0,
        "Quantity": 0
      }
    ],
    "ProfitLoss": "number",
    "Statistics": "string",
    "RuntimeStatistics": "string",
    "ServerStatistics": "string"
  }
}
ChartResolution Model - Storage format of the charting data
ChartResolution string Enum
Storage format of the charting data. Options : ['10minute', 'minute', 'second']
Example
{
  "ChartResolution": "10minute"
}
LiveResult Model - Live results object class for packaging live result data.
Holdings Holding object
Dictionary of algorithm holdings information.
Cash Cash object
Represents a holding of a currency in cash.
AlphaRuntimeStatistics AlphaRuntimeStatistics object
Contains insight population run time statistics.
Charts Chart object
Charts updates for the live algorithm since the last result packet.
Orders Order object
Order updates since the last result packet.
OrderEvents OrderEvent Array
OrderEvent updates since the last result packet.
ProfitLoss number object
Trade profit and loss information since the last algorithm result packet.
Statistics string object
Statistics information sent during the algorithm operations.
RuntimeStatistics string object
Runtime banner/updating statistics in the title banner of the live algorithm GUI.
ServerStatistics string object
Server status information, including CPU and RAM usage.
Example
{
  "Holdings": {
    "Symbol": {
      "Value": "string",
      "ID": "string",
      "Permtick": "string"
    },
    "Type": "Base",
    "CurrencySymbol": "$",
    "AveragePrice": 0,
    "Quantity": 0,
    "MarketPrice": 0,
    "ConversionRate": 0,
    "MarketValue": 0,
    "UnrealizedPnl": 0
  },
  "Cash": {
    "Symbol": "string",
    "Amount": 0,
    "ConversionRate": 0,
    "CurrencySymbol": ,
    "ValueInAccountCurrency": 0
  },
  "AlphaRuntimeStatistics": {
    "MeanPopulationScore": {
      "UpdatedTimeUtc": "2021-11-26T15:18:27.693Z",
      "Direction": 0,
      "Magnitude": 0,
      "IsFinalScore": true
    },
    "RollingAveragedPopulationScore": {
      "UpdatedTimeUtc": "2021-11-26T15:18:27.693Z",
      "Direction": 0,
      "Magnitude": 0,
      "IsFinalScore": true
    },
    "LongCount": "string",
    "ShortCount": "string",
    "LongShortRatio": 0,
    "TotalAccumulatedEstimatedAlphaValue": 0,
    "KellyCriterionEstimate": 0,
    "KellyCriterionProbabilityValue": 0,
    "FitnessScore": 0,
    "PortfolioTurnover": 0,
    "ReturnOverMaxDrawdown": 0,
    "SortinoRatio": 0,
    "EstimatedMonthlyAlphaValue": 0,
    "TotalInsightsGenerated": "string",
    "TotalInsightsClosed": "string",
    "TotalInsightsAnalysisCompleted": "string",
    "MeanPopulationEstimatedInsightValue": 0
  },
  "Charts": {
    "Name": "string",
    "ChartType": "Overlay",
    "Series": {
      "Name": "string",
      "Unit": "string",
      "Index": 0,
      "Values": [
        {
          "x": "string",
          "y": 0
        }
      ],
      "SeriesType": "Line",
      "Color": "string",
      "ScatterMarkerSymbol": "none"
    }
  },
  "Orders": {
    "Id": 0,
    "ContingentId": 0,
    "BrokerId": [
      "string"
    ],
    "Symbol": {
      "Value": "string",
      "ID": "string",
      "Permtick": "string"
    },
    "Price": 0,
    "PriceCurrency": "string",
    "Time": "2021-11-26T15:18:27.693Z",
    "CreatedTime": "2021-11-26T15:18:27.693Z",
    "LastFillTime": "2021-11-26T15:18:27.693Z",
    "LastUpdateTime": "2021-11-26T15:18:27.693Z",
    "CanceledTime": "2021-11-26T15:18:27.693Z",
    "Quantity": 0,
    "Type": "Market",
    "Status": "New",
    "Tag": "string",
    "SecurityType": "Base",
    "Direction": "Buy",
    "Value": 0,
    "OrderSubmissionData": {
      "BidPrice": 0,
      "AskPrice": 0,
      "LastPrice": 0
    },
    "IsMarketable": true
  },
  "OrderEvents": [
    {
      "SymbolValue": "string",
      "SymbolPermtick": "string",
      "OrderId": 0,
      "Id": 0,
      "Symbol": {
        "Value": "string",
        "ID": "string",
        "Permtick": "string"
      },
      "UtcTime": "2021-11-26T15:18:27.693Z",
      "Status": {
        "OrderId": 0,
        "Id": 0,
        "Symbol": {
          "Value": "string",
          "ID": "string",
          "Permtick": "string"
        },
        "UtcTime": "2021-11-26T15:18:27.693Z",
        "Status": "New",
        "FillPrice": 0,
        "FillPriceCurrency": "string",
        "FillQuantity": 0,
        "Direction": "Buy",
        "Message": "string",
        "IsAssignment": true,
        "StopPrice": 0,
        "LimitPrice": 0,
        "Quantity": 0
      },
      "OrderFee": {
        "Value": {
          "Amount": 0,
          "Currency": "string"
        }
      },
      "FillPrice": 0,
      "FillPriceCurrency": "string",
      "FillQuantity": 0,
      "Direction": "Buy",
      "Message": "string",
      "IsAssignment": true,
      "StopPrice": 0,
      "LimitPrice": 0,
      "Quantity": 0
    }
  ],
  "ProfitLoss": "number",
  "Statistics": "string",
  "RuntimeStatistics": "string",
  "ServerStatistics": "string"
}
Holding Model - Live results object class for packaging live result data.
Symbol Symbol object
Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security.
Type string Enum
Type of tradable security / underlying asset. Options : ['Base', 'Equity', 'Option', 'Commodity', 'Forex', 'Future', 'Cfd', 'Crypto']
CurrencySymbol string
example: $

The currency symbol of the holding.
AveragePrice number
Average Price of our Holding in the currency the symbol is traded in.
Quantity number
Quantity of the Symbol we hold.
MarketPrice number
Current Market Price of the Asset in the currency the symbol is traded in.
ConversionRate number
Current market conversion rate into the account currency.
MarketValue number
Current market value of the holding.
UnrealizedPnl number
Current unrealized P/L of the holding.
Example
{
  "Symbol": {
    "Value": "string",
    "ID": "string",
    "Permtick": "string"
  },
  "Type": "Base",
  "CurrencySymbol": "$",
  "AveragePrice": 0,
  "Quantity": 0,
  "MarketPrice": 0,
  "ConversionRate": 0,
  "MarketValue": 0,
  "UnrealizedPnl": 0
}
Symbol Model - Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security.
Value string
The current symbol for this ticker.
ID string
The security identifier for this symbol.
Permtick string
The current symbol for this ticker.
Example
{
  "Value": "string",
  "ID": "string",
  "Permtick": "string"
}
SecurityType Model - Type of tradable security / underlying asset.
SecurityType string Enum
Type of tradable security / underlying asset. Options : ['Base', 'Equity', 'Option', 'Commodity', 'Forex', 'Future', 'Cfd', 'Crypto']
Example
{
  "SecurityType": "Base"
}
Cash Model - Represents a holding of a currency in cash.
Symbol string
Gets the symbol used to represent this cash.
Amount number
Gets or sets the amount of cash held.
ConversionRate number
The currency conversion rate to the account base currency.
CurrencySymbol object
The symbol of the currency, such as $.
ValueInAccountCurrency number
The value of the currency cash in the account base currency.
Example
{
  "Symbol": "string",
  "Amount": 0,
  "ConversionRate": 0,
  "CurrencySymbol": ,
  "ValueInAccountCurrency": 0
}
AlphaRuntimeStatistics Model - Contains insight population run time statistics.
MeanPopulationScore InsightScore object
Defines the scores given to a particular insight.
RollingAveragedPopulationScore InsightScore object
Defines the scores given to a particular insight.
LongCount string
Gets the total number of insights with an up direction.
ShortCount string
Gets the total number of insights with a down direction.
LongShortRatio number
The ratio of InsightDirection.Up over InsightDirection.Down.
TotalAccumulatedEstimatedAlphaValue number
The total accumulated estimated value of trading all insights.
KellyCriterionEstimate number
Score of the strategy's insights predictive power.
KellyCriterionProbabilityValue number
The p-value or probability value of the KellyCriterionEstimate.
FitnessScore number
Score of the strategy's performance, and suitability for the Alpha Stream Market.
PortfolioTurnover number
Measurement of the strategies trading activity with respect to the portfolio value. Calculated as the sales volume with respect to the average total portfolio value.
ReturnOverMaxDrawdown number
Provides a risk adjusted way to factor in the returns and drawdown of the strategy. It is calculated by dividing the Portfolio Annualized Return by the Maximum Drawdown seen during the backtest.
SortinoRatio number
Gives a relative picture of the strategy volatility. It is calculated by taking a portfolio's annualized rate of return and subtracting the risk free rate of return.
EstimatedMonthlyAlphaValue number
Suggested Value of the Alpha On A Monthly Basis For Licensing.
TotalInsightsGenerated string
The total number of insight signals generated by the algorithm.
TotalInsightsClosed string
The total number of insight signals generated by the algorithm.
TotalInsightsAnalysisCompleted string
The total number of insight signals generated by the algorithm.
MeanPopulationEstimatedInsightValue number
Gets the mean estimated insight value.
Example
{
  "MeanPopulationScore": {
    "UpdatedTimeUtc": "2021-11-26T15:18:27.693Z",
    "Direction": 0,
    "Magnitude": 0,
    "IsFinalScore": true
  },
  "RollingAveragedPopulationScore": {
    "UpdatedTimeUtc": "2021-11-26T15:18:27.693Z",
    "Direction": 0,
    "Magnitude": 0,
    "IsFinalScore": true
  },
  "LongCount": "string",
  "ShortCount": "string",
  "LongShortRatio": 0,
  "TotalAccumulatedEstimatedAlphaValue": 0,
  "KellyCriterionEstimate": 0,
  "KellyCriterionProbabilityValue": 0,
  "FitnessScore": 0,
  "PortfolioTurnover": 0,
  "ReturnOverMaxDrawdown": 0,
  "SortinoRatio": 0,
  "EstimatedMonthlyAlphaValue": 0,
  "TotalInsightsGenerated": "string",
  "TotalInsightsClosed": "string",
  "TotalInsightsAnalysisCompleted": "string",
  "MeanPopulationEstimatedInsightValue": 0
}
InsightScore Model - Defines the scores given to a particular insight
UpdatedTimeUtc string($date-time)
The time these scores were last updated.
Direction number
The direction score.
Magnitude number
The magnitude score.
IsFinalScore boolean
Is the insight past its expiry time and score can be finalized.
Example
{
  "UpdatedTimeUtc": "2021-11-26T15:18:27.693Z",
  "Direction": 0,
  "Magnitude": 0,
  "IsFinalScore": true
}
Chart Model - Single Parent Chart Object for Custom Charting.
Name string
Name of the Chart.
ChartType string Enum
Type of the Chart, Overlayed or Stacked. Options : ['Overlay', 'Stacked']
Series Series object
List of Series Objects for this Chart.
Example
{
  "Name": "string",
  "ChartType": "Overlay",
  "Series": {
    "Name": "string",
    "Unit": "string",
    "Index": 0,
    "Values": [
      {
        "x": "string",
        "y": 0
      }
    ],
    "SeriesType": "Line",
    "Color": "string",
    "ScatterMarkerSymbol": "none"
  }
}
Series Model - Chart Series Object - Series data and properties for a chart.
Name string
Name of the series.
Unit string
Axis for the chart series.
Index integer
Index/position of the series on the chart.
Values ChartPoint Array
Values for the series plot. These values are assumed to be in ascending time order (first points earliest, last points latest).
SeriesType string Enum
Chart type for the series. Options : ['Line', 'Scatter', 'Candle', 'Bar', 'Flag', 'StackedArea', 'Pie', 'Treemap']
Color string
Color the series.
ScatterMarkerSymbol string Enum
Shape or symbol for the marker in a scatter plot. Options : ['none', 'circle', 'square', 'diamond', 'triangle', 'triangle-down']
Example
{
  "Name": "string",
  "Unit": "string",
  "Index": 0,
  "Values": [
    {
      "x": "string",
      "y": 0
    }
  ],
  "SeriesType": "Line",
  "Color": "string",
  "ScatterMarkerSymbol": "none"
}
ChartPoint Model - Location on a chart containing the X-Y location
x string
Time of this chart point: lower case for javascript encoding simplicty.
y number
Value of this chart point: lower case for javascript encoding simplicty.
Example
{
  "x": "string",
  "y": 0
}
Order Model - Order struct for placing new trade.
Id integer
Order ID.
ContingentId integer
Order Id to process before processing this order.
BrokerId string Array
Brokerage Id for this order for when the brokerage splits orders into multiple pieces.
Symbol Symbol object
Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security.
Price number
Price of the Order.
PriceCurrency string
Currency for the order price.
Time string($date-time)
Gets the utc time the order was created.
CreatedTime string($date-time)
Gets the utc time this order was created. Alias for Time.
LastFillTime string($date-time)
Gets the utc time the last fill was received, or null if no fills have been received.
LastUpdateTime string($date-time)
Gets the utc time this order was last updated, or null if the order has not been updated.
CanceledTime string($date-time)
Gets the utc time this order was canceled, or null if the order was not canceled.
Quantity number
Number of shares to execute.
Type string Enum
Order type. Options : ['Market', 'Limit', 'StopMarket', 'StopLimit', 'MarketOnOpen', 'MarketOnClose', 'OptionExercise']
Status string Enum
Status of the Order. Options : ['New', 'Submitted', 'PartiallyFilled', 'Filled', 'Canceled', 'None', 'Invalid', 'CancelPending', 'UpdateSubmitted']
Tag string
Tag the order with some custom data.
SecurityType string Enum
Type of tradable security / underlying asset. Options : ['Base', 'Equity', 'Option', 'Commodity', 'Forex', 'Future', 'Cfd', 'Crypto']
Direction string Enum
Direction of the order. Options : ['Buy', 'Sell', 'Hold']
Value number
Gets the executed value of this order. If the order has not yet filled, then this will return zero.
OrderSubmissionData OrderSubmissionData object
Stores time and price information available at the time an order was submitted.
IsMarketable boolean
Returns true if the order is a marketable order.
Example
{
  "Id": 0,
  "ContingentId": 0,
  "BrokerId": [
    "string"
  ],
  "Symbol": {
    "Value": "string",
    "ID": "string",
    "Permtick": "string"
  },
  "Price": 0,
  "PriceCurrency": "string",
  "Time": "2021-11-26T15:18:27.693Z",
  "CreatedTime": "2021-11-26T15:18:27.693Z",
  "LastFillTime": "2021-11-26T15:18:27.693Z",
  "LastUpdateTime": "2021-11-26T15:18:27.693Z",
  "CanceledTime": "2021-11-26T15:18:27.693Z",
  "Quantity": 0,
  "Type": "Market",
  "Status": "New",
  "Tag": "string",
  "SecurityType": "Base",
  "Direction": "Buy",
  "Value": 0,
  "OrderSubmissionData": {
    "BidPrice": 0,
    "AskPrice": 0,
    "LastPrice": 0
  },
  "IsMarketable": true
}
OrderDirection Model - Direction of the order.
OrderDirection string Enum
Direction of the order. Options : ['Buy', 'Sell', 'Hold']
Example
{
  "OrderDirection": "Buy"
}
OrderSubmissionData Model - Stores time and price information available at the time an order was submitted.
BidPrice number
The bid price at an order submission time.
AskPrice number
The ask price at an order submission time.
LastPrice number
The current price at an order submission time.
Example
{
  "BidPrice": 0,
  "AskPrice": 0,
  "LastPrice": 0
}
OrderEvent Model - Change in an order state applied to user algorithm portfolio
SymbolValue string
The current symbol for this ticker; It is a user friendly symbol representation.
SymbolPermtick string
The original symbol used to generate this symbol.
OrderId integer
Id of the order this event comes from.
Id integer
The unique order event Id for each order.
Symbol Symbol object
Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security.
UtcTime string($date-time)
The date and time of this event (UTC).
Status OrderStatus object
Messaging class signifying a change in an order state and record the change in the users algorithm portfolio.
OrderFee OrderFee object
The order fee associated with the specified order.
FillPrice number
Fill price information about the order.
FillPriceCurrency string
Currency for the fill price.
FillQuantity number
Number of shares of the order that was filled in this event.
Direction string Enum
Direction of the order. Options : ['Buy', 'Sell', 'Hold']
Message string
Any message from the exchange.
IsAssignment boolean
True if the order event is an assignment.
StopPrice number
The current stop price.
LimitPrice number
The current limit price.
Quantity number
The current order quantity.
Example
{
  "SymbolValue": "string",
  "SymbolPermtick": "string",
  "OrderId": 0,
  "Id": 0,
  "Symbol": {
    "Value": "string",
    "ID": "string",
    "Permtick": "string"
  },
  "UtcTime": "2021-11-26T15:18:27.693Z",
  "Status": {
    "OrderId": 0,
    "Id": 0,
    "Symbol": {
      "Value": "string",
      "ID": "string",
      "Permtick": "string"
    },
    "UtcTime": "2021-11-26T15:18:27.693Z",
    "Status": "New",
    "FillPrice": 0,
    "FillPriceCurrency": "string",
    "FillQuantity": 0,
    "Direction": "Buy",
    "Message": "string",
    "IsAssignment": true,
    "StopPrice": 0,
    "LimitPrice": 0,
    "Quantity": 0
  },
  "OrderFee": {
    "Value": {
      "Amount": 0,
      "Currency": "string"
    }
  },
  "FillPrice": 0,
  "FillPriceCurrency": "string",
  "FillQuantity": 0,
  "Direction": "Buy",
  "Message": "string",
  "IsAssignment": true,
  "StopPrice": 0,
  "LimitPrice": 0,
  "Quantity": 0
}
OrderStatus Model - Messaging class signifying a change in an order state and record the change in the users algorithm portfolio.
OrderId integer
Id of the order this event comes from.
Id integer
The unique order event Id for this order.
Symbol Symbol object
Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security.
UtcTime string($date-time)
The date and time of this event.
Status string Enum
Status of the Order. Options : ['New', 'Submitted', 'PartiallyFilled', 'Filled', 'Canceled', 'None', 'Invalid', 'CancelPending', 'UpdateSubmitted']
FillPrice number
Fill price information about the order.
FillPriceCurrency string
Currency for the fill price.
FillQuantity number
Number of shares of the order that was filled in this event.
Direction string Enum
Direction of the order. Options : ['Buy', 'Sell', 'Hold']
Message string
Any message from the exchange.
IsAssignment boolean
Order event is an allocation of trades from ITM option assignment.
StopPrice number
The current stop price.
LimitPrice number
The current limit price.
Quantity number
The current order quantity.
Example
{
  "OrderId": 0,
  "Id": 0,
  "Symbol": {
    "Value": "string",
    "ID": "string",
    "Permtick": "string"
  },
  "UtcTime": "2021-11-26T15:18:27.693Z",
  "Status": "New",
  "FillPrice": 0,
  "FillPriceCurrency": "string",
  "FillQuantity": 0,
  "Direction": "Buy",
  "Message": "string",
  "IsAssignment": true,
  "StopPrice": 0,
  "LimitPrice": 0,
  "Quantity": 0
}
Status Model - Status of the Order.
Status string Enum
Status of the Order. Options : ['New', 'Submitted', 'PartiallyFilled', 'Filled', 'Canceled', 'None', 'Invalid', 'CancelPending', 'UpdateSubmitted']
Example
{
  "Status": "New"
}
OrderFee Model - The order fee associated with the specified order.
Value CashAmount object
Represents a cash amount which can be converted to account currency using a currency converter.
Example
{
  "Value": {
    "Amount": 0,
    "Currency": "string"
  }
}
CashAmount Model - Represents a cash amount which can be converted to account currency using a currency converter.
Amount number
The amount of cash.
Currency string
The currency in which the cash amount is denominated.
Example
{
  "Amount": 0,
  "Currency": "string"
}
LiveAlgorithm Model - Live algorithm instance result from the QuantConnect Rest API.
projectId integer
Project Id for the live instance.
deployId string
Unique live algorithm deployment identifier (similar to a backtest id).
status string Enum
States of a live deployment. Options : ['DeployError', 'InQueue', 'Running', 'Stopped', 'Liquidated', 'Deleted', 'Completed', 'RuntimeError', 'Invalid', 'LoggingIn', 'Initializing', 'History']
launched string($date-time)
Datetime the algorithm was launched in UTC.
stopped string($date-time)
Datetime the algorithm was stopped in UTC, null if its still running.
brokerage string Enum
Brokerage. Options : ['Interactive', 'FXCM', 'Oanda', 'Tradier', 'PaperTrading', 'Alpaca', 'Bitfinex', 'Binance', 'Coinbase']
subscription string
Chart we're subscribed to.
error string
Live algorithm error message from a crash or algorithm runtime error.
success boolean
Indicate if the API request was successful.
errors string Array
List of errors with the API call.
Example
{
  "projectId": 0,
  "deployId": "string",
  "status": "DeployError",
  "launched": "2021-11-26T15:18:27.693Z",
  "stopped": "2021-11-26T15:18:27.693Z",
  "brokerage": "Interactive",
  "subscription": "string",
  "error": "string",
  "success": true,
  "errors": [
    "string"
  ]
}
AlgorithmStatus Model - States of a live deployment.
AlgorithmStatus string Enum
States of a live deployment. Options : ['DeployError', 'InQueue', 'Running', 'Stopped', 'Liquidated', 'Deleted', 'Completed', 'RuntimeError', 'Invalid', 'LoggingIn', 'Initializing', 'History']
Example
{
  "AlgorithmStatus": "DeployError"
}

401 Authentication Error

UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
www_authenticate string
Header

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: