Skip to content

QuoteBars

QuantConnect.Data.Market.QuoteBars

QuoteBars()
QuoteBars(time: Union[datetime, date])

Bases: DataDictionary[QuoteBar]

Collection of QuoteBar keyed by symbol

Creates a new instance of the QuoteBars dictionary

time

time: datetime

Gets or sets the time associated with this collection of data

get_keys

get_keys: Iterable[Symbol]

Gets a collection containing the keys in the dictionary

This codeEntityType is protected.

get_values

get_values: Iterable[
    QuantConnect_Data_Market_DataDictionary_T
]

Gets a collection containing the values in the dictionary

This codeEntityType is protected.

add

add(
    key: Union[Symbol, str, BaseContract, Security],
    value: QuantConnect_Data_Market_DataDictionary_T,
) -> None
add(
    item: KeyValuePair[
        Symbol, QuantConnect_Data_Market_DataDictionary_T
    ],
) -> None

Signature descriptions:

  • Adds an element with the provided key and value to the dictionary

  • Adds an element with the provided key-value pair to the dictionary

Parameters:

Name Type Description Default
key Optional[Union[Symbol, str, BaseContract, Security]]

The key of the element to add

None
value Optional[QuantConnect_Data_Market_DataDictionary_T]

The value of the element to add

None
item Optional[KeyValuePair[Symbol, QuantConnect_Data_Market_DataDictionary_T]]

The key-value pair to add

None

remove

remove(
    key: Union[Symbol, str, BaseContract, Security],
) -> bool
remove(
    item: KeyValuePair[
        Symbol, QuantConnect_Data_Market_DataDictionary_T
    ],
) -> bool

Signature descriptions:

  • Removes the value with the specified key

  • Removes the first occurrence of a specific object from the dictionary

Parameters:

Name Type Description Default
key Optional[Union[Symbol, str, BaseContract, Security]]

The key of the element to remove

None
item Optional[KeyValuePair[Symbol, QuantConnect_Data_Market_DataDictionary_T]]

The key-value pair to remove

None

Returns:

Type Description
bool

Depends on the signature used. Case 1: [true if the element was successfully found and removed; otherwise, false.]; Case 2: [true if the key-value pair was successfully removed; otherwise, false.]

__getitem__

__getitem__(
    symbol: Union[Symbol, str, BaseContract, Security],
) -> QuantConnect_Data_Market_DataDictionary_T

Gets or sets the element with the specified key.

__iter__

__iter__() -> Iterator[
    KeyValuePair[
        Symbol,
        QuantConnect_Data_Market_DataDictionary_T,
    ]
]

__setitem__

__setitem__(
    symbol: Union[Symbol, str, BaseContract, Security],
    value: QuantConnect_Data_Market_DataDictionary_T,
) -> None

Gets or sets the element with the specified key.

clear

clear() -> None

Removes all items from the dictionary

get_enumerator

get_enumerator() -> IEnumerator[
    KeyValuePair[
        Symbol,
        QuantConnect_Data_Market_DataDictionary_T,
    ]
]

Returns an enumerator that iterates through the dictionary

Returns:

Type Description
IEnumerator[KeyValuePair[Symbol, QuantConnect_Data_Market_DataDictionary_T]]

An enumerator for the dictionary.

get_items

get_items() -> Iterable[
    KeyValuePair[
        Symbol,
        QuantConnect_Data_Market_DataDictionary_T,
    ]
]

Gets all the items in the dictionary

Returns:

Type Description
Iterable[KeyValuePair[Symbol, QuantConnect_Data_Market_DataDictionary_T]]

All the items in the dictionary.

get_value

get_value(
    key: Union[Symbol, str, BaseContract, Security],
) -> QuantConnect_Data_Market_DataDictionary_T

Gets the value associated with the specified key.