dxFeed .Net API  5.13.0
dxFeed .Net API library intended to provide market data access for DX clients
Public Member Functions | Static Public Member Functions | Properties | Private Member Functions | Private Attributes
com.dxfeed.ipf.option.OptionChainsBuilder Class Reference

Builder class for a set of option chains grouped by product or underlying symbol. More...

Collaboration diagram for com.dxfeed.ipf.option.OptionChainsBuilder:
[legend]

Public Member Functions

 OptionChainsBuilder ()
 Creates new option chains builder. More...
 
void SetExpiration (int expiration)
 Changes day id of expiration. Example: DayUtil.GetDayIdByYearMonthDay(20090117). More...
 
void SetLastTrade (int lastTrade)
 Changes day id of last trading day. Example: DayUtil.GetDayIdByYearMonthDay(20090116). More...
 
void SetMultiplier (double multiplier)
 Changes market value multiplier. Example: 100, 33.2. More...
 
void SetSPC (double spc)
 Changes shares per contract for options. Example: 1, 100. More...
 
void SetAdditionalUnderlyings (string additionalUnderlyings)
 Changes additional underlyings for options, including additional cash. It shall use following format: More...
 
void SetMMY (string mmy)
 Changes maturity month-year as provided for corresponding FIX tag (200). It can use several different formats depending on data source: More...
 
void SetOptionType (string optionType)
 Changes type of option. It shall use one of following values: More...
 
void SetExpirationStyle (string expirationStyle)
 Changes expiration cycle style, such as "Weeklys", "Quarterlys". More...
 
void SetSettlementStyle (string settlementStyle)
 Changes settlement price determination style, such as "Open", "Close". More...
 
void AddOption (InstrumentProfile option)
 Adds an option instrument to this builder. Option is added to chains for the currently set product and/or underlying to the series that corresponding to all other currently set attributes.This method is safe in the sense that is ignores illegal state of the builder.It only adds an option when all of the following conditions are met: More...
 

Static Public Member Functions

static OptionChainsBuilder Build (ICollection< InstrumentProfile > instruments)
 Builds options chains for all options from the given collections of instrument profiles. More...
 

Properties

string Product [get, set]
 Product for futures and options on futures (underlying asset name). Example: "/YG". More...
 
string Underlying [get, set]
 Primary underlying symbol for options. Example: "C", "/YGM9" More...
 
string CFI [get, set]
 Classification of Financial Instruments code (CFI code). It is a mandatory field as it is the only way to distinguish Call/Put option type, American/European exercise, Cash/Physical delivery. It shall use six-letter CFI code from ISO 10962 standard. It is allowed to use 'X' extensively and to omit trailing letters (assumed to be 'X'). SeeISO 10962 on Wikipedia. Example: "OC" for generic call, "OP" for generic put. More...
 
double Strike [get, set]
 Strike price for options. Example: 80, 22.5. More...
 
Dictionary< string, OptionChainChains [get]
 Returns a view of chains created by this builder. It updates as new options are added with AddOption method. More...
 

Private Member Functions

OptionChain GetOrCreateChain (string symbol)
 

Private Attributes

readonly Dictionary< string, OptionChainchains = new Dictionary<string, OptionChain>()
 
OptionSeries series = new OptionSeries()
 
string product = string.Empty
 
string underlying = string.Empty
 
string cfi = string.Empty
 

Detailed Description

Builder class for a set of option chains grouped by product or underlying symbol.

Threads and clocks

This class is NOT thread-safe and cannot be used from multiple threads without external synchronization.

Constructor & Destructor Documentation

◆ OptionChainsBuilder()

com.dxfeed.ipf.option.OptionChainsBuilder.OptionChainsBuilder ( )
inline

Creates new option chains builder.

Member Function Documentation

◆ AddOption()

void com.dxfeed.ipf.option.OptionChainsBuilder.AddOption ( InstrumentProfile  option)
inline

Adds an option instrument to this builder. Option is added to chains for the currently set product and/or underlying to the series that corresponding to all other currently set attributes.This method is safe in the sense that is ignores illegal state of the builder.It only adds an option when all of the following conditions are met:

All the attributes remain set as before after the call to this method, but chains are updated correspondingly.

Parameters
optionoption to add.

◆ Build()

static OptionChainsBuilder com.dxfeed.ipf.option.OptionChainsBuilder.Build ( ICollection< InstrumentProfile instruments)
inlinestatic

Builds options chains for all options from the given collections of instrument profiles.

Parameters
instrumentscollection of instrument profiles.
Returns
builder with all the options from instruments collection.

◆ GetOrCreateChain()

OptionChain com.dxfeed.ipf.option.OptionChainsBuilder.GetOrCreateChain ( string  symbol)
inlineprivate

◆ SetAdditionalUnderlyings()

void com.dxfeed.ipf.option.OptionChainsBuilder.SetAdditionalUnderlyings ( string  additionalUnderlyings)
inline

Changes additional underlyings for options, including additional cash. It shall use following format:

    <VALUE> ::= <empty> | <LIST>
    <LIST> ::= <AU> | <AU> <semicolon> <space> <LIST>
    <AU> ::= <UNDERLYING> <space> <SPC> 

the list shall be sorted by <UNDERLYING>. Example: "SE 50", "FIS 53; US$ 45.46".

Parameters
additionalUnderlyingsadditional underlyings for options, including additional cash.

◆ SetExpiration()

void com.dxfeed.ipf.option.OptionChainsBuilder.SetExpiration ( int  expiration)
inline

Changes day id of expiration. Example: DayUtil.GetDayIdByYearMonthDay(20090117).

Parameters
expirationday id of expiration

◆ SetExpirationStyle()

void com.dxfeed.ipf.option.OptionChainsBuilder.SetExpirationStyle ( string  expirationStyle)
inline

Changes expiration cycle style, such as "Weeklys", "Quarterlys".

Parameters
expirationStyleexpiration cycle style.

◆ SetLastTrade()

void com.dxfeed.ipf.option.OptionChainsBuilder.SetLastTrade ( int  lastTrade)
inline

Changes day id of last trading day. Example: DayUtil.GetDayIdByYearMonthDay(20090116).

Parameters
lastTradeday id of last trading day.

◆ SetMMY()

void com.dxfeed.ipf.option.OptionChainsBuilder.SetMMY ( string  mmy)
inline

Changes maturity month-year as provided for corresponding FIX tag (200). It can use several different formats depending on data source:

  • YYYYMM – if only year and month are specified
  • YYYYMMDD – if full date is specified
  • YYYYMMwN – if week number(within a month) is specified
Parameters
mmymaturity month-year as provided for corresponding FIX tag (200).

◆ SetMultiplier()

void com.dxfeed.ipf.option.OptionChainsBuilder.SetMultiplier ( double  multiplier)
inline

Changes market value multiplier. Example: 100, 33.2.

Parameters
multipliermarket value multiplier.

◆ SetOptionType()

void com.dxfeed.ipf.option.OptionChainsBuilder.SetOptionType ( string  optionType)
inline

Changes type of option. It shall use one of following values:

  • STAN = Standard Options
  • LEAP = Long-term Equity AnticiPation Securities
  • SDO = Special Dated Options
  • BINY = Binary Options
  • FLEX = FLexible EXchange Options
  • VSO = Variable Start Options
  • RNGE = Range
Parameters
optionTypetype of option.

◆ SetSettlementStyle()

void com.dxfeed.ipf.option.OptionChainsBuilder.SetSettlementStyle ( string  settlementStyle)
inline

Changes settlement price determination style, such as "Open", "Close".

Parameters
settlementStylesettlement price determination style.

◆ SetSPC()

void com.dxfeed.ipf.option.OptionChainsBuilder.SetSPC ( double  spc)
inline

Changes shares per contract for options. Example: 1, 100.

Parameters
spcshares per contract for options.

Field Documentation

◆ cfi

string com.dxfeed.ipf.option.OptionChainsBuilder.cfi = string.Empty
private

◆ chains

readonly Dictionary<string, OptionChain> com.dxfeed.ipf.option.OptionChainsBuilder.chains = new Dictionary<string, OptionChain>()
private

◆ product

string com.dxfeed.ipf.option.OptionChainsBuilder.product = string.Empty
private

◆ series

OptionSeries com.dxfeed.ipf.option.OptionChainsBuilder.series = new OptionSeries()
private

◆ underlying

string com.dxfeed.ipf.option.OptionChainsBuilder.underlying = string.Empty
private

Property Documentation

◆ CFI

string com.dxfeed.ipf.option.OptionChainsBuilder.CFI
getset

Classification of Financial Instruments code (CFI code). It is a mandatory field as it is the only way to distinguish Call/Put option type, American/European exercise, Cash/Physical delivery. It shall use six-letter CFI code from ISO 10962 standard. It is allowed to use 'X' extensively and to omit trailing letters (assumed to be 'X'). SeeISO 10962 on Wikipedia. Example: "OC" for generic call, "OP" for generic put.

◆ Chains

Dictionary<string, OptionChain> com.dxfeed.ipf.option.OptionChainsBuilder.Chains
get

Returns a view of chains created by this builder. It updates as new options are added with AddOption method.

Returns
view of chains created by this builder.

◆ Product

string com.dxfeed.ipf.option.OptionChainsBuilder.Product
getset

Product for futures and options on futures (underlying asset name). Example: "/YG".

◆ Strike

double com.dxfeed.ipf.option.OptionChainsBuilder.Strike
getset

Strike price for options. Example: 80, 22.5.

◆ Underlying

string com.dxfeed.ipf.option.OptionChainsBuilder.Underlying
getset

Primary underlying symbol for options. Example: "C", "/YGM9"


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