BaseContract
QuantConnect.Data.Market.BaseContract
BaseContract(symbol: Union[Symbol, str, BaseContract])
Bases: Object, ISymbolProvider
Defines a base for a single contract, like an option or future contract
Initializes a new instance of the BaseContract class
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
Union[Symbol, str, BaseContract]
|
The contract symbol |
required |
expiry
expiry: datetime
Gets the expiration date
time
time: datetime
Gets the local date time this contract's data was last updated
open_interest
open_interest: float
Gets the open interest
last_price
last_price: float
Gets the last price this contract traded at
volume
volume: int
Gets the last volume this contract traded at
bid_price
bid_price: float
Gets the current bid price
bid_size
bid_size: int
Get the current bid size
ask_price
ask_price: float
Gets the ask price
ask_size
ask_size: int
Gets the current ask size
to_string
to_string() -> str
Returns a string that represents the current object.
Returns:
| Type | Description |
|---|---|
str
|
A string that represents the current object. |