dxFeed Graal CXX API v9.0.0
Loading...
Searching...
No Matches
CandleExchange Struct Referencefinal

Exchange attribute of CandleSymbol defines the exchange identifier where data is taken from to build the candles. More...

#include <CandleExchange.hpp>

Inheritance diagram for CandleExchange:

Public Member Functions

char getExchangeCode () const noexcept
 Returns exchange code.
std::string changeAttributeForSymbol (StringParam symbol) const override
 Returns candle event symbol string with this exchange set.
std::string toString () const
 Returns string representation of this exchange.

Static Public Member Functions

static CandleExchange valueOf (char exchangeCode) noexcept
 Returns an exchange attribute object that corresponds to the specified exchange code character.
static CandleExchange getAttributeForSymbol (StringParam symbol)
 Returns exchange an attribute object of the given candle symbol string.

Static Public Attributes

static const CandleExchange COMPOSITE {'\0'}
 Composite exchange where data is taken from all exchanges.
static const CandleExchange DEFAULT {'\0'}
 Default exchange is CandleExchange::COMPOSITE.

Detailed Description

Exchange attribute of CandleSymbol defines the exchange identifier where data is taken from to build the candles.

Implementation details

This attribute is encoded in a symbol string with MarketEventSymbols.getExchangeCode and changeExchangeCode methods.

Member Function Documentation

◆ changeAttributeForSymbol()

std::string CandleExchange::changeAttributeForSymbol ( StringParam symbol) const
overridevirtual

Returns candle event symbol string with this exchange set.

Parameters
symbolThe original candle event symbol.
Returns
candle event symbol string with this exchange set.

Implements CandleSymbolAttribute.

◆ getAttributeForSymbol()

CandleExchange CandleExchange::getAttributeForSymbol ( StringParam symbol)
static

Returns exchange an attribute object of the given candle symbol string.

The result is CandleExchange::DEFAULT if the symbol does not have an exchange attribute.

Parameters
symbolcandle symbol string.
Returns
exchange attribute object of the given candle symbol string.

◆ getExchangeCode()

char CandleExchange::getExchangeCode ( ) const
noexcept

Returns exchange code.

It is '\0' for CandleExchange::COMPOSITE exchange.

Returns
exchange code.

◆ toString()

std::string CandleExchange::toString ( ) const

Returns string representation of this exchange.

It is the string "COMPOSITE" for CandleExchange::COMPOSITE exchange or exchange character otherwise.

Returns
string representation of this exchange.

◆ valueOf()

CandleExchange CandleExchange::valueOf ( char exchangeCode)
staticnoexcept

Returns an exchange attribute object that corresponds to the specified exchange code character.

Parameters
exchangeCodeThe exchange code character.
Returns
exchange attribute object.