dxFeed Graal CXX API
Loading...
Searching...
No Matches
Profile Class Referencefinal

Profile information snapshot that contains security instrument description. More...

#include <Profile.hpp>

+ Inheritance diagram for Profile:

Public Types

using Ptr = std::shared_ptr<Profile>
 The alias to a type of shared pointer to the Profile object.
 
using Unique = std::unique_ptr<Profile>
 The alias to a type of unique pointer to the Profile object.
 
- Public Types inherited from MarketEvent
using Ptr = std::shared_ptr<MarketEvent>
 The alias to a type of shared pointer to the MarketEvent object.
 
- Public Types inherited from EventTypeWithSymbol< std::string >
using Ptr
 The alias to a type of shared pointer to the EventTypeWithSymbol's child object.
 
- Public Types inherited from EventType
using Ptr = std::shared_ptr<EventType>
 The alias to a type of shared pointer to the EventType object.
 
- Public Types inherited from SharedEntity
using Ptr = std::shared_ptr<SharedEntity>
 The alias to a type of shared pointer to the SharedEntity object.
 
- Public Types inherited from LastingEvent
using Ptr = std::shared_ptr<LastingEvent>
 The alias to a type of shared pointer to the LastingEvent object.
 

Public Member Functions

void * toGraal () const override
 Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
 
 Profile () noexcept=default
 Creates new profile event with default values.
 
 Profile (std::string eventSymbol) noexcept
 Creates new profile event with the specified event symbol.
 
const std::string & getDescription () const &noexcept
 Returns description of the security instrument.
 
const std::optional< std::string > & getDescriptionOpt () const &noexcept
 Returns description of the security instrument.
 
void setDescription (std::string description) noexcept
 Changes description of the security instrument.
 
const ShortSaleRestrictiongetShortSaleRestriction () const &noexcept
 Returns short sale restriction of the security instrument.
 
void setShortSaleRestriction (const ShortSaleRestriction &restriction) noexcept
 Changes short sale restriction of the security instrument.
 
bool isShortSaleRestricted () const noexcept
 Returns short sale restriction status of the security instrument.
 
const TradingStatusgetTradingStatus () const &noexcept
 Returns trading status of the security instrument.
 
void setTradingStatus (const TradingStatus &status) noexcept
 Changes trading status of the security instrument.
 
bool isTradingHalted () const noexcept
 Returns trading halt status of the security instrument.
 
const std::string & getStatusReason () const &noexcept
 Returns description of the reason that trading was halted.
 
const std::optional< std::string > & getStatusReasonOpt () const &noexcept
 Returns description of the reason that trading was halted.
 
void setStatusReason (std::string statusReason) noexcept
 Changes description of the reason that trading was halted.
 
std::int64_t getHaltStartTime () const noexcept
 Returns starting time of the trading halt interval.
 
void setHaltStartTime (std::int64_t haltStartTime) noexcept
 Changes starting time of the trading halt interval.
 
std::int64_t getHaltEndTime () const noexcept
 Returns ending time of the trading halt interval.
 
void setHaltEndTime (std::int64_t haltEndTime) noexcept
 Changes ending time of the trading halt interval.
 
double getHighLimitPrice () const noexcept
 Returns the maximal (high) allowed price.
 
void setHighLimitPrice (double highLimitPrice) noexcept
 Changes the maximal (high) allowed price.
 
double getLowLimitPrice () const noexcept
 Returns the minimal (low) allowed price.
 
void setLowLimitPrice (double lowLimitPrice) noexcept
 Changes the minimal (low) allowed price.
 
double getHigh52WeekPrice () const noexcept
 Returns the maximal (high) price in last 52 weeks.
 
void setHigh52WeekPrice (double high52WeekPrice) noexcept
 Changes the maximal (high) price in last 52 weeks.
 
double getLow52WeekPrice () const noexcept
 Returns the minimal (low) price in last 52 weeks.
 
void setLow52WeekPrice (double low52WeekPrice) noexcept
 Changes the minimal (low) price in last 52 weeks.
 
double getBeta () const noexcept
 Returns the correlation coefficient of the instrument to the S&P500 index.
 
void setBeta (double beta) noexcept
 Changes the correlation coefficient of the instrument to the S&P500 index.
 
double getEarningsPerShare () const noexcept
 Returns earnings per share (the company’s profits divided by the number of shares).
 
