dxFeed Graal CXX API v5.0.0
Loading...
Searching...
No Matches
OptionSale Class Referencefinal

Option Sale event represents a trade or another market event with the price (for example, market open/close price, etc.) for each option symbol listed under the specified Underlying. More...

#include <OptionSale.hpp>

+ Inheritance diagram for OptionSale:

Public Types

using Ptr = std::shared_ptr<OptionSale>
 The alias to a type of shared pointer to the OptionSale object.
 
using Unique = std::unique_ptr<OptionSale>
 The alias to a type of unique pointer to the OptionSale 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 = std::shared_ptr<EventTypeWithSymbol<std::string>>
 The alias to a type of shared pointer to the EventTypeWithSymbol's child object.
 
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).
 
void assign (std::shared_ptr< EventType > event) override
 Replaces the contents of the event.
 
 OptionSale () noexcept=default
 Creates new option sale event with default values.
 
 OptionSale (const StringLike &eventSymbol) noexcept
 Creates a new option sale event with the specified event symbol.
 
OptionSalewithEventSymbol (const StringLike &eventSymbol) noexcept
 Changes an event's symbol and returns the current option sale.
 
OptionSalewithEventTime (std::int64_t eventTime) noexcept
 Changes event's creation time and returns the current option sale.
 
const IndexedEventSourcegetSource () 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.
 
OptionSalewithEventFlags (std::int32_t eventFlags) noexcept
 Changes transactional event flags and returns the current option sale.
 
void setEventFlags (const EventFlagsMask &eventFlags) noexcept override
 Changes transactional event flags.
 
OptionSalewithEventFlags (const EventFlagsMask &eventFlags) noexcept
 Changes transactional event flags and returns the current option sale.
 
std::int64_t getIndex () const noexcept override
 Returns a unique per-symbol index of this event.
 
void setIndex (std::int64_t index) override
 Changes the unique per-symbol index of this event.
 
OptionSalewithIndex (std::int64_t index) noexcept
 Changes unique per-symbol index of this event.
 
std::int64_t getTimeSequence () const noexcept
 Returns time and sequence of this event packaged into a single long value.
 
void setTimeSequence (std::int64_t timeSequence) noexcept
 Changes time and sequence of this event.
 
OptionSalewithTimeSequence (std::int64_t timeSequence) noexcept
 Changes time and sequence of this event.
 
std::int64_t getTime () const noexcept
 Returns time of this event.
 
void setTime (std::int64_t time) noexcept
 Changes time of this event.
 
OptionSalewithTime (std::int64_t time) noexcept
 Changes the timestamp of the event in milliseconds.
 
std::int64_t getTimeNanos () const noexcept
 Returns time of the original event in nanoseconds.
 
void setTimeNanos (std::int64_t timeNanos) noexcept
 Changes time of the original event.
 
OptionSalewithTimeNanos (std::int64_t timeNanos) noexcept
 Changes the time of this option sale and returns it.
 
void setTimeNanoPart (std::int32_t timeNanoPart) noexcept
 Changes microseconds and nanoseconds time part of the original event.
 
OptionSalewithTimeNanoPart (std::int32_t timeNanoPart) noexcept
 Changes microseconds and nanoseconds time part of this option sale.
 
std::int32_t getTimeNanoPart () const noexcept
 Returns microseconds and nanoseconds time part of the original event.
 
std::int32_t getSequence () const noexcept
 Returns the sequence number of this event to distinguish events that have the same time.
 
void setSequence (std::int32_t sequence)
 Changes sequence number of this event.
 
OptionSalewithSequence (std::int32_t sequence) noexcept
 Changes sequence number of this event.
 
std::int16_t getExchangeCode () const noexcept
 Returns exchange code of this option sale event.
 
std::string getExchangeCodeString () const noexcept
 Returns exchange code of this option sale as UTF8 string.
 
void setExchangeCode (char exchangeCode) noexcept
 Changes exchange code of this option sale event.
 
OptionSalewithExchangeCode (char exchangeCode) noexcept
 Changes exchange code of this option sale event.
 
void setExchangeCode (std::int16_t exchangeCode) noexcept
 Changes exchange code of this option sale event.
 
OptionSalewithExchangeCode (std::int16_t exchangeCode) noexcept
 Changes exchange code of this option sale event.
 
