IContract Interface

GF API Documentation
A single contract - for example, ESZ4.

Namespace:  GF.Api.Contracts
Assembly:  GF.Api (in GF.Api.dll) Version: dd7171be68430789135ec75c4e9f4bbfeca31201
Syntax

public interface IContract : IComparable<IContract>, 
	IComparable

The IContract type exposes the following members.

Properties

  NameDescription
Public propertyBaseContract
Base contract instance. See IBaseContract.
Public propertyBaseSymbol
Base symbol. Example: ES for ESH6
Public propertyCommissions
Commissions
Public propertyCompoundType
Type of compound contract
Public propertyContractGroup
Group where contract belongs to (Currencies, Grains etc)
Public propertyContractSize
Contract size - currency unit per point. (dollar value if currency is USD)
Public propertyCurrency
Currency of the contract
Public propertyCurrentPrice
Current price data, if subscribed, or null
Public propertyDescription
Full name. Example: "E-Mini S&P", "Crude Oil"
Public propertyDOM
Current DOM data, if subscribed for DOM, or null
Public propertyElectronicContract
Electronic pair for pit contract, if exists
Public propertyExchange
Exchange of the contract
Public propertyExpirationDate
Date of contract expiration
Public propertyExpirationMonth
Expiration month and year, in YYMM format
Public propertyExpirationType
Expiration type of equity options (standard, weekly, quarterly)
Public propertyGreeks
Current Implied Volatility data, if subscribed, or null
Public propertyHasExpiration
Has the contract an expiration date?
Public propertyHasOnlyFutureLegs
Is the contract a future-only compound?
Public propertyHasOptionLegs
Is the contract an option compound?
Public propertyHasOptions
Has the contract linked options?
Public propertyHistogram
Last copy of traded price histogram
Public propertyID
Server contract identifier
Public propertyIsCompound
Is the contract a compound contract?
Public propertyIsContinuous
Is the contract a continuous contract?
Public propertyIsFuture
Is the contract a future contract?
Public propertyIsIndex
Is the contract a index contract?
Public propertyIsMarginal
Is the contract a future/forex contract?
Public propertyIsOption
Is the contract an option contract?
Public propertyIsPit
Pit or electronic contract
Public propertyIsPut
Put or Call
Public propertyIsSubscribable
Can request price stream
Public propertyIsTAS
Is the contract a TAS future?
Public propertyLegs
Legs for compound contract
Public propertyMonth
Expiration month
Public propertyMonthChar
Expiration month symbol - one of "FGHJKMNQUVXZ"
Public propertyMonthYear
Expiration month/year = "{MonthChar}{YearLastDigit}". Example: "H6"
Public propertyOptions
List of underlying options
Public propertyParentContract
Parent contract for an option contract (ESM8 for OESM8C1300)
Public propertyPitContract
Pit pair for electronic contract, if exists
Public propertyPositionContract
Contract for position calculation: Electronic for electronic only or dual, pit for pit only
Public propertyPositionSymbol
Name of contract or dual contracts for position
Public propertyPriceFormat
Price Format
Public propertyPriceMultiplier
Multiplier - power of 10 used for price formatting.
Public propertyRiskLimitsTypes
Type of risk limitation for contract
Public propertySortKey
SortKey for contract Contracts usually are sorted by base symbol/month year
Public propertyStartTime
Trading session start time, in local time zone
Public propertyStopTime
Trading session stop time, in local time zone
Public propertyStrike
Option strike price
Public propertySuffix
put/call and strike price
Public propertySymbol
Contract symbol. Examples: ESH6, FDAXH6
Public propertyTickSize
Tick size - minimal increment of the price value
Public propertyType
Contract type - Pit or Electronic
Public propertyYear
Expiration year
Top
Methods

  NameDescription
Public methodGetInitialMargin
Initial margin for contract
Public methodGetMaintenanceMargin
Maintenance margin for contract
Public methodPriceToString(NullableDouble)
Formats price using contract price format, multiplier and tick size
Public methodPriceToString(NullableDouble, CultureInfo)
Formats price using contract price format, multiplier and tick size
Top
Remarks

Contract instance holds single contract properties. In addition to unique contract properties, such as Symbol, ExpirationDate, properties that are shared among contracts with same BaseContract also available there.
CurrentPrice and DOM data are available if client subscribed for the price or DOM update. Subscribe(ContractID) and Subscribe(ContractID) for details.
See Also

Reference

GF.Api.ContractsIContract