Contract Class

Class representing a single contract.

Definition

Namespace: T4.API
Assembly: T4API.47 (in T4API.47.dll) Version: 4.7.0.0 (4.7.68.4)
C#
public class Contract
Inheritance
Object    Contract

Remarks

Contracts consist of expiry months and individual markets within those months.

A Contract is uniquely identified by the combination of of ExchangeID and ContractID. ContractID's alone are not unique and may exist in multiple exchanges.

Properties

CategoryThe contract category if known.
ContractID The identifier for this contract.
ContractType The type of contract this is, e.g. Future, Option etc.
Currency The currency this contract is in.
DayChangeTime The markets day change time.
DayChangeTimeAlt The markets alternate day change time.
DayChangeTimeExceptions The markets day change time exceptions.
Description Descriptive name for the contract.
Enabled True if the contract is enabled.
Exchange The exchange that this contract belongs to.
Host Reference to the api Host object.
QuoteFeedSubscribed Whether we are subscribed to the quote feed.
Relations Return the collection of related contracts for this contract.
TradeFeedSubscribed Whether we are subscribed to the trade feed.
TradingSchedule Return the trading schedule for this contract.
TradingScheduleData The contracts trading schedule for the week, if known.

Methods

BeginRequestActiveMarket Requests the active market for the specified trade date for the contract.
BeginRequestChartData(DateTime, DateTime, ChartDataType, IChartDataRequestChartDataCompleteEventHandler) Requests chart data for the contract (active markets.)
BeginRequestChartData(DateTime, DateTime, DateTime, DateTime, ChartDataType, IChartDataRequestChartDataCompleteEventHandler) Requests chart data for the contract (active markets.)
BeginRequestMarketTradeVolumeData Request historical chart data for all markets in the contract (including expired ones.)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetMarkets Return the collection of markets for this contract.
GetMarkets(Boolean) Return the collection of markets for this contract.
GetMarkets(OnMarketListComplete) Return the collection of markets for this contract.
GetMarkets(Boolean, OnMarketListComplete) Return the collection of all expired markets for this contract.
GetMarkets(OnMarketListComplete, Object) Return the collection of markets for this contract.
GetMarkets(Boolean, OnMarketListComplete, Object) Return the collection of all expired markets for this contract.
GetMarkets(Int32, StrategyType, OnMarketListComplete) Get the filtered collection of markets for this contract.
GetMarkets(Int32, StrategyType, Boolean, OnMarketListComplete) Get the filtered collection of expired markets for this contract.
GetMarkets(Int32, StrategyType, OnMarketListComplete, Object) Get the filtered collection of markets for this contract.
GetMarkets(Int32, StrategyType, Boolean, OnMarketListComplete, Object) Get the filtered collection of expired markets for this contract.
GetTradeDate Calculate and return the current trading day.
GetTradeDate(DateTime) Calculate and return the current trading day.
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Subscribe Subscribe to the contract quote and trade feed.
ToString Display the description by default.
(Overrides ObjectToString)
Unsubscribe Unsubscribe the contract feed.

Events

ContractFeed Event raised when quote, trade or snapshot data is returned.

See Also