NotifiedSecurityChanges
QuantConnect.Algorithm.Framework.NotifiedSecurityChanges
Bases: Object
Provides convenience methods for updating collections in responses to securities changed events
update
update(
changes: SecurityChanges,
add: Callable[[Security], Any],
remove: Callable[[Security], Any],
) -> None
Invokes the provided add and remove functions for each
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
changes
|
SecurityChanges
|
The security changes to process |
required |
add
|
Callable[[Security], Any]
|
Function called for each added security |
required |
remove
|
Callable[[Security], Any]
|
Function called for each removed security |
required |
update_collection
update_collection(
securities: ICollection[Security],
changes: SecurityChanges,
) -> None
Adds and removes the security changes to/from the collection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
securities
|
ICollection[Security]
|
The securities collection to be updated with the changes |
required |
changes
|
SecurityChanges
|
The changes to be applied to the securities collection |
required |