dxFeed .Net API  5.8.0
dxFeed .Net API library intended to provide market data access for DX clients
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
com.dxfeed.api.candle.CandlePrice Class Reference

Price type attribute of CandleSymbol defines price that is used to build the candles. More...

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

Public Types

enum  CandlePriceType {
  CandlePriceType.Last = 0, CandlePriceType.Bid = 1, CandlePriceType.Ask = 2, CandlePriceType.Mark = 3,
  CandlePriceType.Settlement = 4
}
 

Public Member Functions

int GetId ()
 Get id of price type attribute More...
 
string ChangeAttributeForSymbol (string symbol)
 Returns candle event symbol string with this candle price type 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 price type. The string representation of candle price type is a lower case string that corresponds to its type name. For example, LAST is represented as "last". More...
 
string ToFullString ()
 Returns full string representation of this candle price type. It is contains attribute key and its value. The full string representation of LAST is "price=last" More...
 

Static Public Member Functions

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

Static Public Attributes

static readonly string ATTRIBUTE_KEY = "price"
 The attribute key that is used to store the value of CandlePrice in a symbol string using methods of MarketEventSymbols class. The value of this constant is "price". The value that this key shall be set to is equal to the corresponding CandlePrice.ToString() More...
 
static readonly CandlePrice LAST = new CandlePrice(CandlePriceType.Last, "last")
 Last trading price. More...
 
static readonly CandlePrice BID = new CandlePrice(CandlePriceType.Bid, "bid")
 Quote bid price. More...
 
static readonly CandlePrice ASK = new CandlePrice(CandlePriceType.Ask, "ask")
 Quote ask price. More...
 
static readonly CandlePrice MARK = new CandlePrice(CandlePriceType.Mark, "mark")
 Market price defined as average between quote bid and ask prices. More...
 
static readonly CandlePrice SETTLEMENT = new CandlePrice(CandlePriceType.Settlement, "s")
 Official settlement price that is defined by exchange or last trading price otherwise. It updates based on all com.dxfeed.api.data.PriceType values: com.dxfeed.api.data.PriceType#Indicative, com.dxfeed.api.data.PriceType#Preliminary, and com.dxfeed.api.data.PriceType#Final. More...
 
static readonly CandlePrice DEFAULT = LAST
 Default price type is LAST. More...
 

Private Member Functions

 CandlePrice (CandlePriceType priceType, string value)
 

Private Attributes

readonly string value
 
readonly CandlePriceType priceType
 

Static Private Attributes

static Dictionary< string, CandlePriceobjCash = new Dictionary<string, CandlePrice>()
 

Detailed Description

Price type attribute of CandleSymbol defines price 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. 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 CandlePrice.ToString()

Member Enumeration Documentation

◆ CandlePriceType

Enumerator
Last 
Bid 
Ask 
Mark 
Settlement 

Constructor & Destructor Documentation

◆ CandlePrice()

com.dxfeed.api.candle.CandlePrice.CandlePrice ( CandlePriceType  priceType,
string  value 
)
inlineprivate

Member Function Documentation

◆ ChangeAttributeForSymbol()

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

Returns candle event symbol string with this candle price type set.

Parameters
symboloriginal candle event symbol.
Returns
candle event symbol string with this candle price type set.

Implements com.dxfeed.api.candle.ICandleSymbolAttribute.

◆ CheckInAttributeImpl()

void com.dxfeed.api.candle.CandlePrice.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 CandlePrice com.dxfeed.api.candle.CandlePrice.GetAttributeForSymbol ( string  symbol)
inlinestatic

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

Parameters
symbolcandle symbol string.
Returns
candle price of the given candle symbol string.

◆ GetId()

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

Get id of price type attribute

Returns
id of price type attribute

◆ NormalizeAttributeForSymbol()

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

Returns candle symbol string with the normalized representation of the candle price type attribute.

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

◆ Parse()

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

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

Parameters
sstring representation of candle price type.
Returns
candle price type.
Exceptions
InvalidOperationExceptionif the string representation is invalid.

◆ ToFullString()

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

Returns full string representation of this candle price type. It is contains attribute key and its value. The full string representation of LAST is "price=last"

Returns

◆ ToString()

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

Returns string representation of this candle price type. The string representation of candle price type is a lower case string that corresponds to its type name. For example, LAST is represented as "last".

Returns
string representation of this candle price type.

Field Documentation

◆ ASK

readonly CandlePrice com.dxfeed.api.candle.CandlePrice.ASK = new CandlePrice(CandlePriceType.Ask, "ask")
static

Quote ask price.

◆ ATTRIBUTE_KEY

readonly string com.dxfeed.api.candle.CandlePrice.ATTRIBUTE_KEY = "price"
static

The attribute key that is used to store the value of CandlePrice in a symbol string using methods of MarketEventSymbols class. The value of this constant is "price". The value that this key shall be set to is equal to the corresponding CandlePrice.ToString()

◆ BID

readonly CandlePrice com.dxfeed.api.candle.CandlePrice.BID = new CandlePrice(CandlePriceType.Bid, "bid")
static

Quote bid price.

◆ DEFAULT

readonly CandlePrice com.dxfeed.api.candle.CandlePrice.DEFAULT = LAST
static

Default price type is LAST.

◆ LAST

readonly CandlePrice com.dxfeed.api.candle.CandlePrice.LAST = new CandlePrice(CandlePriceType.Last, "last")
static

Last trading price.

◆ MARK

readonly CandlePrice com.dxfeed.api.candle.CandlePrice.MARK = new CandlePrice(CandlePriceType.Mark, "mark")
static

Market price defined as average between quote bid and ask prices.

◆ objCash

Dictionary<string, CandlePrice> com.dxfeed.api.candle.CandlePrice.objCash = new Dictionary<string, CandlePrice>()
staticprivate

◆ priceType

readonly CandlePriceType com.dxfeed.api.candle.CandlePrice.priceType
private

◆ SETTLEMENT

readonly CandlePrice com.dxfeed.api.candle.CandlePrice.SETTLEMENT = new CandlePrice(CandlePriceType.Settlement, "s")
static

Official settlement price that is defined by exchange or last trading price otherwise. It updates based on all com.dxfeed.api.data.PriceType values: com.dxfeed.api.data.PriceType#Indicative, com.dxfeed.api.data.PriceType#Preliminary, and com.dxfeed.api.data.PriceType#Final.

◆ value

readonly string com.dxfeed.api.candle.CandlePrice.value
private

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