Skip to content

FuturesContract

QuantConnect.Data.Market.FuturesContract

FuturesContract(symbol: Union[Symbol, str, BaseContract])
FuturesContract(contract_data: FutureUniverse)

Bases: BaseContract

Defines a single futures contract at a specific expiration

Initializes a new instance of the FuturesContract class

Parameters:

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

The futures contract symbol

None
contract_data Optional[FutureUniverse]

The contract universe data

None

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

Get the current bid price

bid_size

bid_size: int

Get the current bid size

ask_price

ask_price: float

Gets the current ask price

ask_size

ask_size: int

Get the current ask size

symbol

symbol: Symbol

Gets the contract's symbol

id

The security identifier of the symbol

underlying_symbol

underlying_symbol: Symbol

Gets the underlying security's symbol

expiry

expiry: datetime

Gets the expiration date

time

time: datetime

Gets the local date time this contract's data was last updated

to_string

to_string() -> str

Returns a string that represents the current object.

Returns:

Type Description
str

A string that represents the current object.