Lean  $LEAN_TAG$
QuantConnect.Data.Market.BaseContract Class Referenceabstract

Defines a base for a single contract, like an option or future contract More...

Inheritance diagram for QuantConnect.Data.Market.BaseContract:
[legend]

Public Member Functions

override string ToString ()
 Returns a string that represents the current object. More...
 

Public Attributes

SecurityIdentifier ID => Symbol.ID
 The security identifier of the symbol More...
 
Symbol UnderlyingSymbol => Symbol.Underlying
 Gets the underlying security's symbol More...
 
DateTime Expiry => Symbol.ID.Date
 Gets the expiration date More...
 

Protected Member Functions

 BaseContract (Symbol symbol)
 Initializes a new instance of the BaseContract class More...
 

Properties

Symbol Symbol [get, set]
 Gets the contract's symbol More...
 
DateTime Time [get, set]
 Gets the local date time this contract's data was last updated More...
 
virtual decimal OpenInterest [get, set]
 Gets the open interest More...
 
virtual decimal LastPrice [get, set]
 Gets the last price this contract traded at More...
 
virtual long Volume [get, set]
 Gets the last volume this contract traded at More...
 
virtual decimal BidPrice [get, set]
 Gets the current bid price More...
 
virtual long BidSize [get, set]
 Get the current bid size More...
 
virtual decimal AskPrice [get, set]
 Gets the ask price More...
 
virtual long AskSize [get, set]
 Gets the current ask size More...
 
- Properties inherited from QuantConnect.Data.ISymbolProvider
Symbol Symbol [get, set]
 Gets the Symbol More...
 

Detailed Description

Defines a base for a single contract, like an option or future contract

Definition at line 24 of file BaseContract.cs.

Constructor & Destructor Documentation

◆ BaseContract()

QuantConnect.Data.Market.BaseContract.BaseContract ( Symbol  symbol)
protected

Initializes a new instance of the BaseContract class

Parameters
symbolThe contract symbol

Definition at line 99 of file BaseContract.cs.

Member Function Documentation

◆ ToString()

override string QuantConnect.Data.Market.BaseContract.ToString ( )

Returns a string that represents the current object.

Returns
A string that represents the current object.

Member Data Documentation

◆ ID

SecurityIdentifier QuantConnect.Data.Market.BaseContract.ID => Symbol.ID

The security identifier of the symbol

Definition at line 39 of file BaseContract.cs.

◆ UnderlyingSymbol

Symbol QuantConnect.Data.Market.BaseContract.UnderlyingSymbol => Symbol.Underlying

Gets the underlying security's symbol

Definition at line 44 of file BaseContract.cs.

◆ Expiry

DateTime QuantConnect.Data.Market.BaseContract.Expiry => Symbol.ID.Date

Gets the expiration date

Definition at line 49 of file BaseContract.cs.

Property Documentation

◆ Symbol

Symbol QuantConnect.Data.Market.BaseContract.Symbol
getset

Gets the contract's symbol

Definition at line 31 of file BaseContract.cs.

◆ Time

DateTime QuantConnect.Data.Market.BaseContract.Time
getset

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

Definition at line 56 of file BaseContract.cs.

◆ OpenInterest

virtual decimal QuantConnect.Data.Market.BaseContract.OpenInterest
getset

Gets the open interest

Definition at line 63 of file BaseContract.cs.

◆ LastPrice

virtual decimal QuantConnect.Data.Market.BaseContract.LastPrice
getset

Gets the last price this contract traded at

Definition at line 68 of file BaseContract.cs.

◆ Volume

virtual long QuantConnect.Data.Market.BaseContract.Volume
getset

Gets the last volume this contract traded at

Definition at line 73 of file BaseContract.cs.

◆ BidPrice

virtual decimal QuantConnect.Data.Market.BaseContract.BidPrice
getset

Gets the current bid price

Definition at line 78 of file BaseContract.cs.

◆ BidSize

virtual long QuantConnect.Data.Market.BaseContract.BidSize
getset

Get the current bid size

Definition at line 83 of file BaseContract.cs.

◆ AskPrice

virtual decimal QuantConnect.Data.Market.BaseContract.AskPrice
getset

Gets the ask price

Definition at line 88 of file BaseContract.cs.

◆ AskSize

virtual long QuantConnect.Data.Market.BaseContract.AskSize
getset

Gets the current ask size

Definition at line 93 of file BaseContract.cs.


The documentation for this class was generated from the following file: