dxFeed .Net API  7.1.0
dxFeed .Net API library intended to provide market data access for DX clients
com.dxfeed.api.candle.CandleSession Class Reference

Session attribute of CandleSymbol defines trading that is used to build the candles. More...

Inheritance diagram for com.dxfeed.api.candle.CandleSession:
[legend]
Collaboration diagram for com.dxfeed.api.candle.CandleSession:
[legend]

Public Member Functions

int GetId ()
 Returns candle session struct id More...
 
string ChangeAttributeForSymbol (string symbol)
 Returns candle event symbol string with this session attribute set. More...
 
void CheckInAttributeImpl (CandleSymbol candleSymbol)
 Internal method that initializes attribute in the candle symbol. More...
 
override string ToString ()
 Returns string representation of this candle session attribute. The string representation of candle session attribute is a lower case string that corresponds to its type name. For example, ANY is represented as "false". More...
 
string ToFullString ()
 Returns full string representation of this candle session attribute. It is contains attribute key and its value. The full string representation of ANY is "tho=false" More...
 

Static Public Member Functions

static CandleSession Parse (string s)
 Parses string representation of candle session attribute into object. Any string that was returned by ToString() can be parsed and case is ignored for parsing. More...
 
static CandleSession GetAttributeForSymbol (string symbol)
 Returns candle session attribute of the given candle symbol string. The result is DEFAULT if the symbol does not have candle session attribute. More...
 
static string NormalizeAttributeForSymbol (string symbol)
 Returns candle symbol string with the normalized representation of the candle session attribute. More...
 

Static Public Attributes

static readonly string ATTRIBUTE_KEY = "tho"
 The attribute key that is used to store the value of CandleSession in a symbol string using methods of MarketEventSymbols class. The value of this constant is "tho", which is an abbreviation for "trading hours only". The value that this key shall be set to is equal to the corresponding CandleSession.ToString() More...
 
static readonly CandleSession ANY = new CandleSession(CandleSessionType.Any, "false")
 All trading sessions are used to build candles. More...
 
static readonly CandleSession REGULAR = new CandleSession(CandleSessionType.Regular, "true")
 Only regular trading session data is used to build candles. More...
 
static readonly CandleSession DEFAULT = ANY
 Default trading session is ANY. More...
 

Detailed Description

Session attribute of CandleSymbol defines trading that is used to build the candles.

Implementation details

This attribute is encoded in a symbol string with MarketEventSymbols.GetAttributeStringByKey, MarketEventSymbols.ChangeAttributeStringByKey, and MarketEventSymbols.RemoveAttributeStringByKey methods.

ANY session is a default. The key to use with these methods is available via ATTRIBUTE_KEY constant. The value that this key shall be set to is equal to the corresponding CandleSession.ToString()

Member Function Documentation

◆ ChangeAttributeForSymbol()

string com.dxfeed.api.candle.CandleSession.ChangeAttributeForSymbol ( string  symbol)
inline

Returns candle event symbol string with this session attribute set.

Parameters
symboloriginal candle event symbol.
Returns
candle event symbol string with this session attribute set.

Implements com.dxfeed.api.candle.ICandleSymbolAttribute.

◆ CheckInAttributeImpl()

void com.dxfeed.api.candle.CandleSession.CheckInAttributeImpl ( CandleSymbol  candleSymbol)
inline

Internal method that initializes attribute in the candle symbol.

Parameters
candleSymbolcandle symbol.
Exceptions
InvalidOperationExceptionif used outside of internal initialization logic.

Implements com.dxfeed.api.candle.ICandleSymbolAttribute.

◆ GetAttributeForSymbol()

static CandleSession com.dxfeed.api.candle.CandleSession.GetAttributeForSymbol ( string  symbol)
inlinestatic

Returns candle session attribute of the given candle symbol string. The result is DEFAULT if the symbol does not have candle session attribute.

Parameters
symbolcandle symbol string.
Returns
candle session attribute of the given candle symbol string.

◆ GetId()

int com.dxfeed.api.candle.CandleSession.GetId ( )
inline

Returns candle session struct id

Returns
candle session struct id

◆ NormalizeAttributeForSymbol()

static string com.dxfeed.api.candle.CandleSession.NormalizeAttributeForSymbol ( string  symbol)
inlinestatic

Returns candle symbol string with the normalized representation of the candle session attribute.

Parameters
symbolcandle symbol string.
Returns
candle symbol string with the normalized representation of the the candle session attribute.

◆ Parse()

static CandleSession com.dxfeed.api.candle.CandleSession.Parse ( string  s)
inlinestatic

Parses string representation of candle session attribute into object. Any string that was returned by ToString() can be parsed and case is ignored for parsing.

Parameters
sstring representation of candle candle session attribute.
Returns
candle session attribute.
Exceptions
InvalidOperationExceptionif the string representation is invalid.

◆ ToFullString()

string com.dxfeed.api.candle.CandleSession.ToFullString ( )
inline

Returns full string representation of this candle session attribute. It is contains attribute key and its value. The full string representation of ANY is "tho=false"

Returns

◆ ToString()

override string com.dxfeed.api.candle.CandleSession.ToString ( )
inline

Returns string representation of this candle session attribute. The string representation of candle session attribute is a lower case string that corresponds to its type name. For example, ANY is represented as "false".

Returns
string representation of this candle session attribute.

Field Documentation

◆ ANY

readonly CandleSession com.dxfeed.api.candle.CandleSession.ANY = new CandleSession(CandleSessionType.Any, "false")
static

All trading sessions are used to build candles.

◆ ATTRIBUTE_KEY

readonly string com.dxfeed.api.candle.CandleSession.ATTRIBUTE_KEY = "tho"
static

The attribute key that is used to store the value of CandleSession in a symbol string using methods of MarketEventSymbols class. The value of this constant is "tho", which is an abbreviation for "trading hours only". The value that this key shall be set to is equal to the corresponding CandleSession.ToString()

◆ DEFAULT

readonly CandleSession com.dxfeed.api.candle.CandleSession.DEFAULT = ANY
static

Default trading session is ANY.

◆ REGULAR

readonly CandleSession com.dxfeed.api.candle.CandleSession.REGULAR = new CandleSession(CandleSessionType.Regular, "true")
static

Only regular trading session data is used to build candles.


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