double getPrice () const noexcept
 Returns price of this option sale event.
 
void setPrice (double price) noexcept
 Changes price of this option sale event.
 
OptionSalewithPrice (double price) noexcept
 Changes price of this option sale event.
 
double getSize () const noexcept
 Returns the size of this option sale event.
 
void setSize (double size) noexcept
 Changes the size of this option sale event.
 
OptionSalewithSize (double size) noexcept
 Changes the size of this option sale event.
 
double getBidPrice () const noexcept
 Returns the current bid price on the market when this option sale event had occurred.
 
void setBidPrice (double bidPrice) noexcept
 Changes the current bid price on the market when this option sale event had occurred.
 
OptionSalewithBidPrice (double bidPrice) noexcept
 Changes the current bid price on the market when this option sale event had occurred.
 
double getAskPrice () const noexcept
 Returns the current ask price on the market when this option sale event had occurred.
 
void setAskPrice (double askPrice) noexcept
 Changes the current ask price on the market when this option sale event had occurred.
 
OptionSalewithAskPrice (double askPrice) noexcept
 Changes the current ask price on the market when this option sale event had occurred.
 
const std::string & getExchangeSaleConditions () const &noexcept
 Returns sale conditions provided for this event by data feed.
 
const std::optional< std::string > & getExchangeSaleConditionsOpt () const &noexcept
 Returns sale conditions provided for this event by data feed.
 
void setExchangeSaleConditions (const StringLike &exchangeSaleConditions) noexcept
 Changes sale conditions provided for this event by data feed.
 
OptionSalewithExchangeSaleConditions (const StringLike &exchangeSaleConditions) noexcept
 Changes sale conditions provided for this event by data feed.
 
char getTradeThroughExempt () const noexcept
 Returns TradeThroughExempt flag of this option sale event.
 
void setTradeThroughExempt (char tradeThroughExempt)
 Changes TradeThroughExempt flag of this option sale event.
 
OptionSalewithTradeThroughExempt (char tradeThroughExempt)
 Changes TradeThroughExempt flag of this option sale event.
 
const SidegetAggressorSide () const &noexcept
 Returns the aggressor side of this option sale event.
 
void setAggressorSide (const Side &side) noexcept
 Changes aggressor side of this option sale event.
 
OptionSalewithAggressorSide (const Side &side) noexcept
 Changes aggressor side of this option sale event.
 
bool isSpreadLeg () const noexcept
 Returns whether this event represents a spread leg.
 
void setSpreadLeg (bool spreadLeg) noexcept
 Changes whether this event represents a spread leg.
 
OptionSalewithSpreadLeg (bool spreadLeg) noexcept
 Changes whether this event represents a spread leg.
 
bool isExtendedTradingHours () const noexcept
 Returns whether this event represents an extended trading hours sale.
 
void setExtendedTradingHours (bool extendedTradingHours) noexcept
 Changes whether this event represents an extended trading hours sale.
 
OptionSalewithExtendedTradingHours (bool extendedTradingHours) noexcept
 Changes whether this event represents an extended trading hours sale.
 
bool isValidTick () const noexcept
 Returns whether this event represents a valid intraday tick.
 
void setValidTick (bool validTick) noexcept
 Changes whether this event represents a valid intraday tick.
 
OptionSalewithValidTick (bool validTick) noexcept
 Changes whether this event represents a valid intraday tick.
 
const TimeAndSaleTypegetType () const &noexcept
 Returns the type of this option sale event.
 
void setType (const TimeAndSaleType &type) noexcept
 Changes the type of this option sale event.
 
OptionSalewithType (const TimeAndSaleType &type) noexcept
 Changes the type of this option sale event.
 
bool isNew () const noexcept
 Returns whether this is a new event (not cancellation or correction).
 
bool isCorrection () const noexcept
 Returns whether this is a correction of a previous event.
 
bool isCancel () const noexcept
 Returns whether this is a cancellation of a previous event.
 
double getUnderlyingPrice () const noexcept
 Returns the underlying price at the time of this option sale event.
 
void setUnderlyingPrice (double underlyingPrice) noexcept
 Changes underlying price at the time of this option sale event.
 
