|
dxFeed Graal CXX API v6.0.0
|
Price type attribute of CandleSymbol defines the price used to build the candles. More...
#include <CandlePrice.hpp>
Inheritance diagram for CandlePrice:Public Member Functions | |
| std::string | changeAttributeForSymbol (const StringLike &symbol) const override |
| Returns candle event symbol string with this candle price type set. | |
| const std::string & | toString () const &noexcept |
| Returns string representation of this candle price type. | |
Static Public Member Functions | |
| static std::reference_wrapper< const CandlePrice > | parse (const StringLike &s) |
| Parses string representation of a candle price type into an object. | |
| static std::reference_wrapper< const CandlePrice > | getAttributeForSymbol (const StringLike &symbol) noexcept |
| Returns the candle price type of the given candle symbol string. | |
| static std::string | normalizeAttributeForSymbol (const StringLike &symbol) |
| Returns candle symbol string with the normalized representation of the candle price type attribute. | |
Static Public Attributes | |
| static const CandlePrice | LAST {"last"} |
| Last trading price. | |
| static const CandlePrice | BID {"bid"} |
| Quote bid price. | |
| static const CandlePrice | ASK {"ask"} |
| Quote ask price. | |
| static const CandlePrice | MARK {"mark"} |
| Market price defined as average between quote bid and ask prices. | |
| static const CandlePrice | SETTLEMENT {"s"} |
| Official settlement price that is defined by exchange or last trading price otherwise. | |
| static const CandlePrice | DEFAULT = LAST |
| The default price type is CandlePrice::LAST. | |
| static const std::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. | |
Price type attribute of CandleSymbol defines the price used to build the candles.
This attribute is encoded in a symbol string with MarketEventSymbols.getAttributeStringByKey, changeAttributeStringByKey, and removeAttributeStringByKey methods. The key to use with these methods is available via CandlePrice::ATTRIBUTE_KEY constant. The value that this key shall be set to is equal to the corresponding CandlePrice::toString()
|
overridevirtual |
Returns candle event symbol string with this candle price type set.
| symbol | original candle event symbol. |
Implements CandleSymbolAttribute.
References ATTRIBUTE_KEY, DEFAULT, and toString().
|
staticnoexcept |
Returns the candle price type of the given candle symbol string.
The result is CandlePrice::DEFAULT if the symbol does not have a candle price type attribute.
| symbol | The candle symbol string. |
References ATTRIBUTE_KEY, and DEFAULT.
|
static |
Returns candle symbol string with the normalized representation of the candle price type attribute.
| symbol | candle symbol string. |
References ATTRIBUTE_KEY, and DEFAULT.
|
static |
Parses string representation of a candle price type into an object.
Any string returned by CandlePrice::toString() can be parsed, and a case is ignored for parsing.
| s | The string representation of a candle price type. |
| InvalidArgumentException | if the argument is empty or invalid |
|
noexcept |
Returns string representation of this candle price type.
The string representation of a candle price type is a lower case string that corresponds to its name. For example, CandlePrice::LAST is represented as "last".
Referenced by changeAttributeForSymbol().
|
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()
Referenced by changeAttributeForSymbol(), getAttributeForSymbol(), and normalizeAttributeForSymbol().
|
static |
Official settlement price that is defined by exchange or last trading price otherwise.
It updates based on all PriceType values: PriceType::INDICATIVE, PriceType::PRELIMINARY, and PriceType::FINAL}.