Skip to content

Command

QuantConnect.Commands.Command

Bases: DynamicObject

Base generic dynamic command class

payload_data

payload_data: str

Useful to string representation in python

This codeEntityType is protected.

get_meta_object

get_meta_object(parameter: Any) -> Any

Get the metaObject required for Dynamism.

get_property

get_property(name: str) -> Object

Gets the property's value with the specified name. This is a case-insensitve search.

Parameters:

Name Type Description Default
name str

The property name to access

required

Returns:

Type Description
Object

object value of BaseData.

run

run(algorithm: IAlgorithm) -> Optional[bool]

Run this command using the target algorithm

Parameters:

Name Type Description Default
algorithm IAlgorithm

The algorithm instance

required

Returns:

Type Description
Optional[bool]

True if success, false otherwise. Returning null will disable command feedback.

set_property

set_property(name: str, value: Any) -> Object

Sets the property with the specified name to the value. This is a case-insensitve search.

Parameters:

Name Type Description Default
name str

The property name to set

required
value Any

The new property value

required

Returns:

Type Description
Object

Returns the input value back to the caller.

to_string

to_string() -> str

The string representation of this command