OptionSalewithUnderlyingPrice (double underlyingPrice) noexcept
 Changes underlying price at the time of this option sale event.
 
double getVolatility () const noexcept
 Returns Black-Scholes implied volatility of the option at the time of this option sale event.
 
void setVolatility (double volatility) noexcept
 Changes Black-Scholes implied volatility of the option at the time of this option sale event.
 
OptionSalewithVolatility (double volatility) noexcept
 Changes Black-Scholes implied volatility of the option at the time of this option sale event.
 
double getDelta () const noexcept
 Return option delta at the time of this option sale event.
 
void setDelta (double delta) noexcept
 Changes option delta at the time of this option sale event.
 
OptionSalewithDelta (double delta) noexcept
 Changes option delta at the time of this option sale event.
 
const std::string & getOptionSymbol () const &noexcept
 Returns option symbol of this event.
 
const std::optional< std::string > & getOptionSymbolOpt () const &noexcept
 Returns option symbol of this event.
 
void setOptionSymbol (const StringLike &optionSymbol) noexcept
 Changes option symbol of this event.
 
OptionSalewithOptionSymbol (const StringLike &optionSymbol) noexcept
 Changes option symbol of this event.
 
std::string toString () const override
 Returns a string representation of the current object.
 
- Public Member Functions inherited from MarketEvent
const std::string & getEventSymbol () const &noexcept override
 Returns a symbol of this event.
 
const std::optional< std::string > & getEventSymbolOpt () const &noexcept override
 Returns a symbol of this event.
 
void setEventSymbol (const StringLike &eventSymbol) noexcept override
 Changes symbol of this event.
 
std::int64_t getEventTime () const noexcept override
 Returns time when an 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 EventTypeWithSymbol< std::string >
virtual void setEventSymbol (const std::string &eventSymbol) noexcept=0
 Changes the event symbol that identifies this event type in subscription.
 
- Public Member Functions inherited from SharedEntity
template<typename T>
bool is () const noexcept
 Checks that the 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 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::OPTION_SALE
 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 (const StringLike &eventSymbol) noexcept
 Protected constructor for concrete implementation classes that initializes eventSymbol property.
 

Detailed Description

Option Sale event represents a trade or another market event with the price (for example, market open/close price, etc.) for each option symbol listed under the specified Underlying.

Option Sales are intended to provide information about option trades in a continuous time slice with the additional metrics, like Option Volatility, Option Delta, and Underlying Price.

Option Sale events have unique index which can be used for later correction/cancellation processing.

Option sale data source provides a consistent view of the set of known option sales. 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 option sale events, thus source property is always DEFAULT.

This event is implemented on top of QDS records OptionSale.

Constructor & Destructor Documentation

◆ OptionSale()

OptionSale::OptionSale ( const StringLike & eventSymbol)
explicitnoexcept

Creates a new option sale event with the specified event symbol.

Parameters
eventSymbolThe event symbol.

References MarketEvent::MarketEvent().

Member Function Documentation

◆ assign()

void OptionSale::assign ( std::shared_ptr< EventType > event)
overridevirtual

Replaces the contents of the event.

Parameters
eventthe event to use as a source.

Reimplemented from MarketEvent.

References MarketEvent::assign().

◆ freeGraal()

void OptionSale::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.
Exceptions
InvalidArgumentException

◆ fromGraal()

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

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

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

◆ getAggressorSide()

const Side & OptionSale::getAggressorSide ( ) const &
noexcept

Returns the aggressor side of this option sale event.

Returns
aggressor side of this option sale event.

◆ getAskPrice()

double OptionSale::getAskPrice ( ) const
noexcept

Returns the current ask price on the market when this option sale event had occurred.

Returns
the current ask price on the market when this option sale event had occurred.

◆ getBidPrice()

double OptionSale::getBidPrice ( ) const
noexcept

Returns the current bid price on the market when this option sale event had occurred.

Returns
the current bid price on the market when this option sale event had occurred.

◆ getDelta()

double OptionSale::getDelta ( ) const
noexcept

Return option delta at the time of this option sale event.

Delta is the first derivative of an option price by an underlying price.

Returns
option delta at the time of this option sale event.

◆ getEventFlags()

std::int32_t OptionSale::getEventFlags ( ) const
overridevirtualnoexcept

Returns transactional event flags.

