Skip to content

CallbackCommand

QuantConnect.Commands.CallbackCommand

Bases: BaseCommand

Algorithm callback command type

type

type: str

The target command type to run, if empty or null will be the generic untyped command handler

payload

payload: str

The command payload

id

id: str

Unique command id

run

run(algorithm: IAlgorithm) -> CommandResultPacket

Runs this command against the specified algorithm instance

Parameters:

Name Type Description Default
algorithm IAlgorithm

The algorithm to run this command against

required

to_string

to_string() -> str

The command string representation

get_symbol

get_symbol(
    ticker: str,
    security_type: SecurityType,
    market: str,
    symbol: Union[Symbol, str, BaseContract] = None,
) -> Symbol

Creats symbol using symbol properties.

This codeEntityType is protected.

Parameters:

Name Type Description Default
ticker str

The string ticker symbol

required
security_type SecurityType

The security type of the ticker. If security_type == Option, then a canonical symbol is created

required
market str

The market the ticker resides in

required
symbol Union[Symbol, str, BaseContract]

The algorithm to run this command against

None