SecurityProviderExtensions
QuantConnect.Securities.SecurityProviderExtensions
Bases: Object
Provides extension methods for the ISecurityProvider interface.
get_holdings_quantity
get_holdings_quantity(
provider: ISecurityProvider,
symbol: Union[Symbol, str, BaseContract],
) -> float
Extension method to return the quantity of holdings, if no holdings are present, then zero is returned.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider
|
ISecurityProvider
|
The ISecurityProvider |
required |
symbol
|
Union[Symbol, str, BaseContract]
|
The symbol we want holdings quantity for |
required |
Returns:
| Type | Description |
|---|---|
float
|
The quantity of holdings for the specified symbol. |