See EventFlag "Event Flags" section.

Returns
The transactional event flags.

Implements IndexedEvent.

◆ getEventFlagsMask()

EventFlagsMask OptionSale::getEventFlagsMask ( ) const
overridevirtualnoexcept

Returns transactional event flags.

See EventFlag "Event Flags" section.

Returns
The transactional event flags' mask.

Implements IndexedEvent.

◆ getExchangeCode()

std::int16_t OptionSale::getExchangeCode ( ) const
noexcept

Returns exchange code of this option sale event.

Returns
exchange code of this option sale event.

◆ getExchangeCodeString()

std::string OptionSale::getExchangeCodeString ( ) const
noexcept

Returns exchange code of this option sale as UTF8 string.

Returns
exchange code of this option sale as UTF8 string.

◆ getExchangeSaleConditions()

const std::string & OptionSale::getExchangeSaleConditions ( ) const &
noexcept

Returns sale conditions provided for this event by data feed.

This field format is specific for every particular data feed.

Returns
sale conditions or dxfcpp::String::NUL (std::string{"<null>"}).

◆ getExchangeSaleConditionsOpt()

const std::optional< std::string > & OptionSale::getExchangeSaleConditionsOpt ( ) const &
noexcept

Returns sale conditions provided for this event by data feed.

This field format is specific for every particular data feed.

Returns
sale conditions or std::nullopt.

◆ getIndex()

std::int64_t OptionSale::getIndex ( ) const
overridevirtualnoexcept

Returns a unique per-symbol index of this event.

The index is composed of time and sequence. Changing either time or sequence changes the event index.

Returns
unique index of this event.

Implements IndexedEvent.

◆ getOptionSymbol()

const std::string & OptionSale::getOptionSymbol ( ) const &
noexcept

Returns option symbol of this event.

Returns
option symbol of this event or dxfcpp::String::NUL (std::string{"<null>"}).

◆ getOptionSymbolOpt()

const std::optional< std::string > & OptionSale::getOptionSymbolOpt ( ) const &
noexcept

Returns option symbol of this event.

Returns
option symbol of this event or std::nullopt

◆ getPrice()

double OptionSale::getPrice ( ) const
noexcept

Returns price of this option sale event.

Returns
price of this option sale event.

◆ getSequence()

std::int32_t OptionSale::getSequence ( ) const
noexcept

Returns the sequence number of this event to distinguish events 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.

Returns
The sequence number of this event

◆ getSize()

double OptionSale::getSize ( ) const
noexcept

Returns the size of this option sale event.

Returns
size of this option sale event.

◆ getSource()

const IndexedEventSource & OptionSale::getSource ( ) const &
overridevirtualnoexcept

Returns the source of this event.

Returns
The source of this event.

Implements IndexedEvent.

References IndexedEventSource::DEFAULT.

◆ getTime()

std::int64_t OptionSale::getTime ( ) const
noexcept

Returns time of this event.

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

Returns
time of this event.

◆ getTimeNanoPart()

std::int32_t OptionSale::getTimeNanoPart ( ) const
noexcept

Returns microseconds and nanoseconds time part of the original event.

Returns
microseconds and nanoseconds time part of the original event.

◆ getTimeNanos()

std::int64_t OptionSale::getTimeNanos ( ) const
noexcept

Returns time of the original event in nanoseconds.

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

Returns
time of the original event in nanoseconds.

◆ getTimeSequence()

std::int64_t OptionSale::getTimeSequence ( ) const
noexcept

Returns time and sequence of this event packaged into a single long value.

Returns
time and sequence of this event.

◆ getTradeThroughExempt()

char OptionSale::getTradeThroughExempt ( ) const
noexcept

Returns TradeThroughExempt flag of this option sale event.

Returns
TradeThroughExempt flag of this option sale event.

◆ getType()

const TimeAndSaleType & OptionSale::getType ( ) const &
noexcept

Returns the type of this option sale event.

Returns
type of this option sale event.

Referenced by isCancel(), isCorrection(), and isNew().

◆ getUnderlyingPrice()

double OptionSale::getUnderlyingPrice ( ) const
noexcept

Returns the underlying price at the time of this option sale event.

Returns
underlying price at the time of this option sale event.

◆ getVolatility()