void setEarningsPerShare (double earningsPerShare) noexcept
 Changes Earnings per share (the company’s profits divided by the number of shares).
 
double getDividendFrequency () const noexcept
 Returns frequency of cash dividends payments per year (calculated).
 
void setDividendFrequency (double dividendFrequency) noexcept
 Changes frequency of cash dividends payments per year.
 
double getExDividendAmount () const noexcept
 Returns the amount of the last paid dividend.
 
void setExDividendAmount (double exDividendAmount) noexcept
 Changes the amount of the last paid dividend.
 
std::int32_t getExDividendDayId () const noexcept
 Returns identifier of the day of the last dividend payment (ex-dividend date).
 
void setExDividendDayId (std::int32_t exDividendDayId) noexcept
 Changes identifier of the day of the last dividend payment (ex-dividend date).
 
double getShares () const noexcept
 Returns the number of shares outstanding.
 
void setShares (double shares) noexcept
 Changes the number of shares outstanding.
 
double getFreeFloat () const noexcept
 Returns free-float - the number of shares outstanding that are available to the public for trade.
 
void setFreeFloat (double freeFloat) noexcept
 Changes free-float - the number of shares outstanding that are available to the public for trade.
 
std::string toString () const noexcept override
 Returns a string representation of the current object.
 
- Public Member Functions inherited from MarketEvent
const std::string & getEventSymbol () const &noexcept override
 Returns symbol of this event.
 
const std::optional< std::string > & getEventSymbolOpt () const &noexcept override
 Returns symbol of this event.
 
void setEventSymbol (const std::string &eventSymbol) noexcept override
 Changes symbol of this event.
 
std::int64_t getEventTime () const noexcept override
 Returns time when event was created or zero when time is not available.
 
void setEventTime (std::int64_t eventTime) noexcept override
 Changes event creation time.
 
- Public Member Functions inherited from SharedEntity
template<typename T >
bool is () const noexcept
 Checks that pointer to the current type could be converted to type T* In other words: whether type T belongs to the type hierarchy in which the current type resides.
 
template<typename T >
std::shared_ptr< T > sharedAs () noexcept
 Returns a pointer to the current object wrapped in a smart pointer to type T.
 
template<typename T >
std::shared_ptr< T > sharedAs () const noexcept
 Returns a pointer to the current object wrapped in a smart pointer to type T.
 
- Public Member Functions inherited from Entity
virtual ~Entity () noexcept=default
 The default virtual d-tor.
 

Static Public Member Functions

static Ptr fromGraal (void *graalNative)
 Creates an object of the current type and fills it with data from the the dxFeed Graal SDK structure.
 
static void freeGraal (void *graalNative)
 Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
 

Static Public Attributes

static const EventTypeEnumTYPE = EventTypeEnum::PROFILE
 Type identifier and additional information about the current event class.
 

Additional Inherited Members

- Protected Member Functions inherited from MarketEvent
 MarketEvent (std::string eventSymbol) noexcept
 Protected constructor for concrete implementation classes that initializes eventSymbol property.
 

Detailed Description

Profile information snapshot that contains security instrument description.

It represents the most recent information that is available about the traded security on the market at any given moment of time.

Constructor & Destructor Documentation

◆ Profile()

Profile::Profile ( std::string eventSymbol)
inlineexplicitnoexcept

Creates new profile event with the specified event symbol.

Parameters
eventSymbolThe event symbol.

Member Function Documentation

◆ freeGraal()

void Profile::freeGraal ( void * graalNative)
static

Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).

Parameters
graalNativeThe pointer to the dxFeed Graal SDK structure.

◆ fromGraal()

std::shared_ptr< Profile > Profile::fromGraal ( void * graalNative)
static

Creates an object of the current type and fills it with data from the the dxFeed Graal SDK structure.

Parameters
graalNativeThe pointer to the dxFeed Graal SDK structure.
Returns
The object of current type.
Exceptions
std::invalid_argument

◆ getBeta()

double Profile::getBeta ( ) const
inlinenoexcept

Returns the correlation coefficient of the instrument to the S&P500 index.

Returns
the correlation coefficient of the instrument to the S&P500 index.

◆ getDescription()

const std::string & Profile::getDescription ( ) const &
inlinenoexcept

Returns description of the security instrument.

Returns
description of the security instrument or dxfcpp::String::NUL (std::string{"<null>"}).

◆ getDescriptionOpt()

const std::optional< std::string > & Profile::getDescriptionOpt ( ) const &
inlinenoexcept

Returns description of the security instrument.

Returns
description of the security instrument or std::nullopt

◆ getDividendFrequency()

double Profile::getDividendFrequency ( ) const
inlinenoexcept

Returns frequency of cash dividends payments per year (calculated).

Returns
Frequency of cash dividends payments per year

◆ getEarningsPerShare()

double Profile::getEarningsPerShare ( ) const
inlinenoexcept

Returns earnings per share (the company’s profits divided by the number of shares).

Returns
earnings per share

◆ getExDividendAmount()

double Profile::getExDividendAmount ( ) const
inlinenoexcept

Returns the amount of the last paid dividend.

Returns
the amount of the last paid dividend

◆ getExDividendDayId()

std::int32_t Profile::getExDividendDayId ( ) const
inlinenoexcept

Returns identifier of the day of the last dividend payment (ex-dividend date).

Identifier of the day is the number of days passed since January 1, 1970.

Returns
the identifier of the day of the last dividend payment

◆ getFreeFloat()

double Profile::getFreeFloat ( ) const
inlinenoexcept

Returns free-float - the number of shares outstanding that are available to the public for trade.

Returns
free-float

◆ getHaltEndTime()

std::int64_t Profile::getHaltEndTime ( ) const
inlinenoexcept

Returns ending time of the trading halt interval.

Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.

Returns
ending time of the trading halt interval.

◆ getHaltStartTime()

std::int64_t Profile::getHaltStartTime ( ) const
inlinenoexcept

Returns starting time of the trading halt interval.

Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.

Returns
starting time of the trading halt interval.

◆ getHigh52WeekPrice()

double Profile::getHigh52WeekPrice ( ) const
inlinenoexcept

Returns the maximal (high) price in last 52 weeks.

Returns
the maximal (high) price in last 52 weeks.

◆ getHighLimitPrice()

double Profile::getHighLimitPrice ( ) const
inlinenoexcept

Returns the maximal (high) allowed price.

Returns
the maximal (high) allowed price.

◆ getLow52WeekPrice()

double Profile::getLow52WeekPrice ( ) const
inlinenoexcept

Returns the minimal (low) price in last 52 weeks.

Returns
the minimal (low) price in last 52 weeks.

◆ getLowLimitPrice()

double Profile::getLowLimitPrice ( ) const
inlinenoexcept

Returns the minimal (low) allowed price.

Returns
the minimal (low) allowed price.

◆ getShares()

double Profile::getShares ( ) const
inlinenoexcept

Returns the number of shares outstanding.

Returns
shares outstanding

◆ getShortSaleRestriction()

const ShortSaleRestriction & Profile::getShortSaleRestriction ( ) const &
inlinenoexcept

Returns short sale restriction of the security instrument.

Returns
short sale restriction of the security instrument.

Referenced by isShortSaleRestricted().

◆ getStatusReason()

const std::string & Profile::getStatusReason ( ) const &
inlinenoexcept

Returns description of the reason that trading was halted.

Returns
description of the reason that trading was halted or dxfcpp::String::NUL (std::string{"<null>"}).

◆ getStatusReasonOpt()

const std::optional< std::string > & Profile::getStatusReasonOpt ( ) const &
inlinenoexcept

Returns description of the reason that trading was halted.

Returns
description of the reason that trading was halted or std::nullopt.

◆ getTradingStatus()

const TradingStatus & Profile::getTradingStatus ( ) const &
inlinenoexcept

Returns trading status of the security instrument.

Returns
trading status of the security instrument.

Referenced by isTradingHalted().

◆ isShortSaleRestricted()

bool Profile::isShortSaleRestricted ( ) const
inlinenoexcept

Returns short sale restriction status of the security instrument.

Returns
true if short sale of the security instrument is restricted.

References ShortSaleRestriction::ACTIVE, and getShortSaleRestriction().

◆ isTradingHalted()

bool Profile::isTradingHalted ( ) const
inlinenoexcept

Returns trading halt status of the security instrument.

Returns
true if trading of the security instrument is halted.

References getTradingStatus(), and TradingStatus::HALTED.

◆ setBeta()

void Profile::setBeta ( double beta)
inlinenoexcept

