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, |
|
|
bool |
useWhiteLabelApi = false |
|
) |
| |
Collective2SignalExport constructor. It obtains the entry information for Collective2 API requests. See API documentation at https://trade.collective2.com/c2-api
- Parameters
-
| apiKey | API key provided by Collective2 |
| systemId | Trading system's ID number |
| useWhiteLabelApi | Whether to use the white-label API instead of the general one |
Definition at line 98 of file Collective2SignalExport.cs.
◆ 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 143 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
Definition at line 193 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 218 of file Collective2SignalExport.cs.
◆ Destination
| Uri QuantConnect.Algorithm.Framework.Portfolio.SignalExports.Collective2SignalExport.Destination |
|
getset |
◆ Name
| override string QuantConnect.Algorithm.Framework.Portfolio.SignalExports.Collective2SignalExport.Name = "Collective2" |
|
getprotected |
The documentation for this class was generated from the following file: