dxFeed Graal CXX API
|
Quote event is a snapshot of the best bid and ask prices, and other fields that change with each quote. More...
#include <Quote.hpp>
Public Types | |
using | Ptr = std::shared_ptr<Quote> |
The alias to a type of shared pointer to the Quote object. | |
using | Unique = std::unique_ptr<Quote> |
The alias to a type of unique pointer to the Quote object. | |
Public Types inherited from dxfcpp::MarketEvent | |
using | Ptr = std::shared_ptr<MarketEvent> |
The alias to a type of shared pointer to the MarketEvent object. | |
Public Types inherited from dxfcpp::EventTypeWithSymbol< std::string > | |
using | Ptr |
The alias to a type of shared pointer to the EventTypeWithSymbol's child object. | |
Public Types inherited from dxfcpp::EventType | |
using | Ptr = std::shared_ptr<EventType> |
The alias to a type of shared pointer to the EventType object. | |
Public Types inherited from dxfcpp::SharedEntity | |
using | Ptr = std::shared_ptr<SharedEntity> |
The alias to a type of shared pointer to the SharedEntity object. | |
Public Types inherited from dxfcpp::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 noexcept override |
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary). | |
Quote () noexcept=default | |
Creates new quote event with default values. | |
Quote (std::string eventSymbol) noexcept | |
Creates new quote event with the specified event symbol. | |
Quote & | withEventSymbol (const std::string &eventSymbol) noexcept |
Changes event's symbol and returns the current quote. | |
Quote::Ptr | withEventSymbolShared (const std::string &eventSymbol) noexcept |
Changes event's symbol and returns a shared pointer to the current quote. | |
Quote & | withEventTime (std::int64_t eventTime) noexcept |
Changes event's creation time and returns the current quote. | |
Quote::Ptr | withEventTimeShared (std::int64_t eventTime) noexcept |
Changes event's creation time and returns a shared pointer to the current quote. | |
std::int32_t | getSequence () const noexcept |
Returns sequence number of this quote to distinguish quotes that have the same time. | |
void | setSequence (std::int32_t sequence) noexcept |
Changes sequence number of this quote. | |
Quote & | withSequence (std::int32_t sequence) noexcept |
Changes sequence number of this quote and returns the current quote. | |
Quote::Ptr | withSequenceShared (std::int32_t sequence) noexcept |
Changes sequence number of this quote and returns a shared pointer to the current quote. | |
std::int64_t | getTime () const noexcept |
Returns time of the last bid or ask change. | |
std::int64_t | getTimeNanos () const noexcept |
Returns time of the last bid or ask change in nanoseconds. | |
std::int32_t | getTimeNanoPart () const noexcept |
Returns microseconds and nanoseconds part of time of the last bid or ask change. | |
void | setTimeNanoPart (std::int32_t timeNanoPart) noexcept |
Changes microseconds and nanoseconds part of time of the last bid or ask change. | |
Quote & | withTimeNanoPart (std::int32_t timeNanoPart) noexcept |
Changes microseconds and nanoseconds part of time of the last bid or ask change and returns the current quote. | |
Quote::Ptr | withTimeNanoPartShared (std::int32_t timeNanoPart) noexcept |
Changes microseconds and nanoseconds part of time of the last bid or ask change and returns a shared pointer to the current quote. | |
std::int64_t | getBidTime () const noexcept |
Returns time of the last bid change. | |
void | setBidTime (std::int64_t bidTime) noexcept |
Changes time of the last bid change. | |
Quote & | withBidTime (std::int64_t bidTime) noexcept |
Changes time of the last bid change and returns the current quote. | |
Quote::Ptr | withBidTimeShared (std::int64_t bidTime) noexcept |
Changes time of the last bid change and returns a shared pointer to the current quote. | |
std::int16_t | getBidExchangeCode () const noexcept |
Returns bid exchange code. | |
std::string | getBidExchangeCodeString () const noexcept |
Returns bid exchange code as UTF8 string. | |
void | setBidExchangeCode (char bidExchangeCode) noexcept |
Changes bid exchange code. | |
Quote & | withBidExchangeCode (char bidExchangeCode) noexcept |
Changes bid exchange code and returns the current quote. | |
Quote::Ptr | withBidExchangeCodeShared (char bidExchangeCode) noexcept |
Changes bid exchange code and returns a shared pointer to the current quote. | |
void | setBidExchangeCode (std::int16_t bidExchangeCode) noexcept |
Changes bid exchange code. | |
Quote & | withBidExchangeCode (std::int16_t bidExchangeCode) noexcept |
Changes bid exchange code and returns the current quote. | |
Quote::Ptr | withBidExchangeCodeShared (std::int16_t bidExchangeCode) noexcept |
Changes bid exchange code and returns a shared pointer to the current quote. | |
double | getBidPrice () const noexcept |
Returns bid price. | |
void | setBidPrice (double bidPrice) noexcept |
Changes bid price. | |
Quote & | withBidPrice (double bidPrice) noexcept |
Changes bid price and returns the current quote. | |
Quote::Ptr | withBidPriceShared (double bidPrice) noexcept |
Changes bid price and returns a shared pointer to the current quote. | |
double | getBidSize () const noexcept |
Returns bid size. | |
void | setBidSize (double bidSize) noexcept |
Changes bid size. | |
Quote & | withBidSize (double bidSize) noexcept |
Changes bid size and returns the current quote. | |
Quote::Ptr | withBidSizeShared (double bidSize) noexcept |
Changes bid size and returns a shared pointer to the current quote. | |
std::int64_t | getAskTime () const noexcept |
Returns time of the last ask change. | |
void | setAskTime (std::int64_t askTime) noexcept |
Changes time of the last ask change. | |
Quote & | withAskTime (std::int64_t askTime) noexcept |
Changes time of the last ask change and returns the current quote. | |
Quote::Ptr | withAskTimeShared (std::int64_t askTime) noexcept |
Changes time of the last ask change and returns a shared pointer to the current quote. | |
std::int16_t | getAskExchangeCode () const noexcept |
Returns ask exchange code. | |
std::string | getAskExchangeCodeString () const noexcept |
Returns ask exchange code as UTF8 string. | |
void | setAskExchangeCode (char askExchangeCode) noexcept |
Changes ask exchange code. | |
Quote & | withAskExchangeCode (char askExchangeCode) noexcept |
Changes ask exchange code and returns the current quote. | |
Quote::Ptr | withAskExchangeCodeShared (char askExchangeCode) noexcept |
Changes ask exchange code and returns a shared pointer to the current quote. | |
void | setAskExchangeCode (std::int16_t askExchangeCode) noexcept |
Changes ask exchange code. | |
Quote & | withAskExchangeCode (std::int16_t askExchangeCode) noexcept |
Changes ask exchange code and returns the current quote. | |
Quote::Ptr | withAskExchangeCodeShared (std::int16_t askExchangeCode) noexcept |
Changes ask exchange code and returns a shared pointer to the current quote. | |
double | getAskPrice () const |
Returns ask price. | |
void | setAskPrice (double askPrice) |
Changes ask price. | |
Quote & | withAskPrice (double askPrice) noexcept |
Changes ask price and returns the current quote. | |
Quote::Ptr | withAskPriceShared (double askPrice) noexcept |
Changes ask price and returns a shared pointer to the current quote. | |
double | getAskSize () const |
Returns ask size. | |
void | setAskSize (double askSize) |
Changes ask size. | |
Quote & | withAskSize (double askSize) noexcept |
Changes ask size and returns the current quote. | |
Quote::Ptr | withAskSizeShared (double askSize) noexcept |
Changes ask size and returns a shared pointer to the current quote. | |
std::string | toString () const noexcept override |
Returns a string representation of the current object. | |
Public Member Functions inherited from dxfcpp::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 dxfcpp::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 dxfcpp::Entity | |
virtual | ~Entity () noexcept=default |
The default virtual d-tor. | |
Static Public Member Functions | |
static void | freeGraal (void *graalNative) noexcept |
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary). | |
Static Public Attributes | |
static constexpr std::uint32_t | MAX_SEQUENCE = (1U << 22U) - 1U |
Maximum allowed sequence value. | |
static const EventTypeEnum & | TYPE = EventTypeEnum::QUOTE |
Type identifier and additional information about the current event class. | |
Additional Inherited Members | |
Protected Member Functions inherited from dxfcpp::MarketEvent | |
MarketEvent (std::string eventSymbol) noexcept | |
Protected constructor for concrete implementation classes that initializes eventSymbol property. | |
Quote event is a snapshot of the best bid and ask prices, and other fields that change with each quote.
It represents the most recent information that is available about the best quote on the market at any given moment of time.
Bid corresponds to the best (maximal price) order to buy, ask corresponds to the best (minimal price) order to sell.
|
inlineexplicitnoexcept |
Creates new quote event with the specified event symbol.
eventSymbol | The event symbol. |
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
graalNative | The pointer to the dxFeed Graal SDK structure. |
|
noexcept |
Returns ask exchange code.
|
noexcept |
Returns ask exchange code as UTF8 string.
|
inline |
Returns ask price.
|
inline |
Returns ask size.
|
inlinenoexcept |
Returns time of the last ask change.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
This time is always transmitted with seconds precision, so the result of this method is usually a multiple of 1000.
|
noexcept |
Returns bid exchange code.
|
noexcept |
Returns bid exchange code as UTF8 string.
|
inlinenoexcept |
Returns bid price.
|
inlinenoexcept |
Returns bid size.
|
inlinenoexcept |
Returns time of the last bid change.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
This time is always transmitted with seconds precision, so the result of this method is usually a multiple of 1000.
|
inlinenoexcept |
Returns sequence number of this quote to distinguish quotes 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 Quote::MAX_SEQUENCE.
|
inlinenoexcept |
Returns time of the last bid or ask change.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
|
inlinenoexcept |
Returns microseconds and nanoseconds part of time of the last bid or ask change.
|
inlinenoexcept |
Returns time of the last bid or ask change in nanoseconds.
Time is measured in nanoseconds between the current time and midnight, January 1, 1970 UTC.
Changes ask exchange code.
askExchangeCode | The ask exchange code. |
|
noexcept |
Changes ask exchange code.
askExchangeCode | The ask exchange code. |
Changes ask price.
askPrice | The ask price. |
Changes ask size.
askSize | The ask size. |
|
inlinenoexcept |
Changes time of the last ask change.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
You can set the actual millisecond-precision time here to publish event and the millisecond part will make the Quote::getTime() of this quote even precise up to a millisecond.
askTime | The time of the last ask change. |
Changes bid exchange code.
bidExchangeCode | The bid exchange code. |
|
noexcept |
Changes bid exchange code.
bidExchangeCode | bid exchange code. |
Changes bid price.
bidPrice | The bid price. |
Changes bid size.
bidSize | The bid size. |
|
inlinenoexcept |
Changes time of the last bid change.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
You can set the actual millisecond-precision time here to publish event and the millisecond part will make the Quote::getTime() of this quote even precise up to a millisecond.
bidTime | The time of the last bid change. |
|
inlinenoexcept |
Changes sequence number of this quote.
sequence | The sequence. |
|
inlinenoexcept |
Changes microseconds and nanoseconds part of time of the last bid or ask change.
This method changes Quote::getTimeNanos() result.
timeNanoPart | The microseconds and nanoseconds part of time of the last bid or ask change. |
|
overridevirtualnoexcept |
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 dxfcpp::EventType.
|
overridevirtualnoexcept |
Returns a string representation of the current object.
Reimplemented from dxfcpp::EventType.
Changes ask exchange code and returns the current quote.
askExchangeCode | The ask exchange code. |
|
inlinenoexcept |
Changes ask exchange code and returns the current quote.
askExchangeCode | The ask exchange code. |
|
inlinenoexcept |
Changes ask exchange code and returns a shared pointer to the current quote.
std::shared_ptr<Quote>(new Quote(...))
or std::make_shared<Quote>(...)
askExchangeCode | The ask exchange code. |
|
inlinenoexcept |
Changes ask exchange code and returns a shared pointer to the current quote.
std::shared_ptr<Quote>(new Quote(...))
or std::make_shared<Quote>(...)
askExchangeCode | The ask exchange code. |
Changes ask price and returns the current quote.
askPrice | The ask price. |
|
inlinenoexcept |
Changes ask size and returns the current quote.
askSize | The ask size. @retrun The current quote. |
|
inlinenoexcept |
|
inlinenoexcept |
Changes time of the last ask change and returns the current quote.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
You can set the actual millisecond-precision time here to publish event and the millisecond part will make the Quote::getTime() of this quote even precise up to a millisecond.
askTime | The time of the last ask change. |
|
inlinenoexcept |
Changes time of the last ask change and returns a shared pointer to the current quote.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
You can set the actual millisecond-precision time here to publish event and the millisecond part will make the Quote::getTime() of this quote even precise up to a millisecond.
std::shared_ptr<Quote>(new Quote(...))
or std::make_shared<Quote>(...)
askTime | The time of the last ask change. |
Changes bid exchange code and returns the current quote.
bidExchangeCode | The bid exchange code. |
|
inlinenoexcept |
Changes bid exchange code and returns the current quote.
bidExchangeCode | The bid exchange code. |
|
inlinenoexcept |
Changes bid exchange code and returns a shared pointer to the current quote.
std::shared_ptr<Quote>(new Quote(...))
or std::make_shared<Quote>(...)
bidExchangeCode | The bid exchange code. |
|
inlinenoexcept |
Changes bid exchange code and returns a shared pointer to the current quote.
std::shared_ptr<Quote>(new Quote(...))
or std::make_shared<Quote>(...)
bidExchangeCode | The bid exchange code. |
Changes bid price and returns the current quote.
bidPrice | The bid price. |
|
inlinenoexcept |
Changes bid size and returns the current quote.
bidSize | The bid size. @retrun The current quote. |
|
inlinenoexcept |
|
inlinenoexcept |
Changes time of the last bid change and returns the current quote.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
You can set the actual millisecond-precision time here to publish event and the millisecond part will make the Quote::getTime() of this quote even precise up to a millisecond.
bidTime | The time of the last bid change. |
|
inlinenoexcept |
Changes time of the last bid change and returns a shared pointer to the current quote.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
You can set the actual millisecond-precision time here to publish event and the millisecond part will make the Quote::getTime() of this quote even precise up to a millisecond.
std::shared_ptr<Quote>(new Quote(...))
or std::make_shared<Quote>(...)
bidTime | The time of the last bid change. |
Changes event's symbol and returns the current quote.
eventSymbol | The symbol of this event. |
|
inlinenoexcept |
Changes event's symbol and returns a shared pointer to the current quote.
std::shared_ptr<Quote>(new Quote(...))
or std::make_shared<Quote>(...)
eventSymbol | The symbol of this event. |
|
inlinenoexcept |
Changes event's creation time and returns the current quote.
eventTime | the difference, measured in milliseconds, between the event creation time and midnight, January 1, 1970 UTC. |
|
inlinenoexcept |
Changes event's creation time and returns a shared pointer to the current quote.
std::shared_ptr<Quote>(new Quote(...))
or std::make_shared<Quote>(...)
eventTime | the difference, measured in milliseconds, between the event creation time and midnight, January 1, 1970 UTC. |
|
inlinenoexcept |
Changes sequence number of this quote and returns the current quote.
sequence | The sequence. |
|
inlinenoexcept |
Changes sequence number of this quote and returns a shared pointer to the current quote.
std::shared_ptr<Quote>(new Quote(...))
or std::make_shared<Quote>(...)
sequence | The sequence. |
|
inlinenoexcept |
Changes microseconds and nanoseconds part of time of the last bid or ask change and returns the current quote.
This method changes Quote::getTimeNanos() result.
timeNanoPart | The microseconds and nanoseconds part of time of the last bid or ask change. |
|
inlinenoexcept |
Changes microseconds and nanoseconds part of time of the last bid or ask change and returns a shared pointer to the current quote.
This method changes Quote::getTimeNanos() result.
std::shared_ptr<Quote>(new Quote(...))
or std::make_shared<Quote>(...)
timeNanoPart | The microseconds and nanoseconds part of time of the last bid or ask change. |
Maximum allowed sequence value.