Changes the correlation coefficient of the instrument to the S&P500 index.

Parameters
betathe correlation coefficient of the instrument to the S&P500 index

◆ setDescription()

void Profile::setDescription ( std::string description)
inlinenoexcept

Changes description of the security instrument.

Parameters
descriptiondescription of the security instrument.

◆ setDividendFrequency()

void Profile::setDividendFrequency ( double dividendFrequency)
inlinenoexcept

Changes frequency of cash dividends payments per year.

Parameters
dividendFrequencyfrequency of cash dividends payments per year

◆ setEarningsPerShare()

void Profile::setEarningsPerShare ( double earningsPerShare)
inlinenoexcept

Changes Earnings per share (the company’s profits divided by the number of shares).

Parameters
earningsPerShareearnings per share

◆ setExDividendAmount()

void Profile::setExDividendAmount ( double exDividendAmount)
inlinenoexcept

Changes the amount of the last paid dividend.

Parameters
exDividendAmountthe amount of the last paid dividend

◆ setExDividendDayId()

void Profile::setExDividendDayId ( std::int32_t exDividendDayId)
inlinenoexcept

Changes identifier of the day of the last dividend payment (ex-dividend date).

Identifier of the day is the number of days passed since January 1, 1970.

Parameters
exDividendDayIdidentifier of the day of the last dividend payment

◆ setFreeFloat()

void Profile::setFreeFloat ( double freeFloat)
inlinenoexcept

Changes free-float - the number of shares outstanding that are available to the public for trade.

Parameters
freeFloatthe number of shares outstanding that are available to the public for trade

◆ setHaltEndTime()

void Profile::setHaltEndTime ( std::int64_t haltEndTime)
inlinenoexcept

Changes ending time of the trading halt interval.

Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.

Parameters
haltEndTimeending time of the trading halt interval.

◆ setHaltStartTime()

void Profile::setHaltStartTime ( std::int64_t haltStartTime)
inlinenoexcept

Changes starting time of the trading halt interval.

Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.

Parameters
haltStartTimestarting time of the trading halt interval.

◆ setHigh52WeekPrice()

void Profile::setHigh52WeekPrice ( double high52WeekPrice)
inlinenoexcept

Changes the maximal (high) price in last 52 weeks.

Parameters
high52WeekPricethe maximal (high) price in last 52 weeks.

◆ setHighLimitPrice()

void Profile::setHighLimitPrice ( double highLimitPrice)
inlinenoexcept

Changes the maximal (high) allowed price.

Parameters
highLimitPricethe maximal (high) allowed price.

◆ setLow52WeekPrice()

void Profile::setLow52WeekPrice ( double low52WeekPrice)
inlinenoexcept

Changes the minimal (low) price in last 52 weeks.

Parameters
low52WeekPricethe minimal (low) price in last 52 weeks.

◆ setLowLimitPrice()

void Profile::setLowLimitPrice ( double lowLimitPrice)
inlinenoexcept

Changes the minimal (low) allowed price.

Parameters
lowLimitPricethe minimal (low) allowed price.

◆ setShares()

void Profile::setShares ( double shares)
inlinenoexcept

Changes the number of shares outstanding.

Parameters
sharesshares outstanding.

◆ setShortSaleRestriction()

void Profile::setShortSaleRestriction ( const ShortSaleRestriction & restriction)
inlinenoexcept

Changes short sale restriction of the security instrument.

Parameters
restrictionshort sale restriction of the security instrument.

◆ setStatusReason()

void Profile::setStatusReason ( std::string statusReason)
inlinenoexcept

Changes description of the reason that trading was halted.

Parameters
statusReasondescription of the reason that trading was halted.

◆ setTradingStatus()

void Profile::setTradingStatus ( const TradingStatus & status)
inlinenoexcept

Changes trading status of the security instrument.

Parameters
statustrading status of the security instrument.

◆ toGraal()

void * Profile::toGraal ( ) const
overridevirtual

Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).

Fills the dxFeed Graal SDK structure's fields by the data of the current entity (recursively if necessary). Returns the pointer to the filled structure.

Returns
The pointer to the filled dxFeed Graal SDK structure

Implements EventType.

◆ toString()

std::string Profile::toString ( ) const
overridevirtualnoexcept

Returns a string representation of the current object.

Returns
a string representation

Reimplemented from EventType.