dxFeed Graal CXX API
|
Series event is a snapshot of computed values that are available for all option series for a given underlying symbol based on the option prices on the market. More...
#include <Series.hpp>
Public Types | |
using | Ptr = std::shared_ptr<Series> |
The alias to a type of shared pointer to the Series object. | |
using | Unique = std::unique_ptr<Series> |
The alias to a type of unique pointer to the Series 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 IndexedEvent | |
using | Ptr = std::shared_ptr<IndexedEvent> |
The alias to a type of shared pointer to the IndexedEvent object. | |
Public Member Functions | |
void * | toGraal () const override |
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary). | |
Series () noexcept=default | |
Creates new series event with default values. | |
Series (std::string eventSymbol) noexcept | |
Creates new series event with the specified event symbol. | |
Series & | withEventSymbol (const std::string &eventSymbol) noexcept |
Changes event's symbol and returns the current series. | |
Series & | withEventTime (std::int64_t eventTime) noexcept |
Changes event's creation time and returns the current series. | |
const IndexedEventSource & | getSource () const &noexcept override |
Returns the source of this event. | |
std::int32_t | getEventFlags () const noexcept override |
Returns transactional event flags. | |
EventFlagsMask | getEventFlagsMask () const noexcept override |
Returns transactional event flags. | |
void | setEventFlags (std::int32_t eventFlags) noexcept override |
Changes transactional event flags. | |
void | setEventFlags (const EventFlagsMask &eventFlags) noexcept override |
Changes transactional event flags. | |
Series & | withEventFlags (std::int32_t eventFlags) noexcept |
Changes transactional event flags and returns the current series. | |
Series & | withEventFlags (const EventFlagsMask &eventFlags) noexcept |
Changes transactional event flags and returns the current series. | |
std::int64_t | getIndex () const noexcept override |
Returns unique per-symbol index of this event. | |
void | setIndex (std::int64_t index) override |
Changes unique per-symbol index of this event. | |
Series & | withIndex (std::int64_t index) noexcept |
Changes unique per-symbol index of this series and returns it. | |
std::int64_t | getTimeSequence () const noexcept |
Returns time and sequence of this event packaged into single long value. | |
void | setTimeSequence (std::int64_t timeSequence) noexcept |
Changes time and sequence of this event. | |
std::int64_t | getTime () const noexcept |
Returns time of this series event. | |
void | setTime (std::int64_t time) noexcept |
Changes time of this series event. | |
Series & | withTime (std::int64_t time) noexcept |
Changes time of this series and returns it. | |
std::int32_t | getSequence () const noexcept |
Returns sequence number of this series event to distinguish trades that have the same time. | |
void | setSequence (std::int32_t sequence) |
Changes sequence number of this series event. | |
Series & | withSequence (std::int32_t sequence) noexcept |
Changes sequence number of this series. | |
std::int32_t | getExpiration () const noexcept |
Returns day id of expiration. | |
void | setExpiration (std::int32_t expiration) noexcept |
Changes day id of expiration. | |
double | getVolatility () const noexcept |
Returns implied volatility index for this series based on VIX methodology. | |
void | setVolatility (double volatility) noexcept |
Changes implied volatility index for this series based on VIX methodology. | |
double | getCallVolume () const noexcept |
Returns call options traded volume for a day. | |
void | setCallVolume (double callVolume) noexcept |
Changes call options traded volume for a day. | |
double | getPutVolume () const noexcept |
Returns put options traded volume for a day. | |
void | setPutVolume (double putVolume) noexcept |
Changes put options traded volume for a day. | |
double | getOptionVolume () const noexcept |
Returns options traded volume for a day. | |
double | getPutCallRatio () const noexcept |
Returns ratio of put options traded volume to call options traded volume for a day. | |
void | setPutCallRatio (double putCallRatio) noexcept |
Changes ratio of put options traded volume to call options traded volume for a day. | |
double | getForwardPrice () const noexcept |
Returns implied forward price for this option series. | |
void | setForwardPrice (double forwardPrice) noexcept |
Changes implied forward price for this option series. | |
double | getDividend () const noexcept |
Returns implied simple dividend return of the corresponding option series. | |
void | setDividend (double dividend) noexcept |
Changes implied simple dividend return of the corresponding option series. | |
double | getInterest () const noexcept |
Returns implied simple interest return of the corresponding option series. | |
void | setInterest (double interest) noexcept |
Changes implied simple interest return of the corresponding option series. | |
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 EventTypeEnum & | TYPE = EventTypeEnum::SERIES |
Type identifier and additional information about the current event class. | |
static constexpr std::uint32_t | MAX_SEQUENCE = (1U << 22U) - 1U |
Maximum allowed sequence value. | |
Static Public Attributes inherited from IndexedEvent | |
static const EventFlag | TX_PENDING = EventFlag::TX_PENDING |
0x01 - A bitmask to get transaction pending indicator from the value of eventFlags property. | |
static const EventFlag | REMOVE_EVENT = EventFlag::REMOVE_EVENT |
0x02 - A bitmask to get removal indicator from the value of eventFlags property. | |
static const EventFlag | SNAPSHOT_BEGIN = EventFlag::SNAPSHOT_BEGIN |
0x04 - A bitmask to get snapshot begin indicator from the value of eventFlags property. | |
static const EventFlag | SNAPSHOT_END = EventFlag::SNAPSHOT_END |
0x08 - A bitmask to get snapshot end indicator from the value of eventFlags property. | |
static const EventFlag | SNAPSHOT_SNIP = EventFlag::SNAPSHOT_SNIP |
0x10 - A bitmask to get snapshot snip indicator from the value of eventFlags property. | |
static const EventFlag | SNAPSHOT_MODE = EventFlag::SNAPSHOT_MODE |
0x40 - A bitmask to set snapshot mode indicator into the value of eventFlags property. | |
Additional Inherited Members | |
Protected Member Functions inherited from MarketEvent | |
MarketEvent (std::string eventSymbol) noexcept | |
Protected constructor for concrete implementation classes that initializes eventSymbol property. | |
Series event is a snapshot of computed values that are available for all option series for a given underlying symbol based on the option prices on the market.
It represents the most recent information that is available about the corresponding values on the market at any given moment of time.
Series is an IndexedEvent with multiple instances of event available for each underlying symbol. Each series event instance corresponds to an OptionSeries of the corresponding underlying. The correspondence between a series event instance and an OptionSeries is established via expiration property. If case where there are multiple series at the same expiration day id, then series events are are ordered by their index in the same order as the corresponding OptionSeries are ordered by their attributes.
Series data source provides a consistent view of the set of known series. The corresponding information is carried in eventFlags property. The logic behind this property is detailed in IndexedEvent class documentation. Multiple event sources for the same symbol are not supported for series, thus source property is always DEFAULT.
IndexedEventModel class handles all the snapshot and transaction logic and conveniently represents a list current of events.
This event is implemented on top of QDS records Series
.
|
inlineexplicitnoexcept |
Creates new series event with the specified event symbol.
eventSymbol | The event symbol. |
|
static |
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
graalNative | The pointer to the dxFeed Graal SDK structure. |
|
static |
Creates an object of the current type and fills it with data from the the dxFeed Graal SDK structure.
graalNative | The pointer to the dxFeed Graal SDK structure. |
std::invalid_argument |
|
inlinenoexcept |
Returns call options traded volume for a day.
|
inlinenoexcept |
Returns implied simple dividend return of the corresponding option series.
|
inlineoverridevirtualnoexcept |
Returns transactional event flags.
See EventFlag "Event Flags" section.
Implements IndexedEvent.
|
inlineoverridevirtualnoexcept |
Returns transactional event flags.
See EventFlag "Event Flags" section.
Implements IndexedEvent.
|
inlinenoexcept |
Returns day id of expiration.
Example: day_util::#getDayIdByYearMonthDay() "dxfcpp::day_util::getDayIdByYearMonthDay"(20090117).
|
inlinenoexcept |
Returns implied forward price for this option series.
|
inlineoverridevirtualnoexcept |
Returns unique per-symbol index of this event.
The index is composed of time and sequence. Changing either time or sequence changes event index.
Implements IndexedEvent.
|
inlinenoexcept |
Returns implied simple interest return of the corresponding option series.
|
inlinenoexcept |
Returns options traded volume for a day.
|
inlinenoexcept |
Returns ratio of put options traded volume to call options traded volume for a day.
|
inlinenoexcept |
Returns put options traded volume for a day.
|
inlinenoexcept |
Returns sequence number of this series event to distinguish trades that have the same time.
This sequence number does not have to be unique and does not need to be sequential. Sequence can range from 0 to MAX_SEQUENCE.
References MAX_SEQUENCE.
Referenced by setTime().
|
inlineoverridevirtualnoexcept |
Returns the source of this event.
Implements IndexedEvent.
References IndexedEventSource::DEFAULT.
|
inlinenoexcept |
Returns time of this series event.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
|
inlinenoexcept |
Returns time and sequence of this event packaged into single long value.
|
inlinenoexcept |
Returns implied volatility index for this series based on VIX methodology.
|
inlinenoexcept |
Changes call options traded volume for a day.
callVolume | call options traded volume for a day. |
|
inlinenoexcept |
Changes implied simple dividend return of the corresponding option series.
dividend | implied simple dividend return of the corresponding option series. |
|
inlineoverridevirtualnoexcept |
Changes transactional event flags.
See EventFlag "Event Flags" section.
eventFlags | transactional event flags' mask. |
Implements IndexedEvent.
References EventFlagsMask::getMask().
Referenced by withEventFlags().
|
inlineoverridevirtualnoexcept |
Changes transactional event flags.
See EventFlag "Event Flags" section.
eventFlags | transactional event flags. |
Implements IndexedEvent.
Referenced by withEventFlags().
|
inlinenoexcept |
Changes day id of expiration.
expiration | day id of expiration. |
|
inlinenoexcept |
Changes implied forward price for this option series.
forwardPrice | implied forward price for this option series. |
|
inlineoverridevirtual |
Changes unique per-symbol index of this event.
index | the event index. |
Implements IndexedEvent.
Referenced by withIndex().
|
inlinenoexcept |
Changes implied simple interest return of the corresponding option series.
interest | implied simple interest return of the corresponding option series. |
|
inlinenoexcept |
Changes ratio of put options traded volume to call options traded volume for a day.
putCallRatio | ratio of put options traded volume to call options traded volume for a day. |
|
inlinenoexcept |
Changes put options traded volume for a day.
putVolume | put options traded volume for a day. |
|
inline |
Changes sequence number of this series event.
sequence | the sequence. |
References MAX_SEQUENCE.
Referenced by withSequence().
|
inlinenoexcept |
Changes time of this series event.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
time | time of this series event. |
References getSequence().
Referenced by withTime().
|
inlinenoexcept |
Changes time and sequence of this event.
Do not use this method directly. Change time and/or sequence.
timeSequence | the time and sequence. |
|
inlinenoexcept |
Changes implied volatility index for this series based on VIX methodology.
volatility | implied volatility index for this series based on VIX methodology. |
|
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.
Implements EventType.
|
overridevirtualnoexcept |
Returns a string representation of the current object.
Reimplemented from EventType.
|
inlinenoexcept |
Changes transactional event flags and returns the current series.
See EventFlag "Event Flags" section.
eventFlags | transactional event flags' mask. |
References setEventFlags().
|
inlinenoexcept |
Changes transactional event flags and returns the current series.
See EventFlag "Event Flags" section.
eventFlags | transactional event flags. |
References setEventFlags().
|
inlinenoexcept |
Changes event's symbol and returns the current series.
eventSymbol | The symbol of this event. |
References MarketEvent::setEventSymbol().
|
inlinenoexcept |
Changes event's creation time and returns the current series.
eventTime | the difference, measured in milliseconds, between the event creation time and midnight, January 1, 1970 UTC. |
References MarketEvent::setEventTime().
|
inlinenoexcept |
Changes unique per-symbol index of this series and returns it.
index | unique per-symbol index of this series. |
References setIndex().
|
inlinenoexcept |
Changes sequence number of this series.
Returns the current order.
sequence | the sequence. |
References setSequence().
|
inlinenoexcept |
Changes time of this series and returns it.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
time | time of this series. |
References setTime().
|
staticconstexpr |
Maximum allowed sequence value.
Referenced by getSequence(), and setSequence().