double OptionSale::getVolatility ( ) const
noexcept

Returns Black-Scholes implied volatility of the option at the time of this option sale event.

Returns
Black-Scholes implied volatility of the option at the time of this option sale event.

◆ isCancel()

bool OptionSale::isCancel ( ) const
noexcept

Returns whether this is a cancellation of a previous event.

It is false for a newly created option sale event.

Returns
true if this is a cancellation of a previous event

References TimeAndSaleType::CANCEL, and getType().

◆ isCorrection()

bool OptionSale::isCorrection ( ) const
noexcept

Returns whether this is a correction of a previous event.

It is false for a newly created option sale event.

Returns
true if this is a correction of a previous event

References TimeAndSaleType::CORRECTION, and getType().

◆ isExtendedTradingHours()

bool OptionSale::isExtendedTradingHours ( ) const
noexcept

Returns whether this event represents an extended trading hours sale.

Returns
true if this event represents an extended trading hours sale.

◆ isNew()

bool OptionSale::isNew ( ) const
noexcept

Returns whether this is a new event (not cancellation or correction).

It is true for a newly created option sale event.

Returns
true if this is a new event (not cancellation or correction).

References getType(), and TimeAndSaleType::NEW.

◆ isSpreadLeg()

bool OptionSale::isSpreadLeg ( ) const
noexcept

Returns whether this event represents a spread leg.

Returns
true if this event represents a spread leg.

◆ isValidTick()

bool OptionSale::isValidTick ( ) const
noexcept

Returns whether this event represents a valid intraday tick.

Note that a correction for a previously distributed valid tick represents a new valid tick itself, but a cancellation of a previous valid tick does not.

Returns
true if this event represents a valid intraday tick.

◆ setAggressorSide()

void OptionSale::setAggressorSide ( const Side & side)
noexcept

Changes aggressor side of this option sale event.

Parameters
sideaggressor side of this option sale event.

Referenced by withAggressorSide().

◆ setAskPrice()

void OptionSale::setAskPrice ( double askPrice)
noexcept

Changes the current ask price on the market when this option sale event had occurred.

Parameters
askPricethe current ask price on the market when this option sale event had occurred.

Referenced by withAskPrice().

◆ setBidPrice()

void OptionSale::setBidPrice ( double bidPrice)
noexcept

Changes the current bid price on the market when this option sale event had occurred.

Parameters
bidPricethe current bid price on the market when this option sale event had occurred.

Referenced by withBidPrice().

◆ setDelta()

void OptionSale::setDelta ( double delta)
noexcept

Changes option delta at the time of this option sale event.

Parameters
deltaoption delta at the time of this option sale event.

Referenced by withDelta().

◆ setEventFlags() [1/2]

void OptionSale::setEventFlags ( const EventFlagsMask & eventFlags)
overridevirtualnoexcept

Changes transactional event flags.

See EventFlag "Event Flags" section.

Parameters
eventFlagstransactional event flags' mask.

Implements IndexedEvent.

Referenced by withEventFlags().

◆ setEventFlags() [2/2]

void OptionSale::setEventFlags ( std::int32_t eventFlags)
overridevirtualnoexcept

Changes transactional event flags.

See EventFlag "Event Flags" section.

Parameters
eventFlagstransactional event flags.

Implements IndexedEvent.

Referenced by withEventFlags().

◆ setExchangeCode() [1/2]

void OptionSale::setExchangeCode ( char exchangeCode)
noexcept

Changes exchange code of this option sale event.

Parameters
exchangeCodeexchange code of this option sale event.

Referenced by withExchangeCode().

◆ setExchangeCode() [2/2]

void OptionSale::setExchangeCode ( std::int16_t exchangeCode)
noexcept

Changes exchange code of this option sale event.

Parameters
exchangeCodeexchange code of this option sale event.

Referenced by withExchangeCode().

◆ setExchangeSaleConditions()

void OptionSale::setExchangeSaleConditions ( const StringLike & exchangeSaleConditions)
noexcept

Changes sale conditions provided for this event by data feed.

Parameters
exchangeSaleConditionssale conditions.

Referenced by withExchangeSaleConditions().

◆ setExtendedTradingHours()

void OptionSale::setExtendedTradingHours ( bool extendedTradingHours)
noexcept

