UniverseManager
QuantConnect.Securities.UniverseManager
UniverseManager()
Bases: BaseExtendedDictionary[Symbol, Universe, ConcurrentDictionary[Symbol, Universe]]
Manages the algorithm's collection of universes
Initializes a new instance of the UniverseManager class
collection_changed
collection_changed: _EventContainer[
Callable[[Object, UniverseManagerChanged], Any], Any
]
Event fired when a universe is added or removed
active_securities
Read-only dictionary containing all active securities. An active security is a security that is currently selected by the universe or has holdings or open orders.
__getitem__
__getitem__(
symbol: Union[Symbol, str, BaseContract],
) -> Universe
Gets or sets the element with the specified key
__setitem__
__setitem__(
symbol: Union[Symbol, str, BaseContract],
value: Universe,
) -> None
Gets or sets the element with the specified key
add
add(
key: Union[Symbol, str, BaseContract], value: Universe
) -> None
Adds an element with the provided key and value to the dictionary
on_collection_changed
on_collection_changed(e: UniverseManagerChanged) -> None
Event invocator for the collection_changed event
This codeEntityType is protected.
process_changes
process_changes() -> None
Will trigger collection changed event if required
remove
remove(key: Union[Symbol, str, BaseContract]) -> bool
Removes the element with the specified key from the dictionary
update
update(
key: Union[Symbol, str, BaseContract],
value: Universe,
action: NotifyCollectionChangedAction,
) -> None
Updates an element with the provided key and value to the dictionary