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 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). | |
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 & | withEventTime (std::int64_t eventTime) noexcept |
Changes event's creation time and returns 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) |
Changes sequence number of this quote. | |
Quote & | withSequence (std::int32_t sequence) noexcept |
Changes sequence number of this quote and returns 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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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::QUOTE |
Type identifier and additional information about the current event class. | |
static constexpr std::uint32_t | MAX_SEQUENCE = (1U << 22U) - 1U |
Maximum allowed sequence value. | |
Additional Inherited Members | |
Protected Member Functions inherited from 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. |
|
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 |
|
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.
References 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.
Referenced by getTimeNanos().
|
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.
References getTime().
|
noexcept |
Changes ask exchange code.
askExchangeCode | The ask exchange code. |
Referenced by withAskExchangeCode().
|
noexcept |
Changes ask exchange code.
askExchangeCode | The ask exchange code. |
Referenced by withAskExchangeCode().
|
inline |
|
inline |
|
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. |
Referenced by withAskTime().
|
noexcept |
Changes bid exchange code.
bidExchangeCode | The bid exchange code. |
Referenced by withBidExchangeCode().
|
noexcept |
Changes bid exchange code.
bidExchangeCode | bid exchange code. |
Referenced by withBidExchangeCode().
|
inlinenoexcept |
|
inlinenoexcept |
|
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. |
Referenced by withBidTime().
|
inline |
Changes sequence number of this quote.
sequence | The sequence. |
References MAX_SEQUENCE.
Referenced by withSequence().
|
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. |
Referenced by withTimeNanoPart().
|
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 ask exchange code and returns the current quote.
askExchangeCode | The ask exchange code. |
References setAskExchangeCode().
|
inlinenoexcept |
Changes ask exchange code and returns the current quote.
askExchangeCode | The ask exchange code. |
References setAskExchangeCode().
|
inlinenoexcept |
Changes ask price and returns the current quote.
askPrice | The ask price. |
References setAskPrice().
|
inlinenoexcept |
Changes ask size and returns the current quote.
askSize | The ask size. |
References setAskSize().
|
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. |
References setAskTime().
|
inlinenoexcept |
Changes bid exchange code and returns the current quote.
bidExchangeCode | The bid exchange code. |
References setBidExchangeCode().
|
inlinenoexcept |
Changes bid exchange code and returns the current quote.
bidExchangeCode | The bid exchange code. |
References setBidExchangeCode().
|
inlinenoexcept |
Changes bid price and returns the current quote.
bidPrice | The bid price. |
References setBidPrice().
|
inlinenoexcept |
Changes bid size and returns the current quote.
bidSize | The bid size. |
References setBidSize().
|
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. |
References setBidTime().
|
inlinenoexcept |
Changes event's symbol and returns the current quote.
eventSymbol | The symbol of this event. |
References MarketEvent::setEventSymbol().
|
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. |
References MarketEvent::setEventTime().
|
inlinenoexcept |
Changes sequence number of this quote and returns the current quote.
sequence | The sequence. |
References setSequence().
|
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. |
References setTimeNanoPart().
|
staticconstexpr |
Maximum allowed sequence value.
Referenced by getSequence(), and setSequence().