Changes whether this event represents an extended trading hours sale.

Parameters
extendedTradingHourstrue if this event represents an extended trading hours sale.

Referenced by withExtendedTradingHours().

◆ setIndex()

void OptionSale::setIndex ( std::int64_t index)
overridevirtual

Changes the unique per-symbol index of this event.

The index is composed of time and sequence and invocation of this method changes time and sequence. Do not use this method directly. Change time and/or sequence.

Parameters
indexthe event index.
See also
OptionSale::getIndex()

Implements IndexedEvent.

Referenced by withIndex().

◆ setOptionSymbol()

void OptionSale::setOptionSymbol ( const StringLike & optionSymbol)
noexcept

Changes option symbol of this event.

Parameters
optionSymboloption symbol of this event.

Referenced by withOptionSymbol().

◆ setPrice()

void OptionSale::setPrice ( double price)
noexcept

Changes price of this option sale event.

Parameters
priceprice of this option sale event.

Referenced by withPrice().

◆ setSequence()

void OptionSale::setSequence ( std::int32_t sequence)

Changes sequence number of this event.

Parameters
sequencethe sequence.
See also
getSequence()
Exceptions
InvalidArgumentException

References MAX_SEQUENCE.

Referenced by withSequence().

◆ setSize()

void OptionSale::setSize ( double size)
noexcept

Changes the size of this option sale event.

Parameters
sizesize of this option sale event.

Referenced by withSize().

◆ setSpreadLeg()

void OptionSale::setSpreadLeg ( bool spreadLeg)
noexcept

Changes whether this event represents a spread leg.

Parameters
spreadLegtrue if this event represents a spread leg.

Referenced by withSpreadLeg().

◆ setTime()

void OptionSale::setTime ( std::int64_t time)
noexcept

Changes time of this event.

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

Parameters
timetime of this event.

Referenced by setTimeNanos(), and withTime().

◆ setTimeNanoPart()

void OptionSale::setTimeNanoPart ( std::int32_t timeNanoPart)
noexcept

Changes microseconds and nanoseconds time part of the original event.

Parameters
timeNanoPartmicroseconds and nanoseconds time part of the original event.

Referenced by withTimeNanoPart().

◆ setTimeNanos()

void OptionSale::setTimeNanos ( std::int64_t timeNanos)
noexcept

Changes time of the original event.

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

Parameters
timeNanostime of the original event in nanoseconds.

References setTime().

Referenced by withTimeNanos().

◆ setTimeSequence()

void OptionSale::setTimeSequence ( std::int64_t timeSequence)
noexcept

Changes time and sequence of this event.

Do not use this method directly. Change time and/or sequence.

Parameters
timeSequencethe time and sequence.
See also
getTimeSequence()

Referenced by withTimeSequence().

◆ setTradeThroughExempt()

void OptionSale::setTradeThroughExempt ( char tradeThroughExempt)

Changes TradeThroughExempt flag of this option sale event.

Parameters
tradeThroughExemptTradeThroughExempt flag of this option sale event.

Referenced by withTradeThroughExempt().

◆ setType()

void OptionSale::setType ( const TimeAndSaleType & type)
noexcept

Changes the type of this option sale event.

Parameters
typetype of this option sale event.

Referenced by withType().

◆ setUnderlyingPrice()

void OptionSale::setUnderlyingPrice ( double underlyingPrice)
noexcept

Changes underlying price at the time of this option sale event.

Parameters
underlyingPriceunderlying price at the time of this option sale event.

Referenced by withUnderlyingPrice().

◆ setValidTick()

void OptionSale::setValidTick ( bool validTick)
noexcept

Changes whether this event represents a valid intraday tick.

Parameters
validTicktrue if this event represents a valid intraday tick.

Referenced by withValidTick().

◆ setVolatility()

void OptionSale::setVolatility ( double volatility)
noexcept

Changes Black-Scholes implied volatility of the option at the time of this option sale event.

Parameters
volatilityBlack-Scholes implied volatility of the option at the time of this option sale event.

Referenced by withVolatility().

◆ toGraal()

void * OptionSale::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.

References toString().

◆ toString()

std::string OptionSale::toString ( ) const
overridevirtual

Returns a string representation of the current object.

Returns
a string representation

