Exports signals of desired positions to Collective2 API using JSON and HTTPS. Accepts signals in quantity(number of shares) i.e symbol:"SPY", quant:40
More...
Exports signals of desired positions to Collective2 API using JSON and HTTPS. Accepts signals in quantity(number of shares) i.e symbol:"SPY", quant:40
Definition at line 32 of file Collective2SignalExport.cs.
◆ Collective2SignalExport()
QuantConnect.Algorithm.Framework.Portfolio.SignalExports.Collective2SignalExport.Collective2SignalExport |
( |
string |
apiKey, |
|
|
int |
systemId |
|
) |
| |
◆ Send()
override bool QuantConnect.Algorithm.Framework.Portfolio.SignalExports.Collective2SignalExport.Send |
( |
SignalExportTargetParameters |
parameters | ) |
|
|
virtual |
◆ ConvertHoldingsToCollective2()
Converts a list of targets to a list of Collective2 positions
- Parameters
-
parameters | A list of targets from the portfolio expected to be sent to Collective2 API and the algorithm being ran |
positions | A list of Collective2 positions |
- Returns
- True if the given targets could be converted to a Collective2Position list, false otherwise
Definition at line 122 of file Collective2SignalExport.cs.
◆ ConvertPercentageToQuantity()
int QuantConnect.Algorithm.Framework.Portfolio.SignalExports.Collective2SignalExport.ConvertPercentageToQuantity |
( |
IAlgorithm |
algorithm, |
|
|
PortfolioTarget |
target |
|
) |
| |
|
protected |
Converts a given percentage of a position into the number of shares of it
- Parameters
-
algorithm | Algorithm being ran |
target | Desired position to be sent to the Collective2 API |
- Returns
- Number of shares hold of the given position/returns>
Definition at line 207 of file Collective2SignalExport.cs.
◆ CreateMessage()
string QuantConnect.Algorithm.Framework.Portfolio.SignalExports.Collective2SignalExport.CreateMessage |
( |
List< Collective2Position > |
positions | ) |
|
|
protected |
Serializes the list of desired positions with the needed credentials in JSON format
- Parameters
-
positions | List of Collective2 positions to be sent to Collective2 API |
- Returns
- A JSON request string of the desired positions to be sent by a POST request to Collective2 API
Definition at line 223 of file Collective2SignalExport.cs.
◆ Name
override string QuantConnect.Algorithm.Framework.Portfolio.SignalExports.Collective2SignalExport.Name = "Collective2" |
|
getprotected |
The documentation for this class was generated from the following file: