Read Live Algorithm
Insights
Request
Fetch the insights of a live algorithm for the project Id and steps provided. The /live/insights/read
API accepts requests in the following format:
ReadLiveInsightsRequest Model - Request to read insights from a live algorithm. | |
---|---|
start | integer Starting index of the insights to be fetched. Required if end > 100. |
end | integer Last index of the insights to be fetched. Note that end - start must be less than 100. |
projectId | integer Id of the project from which to read the live algorithm. |
Example |
{ "start": 0, "end": 0, "projectId": 0 } |
Responses
The /live/insights/read
API provides a response in the following format:
200 Success
LiveInsightsResponse Model - Contains insights and the number of insights of the live algorithm in the request criteria. | |
---|---|
insights | Insight Array Collection of insights. |
length | integer Total number of returned insights. |
success | boolean Indicate if the API request was successful. |
Example |
{ "insights": [ { "id": "string", "time": 0, "signalDirection": "Down", "type": "Price", "symbol": "string", "direction": 0, "magnitude": 0, "period": 0, "weight": 0 } ], "length": 0, "success": true } |
Insight Model - Insight struct for emitting new prediction. | |
---|---|
id | string Insight ID. |
time | number Gets the utc unixtime this insight was created. |
signalDirection | string Enum Gets the predicted direction, down, flat or up. Options : ['Down', 'Flat', 'Up'] |
type | string Enum Gets the type of insight, for example, price or volatility. Options : ['Price', 'Volatility'] |
symbol | string Gets the symbol this insight is for. |
direction | number Gets the direction score. |
magnitude | number Gets the magnitude score. |
period | number Gets the period, in seconds, over which this insight is expected to come to fruition. |
weight | number Gets the portfolio weight of this insight. |
Example |
{ "id": "string", "time": 0, "signalDirection": "Down", "type": "Price", "symbol": "string", "direction": 0, "magnitude": 0, "period": 0, "weight": 0 } |
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 |