Reimplemented from EventType.

Referenced by toGraal().

◆ withAggressorSide()

OptionSale & OptionSale::withAggressorSide ( const Side & side)
noexcept

Changes aggressor side of this option sale event.

Returns the current option sale.

Parameters
sideaggressor side of this option sale event.
Returns
The current option sale.

References setAggressorSide().

◆ withAskPrice()

OptionSale & OptionSale::withAskPrice ( double askPrice)
noexcept

Changes the current ask price on the market when this option sale event had occurred.

Returns the current option sale.

Parameters
askPricethe current ask price on the market when this option sale event had occurred.
Returns
The current option sale.

References setAskPrice().

◆ withBidPrice()

OptionSale & OptionSale::withBidPrice ( double bidPrice)
noexcept

Changes the current bid price on the market when this option sale event had occurred.

Returns the current option sale.

Parameters
bidPricethe current bid price on the market when this option sale event had occurred.
Returns
The current option sale.

References setBidPrice().

◆ withDelta()

OptionSale & OptionSale::withDelta ( double delta)
noexcept

Changes option delta at the time of this option sale event.

Returns the current option sale.

Parameters
deltaoption delta at the time of this option sale event.
Returns
The current option sale.

References setDelta().

◆ withEventFlags() [1/2]

OptionSale & OptionSale::withEventFlags ( const EventFlagsMask & eventFlags)
noexcept

Changes transactional event flags and returns the current option sale.

Parameters
eventFlagstransactional event flags' mask.
Returns
The current option sale.

References setEventFlags().

◆ withEventFlags() [2/2]

OptionSale & OptionSale::withEventFlags ( std::int32_t eventFlags)
noexcept

Changes transactional event flags and returns the current option sale.

See EventFlag "Event Flags" section.

Parameters
eventFlagstransactional event flags.
Returns
The current option sale.

References setEventFlags().

◆ withEventSymbol()

OptionSale & OptionSale::withEventSymbol ( const StringLike & eventSymbol)
noexcept

Changes an event's symbol and returns the current option sale.

Parameters
eventSymbolThe symbol of this event.
Returns
The current option sale.

References MarketEvent::setEventSymbol().

◆ withEventTime()

OptionSale & OptionSale::withEventTime ( std::int64_t eventTime)
noexcept

Changes event's creation time and returns the current option sale.

Parameters
eventTimethe difference, measured in milliseconds, between the event creation time and midnight, January 1, 1970 UTC.
Returns
The current option sale.

References MarketEvent::setEventTime().

◆ withExchangeCode() [1/2]

OptionSale & OptionSale::withExchangeCode ( char exchangeCode)
noexcept

Changes exchange code of this option sale event.

Returns the current option sale.

Parameters
exchangeCodeThe exchange code of this option sale.
Returns
The current option sale.

References setExchangeCode().

◆ withExchangeCode() [2/2]

OptionSale & OptionSale::withExchangeCode ( std::int16_t exchangeCode)
noexcept

Changes exchange code of this option sale event.

Returns the current order.

Parameters
exchangeCodeThe exchange code of this option sale.
Returns
The current option sale.

References setExchangeCode().

◆ withExchangeSaleConditions()

OptionSale & OptionSale::withExchangeSaleConditions ( const StringLike & exchangeSaleConditions)
noexcept

Changes sale conditions provided for this event by data feed.

Returns the current option sale.

Parameters
exchangeSaleConditionssale conditions.
Returns
The current option sale.

References setExchangeSaleConditions().

◆ withExtendedTradingHours()

OptionSale & OptionSale::withExtendedTradingHours ( bool extendedTradingHours)
noexcept

Changes whether this event represents an extended trading hours sale.

Returns the current option sale.

Parameters
extendedTradingHourstrue if this event represents an extended trading hours sale.
Returns
The current option sale.

References setExtendedTradingHours().

◆ withIndex()

OptionSale & OptionSale::withIndex ( std::int64_t index)
noexcept

Changes unique per-symbol index of this event.

Returns the current option sale.

Parameters
indexunique per-symbol index of this option sale.
Returns
The current option sale.

References setIndex().

◆ withOptionSymbol()

OptionSale & OptionSale::withOptionSymbol ( const StringLike & optionSymbol)
noexcept

Changes option symbol of this event.

Returns the current option sale.

Parameters
optionSymboloption symbol of this event.
Returns
The current option sale.

References setOptionSymbol().

◆ withPrice()

OptionSale & OptionSale::withPrice ( double price)
noexcept

Changes price of this option sale event.

Returns the current option sale.

Parameters
priceThe price of this option sale.
Returns
The current option sale.

References setPrice().

◆ withSequence()

OptionSale & OptionSale::withSequence ( std::int32_t sequence)
noexcept

Changes sequence number of this event.

Returns the current option sale.

Parameters
sequencethe sequence.
Returns
The current option sale.
See also
getSequence()

References setSequence().

◆ withSize()

OptionSale & OptionSale::withSize ( double size)
noexcept

Changes the size of this option sale event.

Returns the current option sale.

Parameters
sizesize of this option sale event.
Returns
The current option sale.

References setSize().

◆ withSpreadLeg()

OptionSale & OptionSale::withSpreadLeg ( bool spreadLeg)
noexcept

Changes whether this event represents a spread leg.

Returns the current option sale.

Parameters
spreadLegtrue if this event represents a spread leg.
Returns
The current option sale.

References setSpreadLeg().

◆ withTime()

OptionSale & OptionSale::withTime ( std::int64_t time)
noexcept

Changes the timestamp of the event in milliseconds.

Returns the current option sale.

Parameters
timetimestamp of the event in milliseconds.
Returns
The current option sale.

References setTime().

◆ withTimeNanoPart()

OptionSale & OptionSale::withTimeNanoPart ( std::int32_t timeNanoPart)
noexcept

Changes microseconds and nanoseconds time part of this option sale.

Returns the current option sale.

Parameters
timeNanoPartmicroseconds and nanoseconds time part of this option sale.
Returns
The current option sale.

References setTimeNanoPart().

◆ withTimeNanos()

OptionSale & OptionSale::withTimeNanos ( std::int64_t timeNanos)
noexcept

Changes the time of this option sale and returns it.

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

Parameters
timeNanosThe time of this option sale in nanoseconds.
Returns
The current option sale.

References setTimeNanos().

◆ withTimeSequence()

OptionSale & OptionSale::withTimeSequence ( std::int64_t timeSequence)
noexcept

Changes time and sequence of this event.

Returns the current option sale.

Parameters
timeSequencethe time and sequence.
Returns
The current option sale.

References setTimeSequence().

◆ withTradeThroughExempt()

OptionSale & OptionSale::withTradeThroughExempt ( char tradeThroughExempt)

Changes TradeThroughExempt flag of this option sale event.

Returns the current option sale.

Parameters
tradeThroughExemptTradeThroughExempt flag of this option sale event.
Returns
The current option sale.

References setTradeThroughExempt().

◆ withType()

OptionSale & OptionSale::withType ( const TimeAndSaleType & type)
noexcept

Changes the type of this option sale event.

Returns the current option sale.

Parameters
typetype of this option sale event.
Returns
The current option sale.

References setType().

◆ withUnderlyingPrice()

OptionSale & OptionSale::withUnderlyingPrice ( double underlyingPrice)
noexcept

Changes underlying price at the time of this option sale event.

Returns the current option sale.

Parameters
underlyingPriceunderlying price at the time of this option sale event.
Returns
The current option sale.

References setUnderlyingPrice().

◆ withValidTick()

OptionSale & OptionSale::withValidTick ( bool validTick)
noexcept

Changes whether this event represents a valid intraday tick.

Returns the current option sale.

Parameters
validTicktrue if this event represents a valid intraday tick.
Returns
The current option sale.

References setValidTick().

◆ withVolatility()

OptionSale & OptionSale::withVolatility ( double volatility)
noexcept

Changes Black-Scholes implied volatility of the option at the time of this option sale event.

Returns the current option sale.

Parameters
volatilityBlack-Scholes implied volatility of the option at the time of this option sale event.
Returns
The current option sale.

References setVolatility().

Member Data Documentation

◆ MAX_SEQUENCE

std::uint32_t OptionSale::MAX_SEQUENCE = (1U << 22U) - 1U
staticconstexpr

Maximum allowed sequence value.

See also
OptionSale::setSequence()

Referenced by setSequence().