|
dxFeed Graal CXX API v9.0.0
|
Order imbalance event provides information about order book statistics during auctions. More...
#include <OrderImbalance.hpp>
Public Types | |
| using | Ptr = std::shared_ptr<OrderImbalance> |
| The alias to a type of shared pointer to the OrderImbalance object. | |
| using | Unique = std::unique_ptr<OrderImbalance> |
| The alias to a type of unique pointer to the OrderImbalance 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. | |
| 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 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. | |
| OrderImbalance () noexcept | |
| Creates new order imbalance event with default values. | |
| OrderImbalance (StringParam eventSymbol) | |
| Creates a new order imbalance event with the specified event symbol. | |
| OrderImbalance & | withEventSymbol (StringParam eventSymbol) |
| Changes an event's symbol and returns the current order imbalance. | |
| OrderImbalance & | withEventTime (std::int64_t eventTime) noexcept |
| Changes event's creation time and returns the current order imbalance. | |
| const OrderSource & | getSource () const & |
| Returns source of this event. | |
| void | setSource (const OrderSource &source) noexcept |
| Changes source of this event. | |
| OrderImbalance & | withSource (const OrderSource &source) noexcept |
| Changes source of this event. | |
| std::int64_t | getTimeSequence () const noexcept |
| Returns time and sequence of the order imbalance packaged into a single long value. | |
| void | setTimeSequence (std::int64_t timeSequence) noexcept |
| Changes time and sequence of the order imbalance. | |
| OrderImbalance & | withTimeSequence (std::int64_t timeSequence) noexcept |
| Changes time and sequence of the order imbalance. | |
| std::int64_t | getTime () const noexcept |
| Returns time of the order imbalance event. | |
| void | setTime (std::int64_t time) noexcept |
| Changes time of the order imbalance event. | |
| OrderImbalance & | withTime (std::int64_t time) noexcept |
| Changes time of the order imbalance event. | |
| std::int32_t | getSequence () const noexcept |
| Returns sequence number of this event to distinguish order imbalance events that have the same time. | |
| void | setSequence (std::int32_t sequence) |
| Changes sequence number of this event. | |
| OrderImbalance & | withSequence (std::int32_t sequence) |
| Changes sequence number of this event. | |
| double | getRefPrice () const noexcept |
| Returns the reference price. | |
| void | setRefPrice (double refPrice) noexcept |
| Changes the reference price. | |
| OrderImbalance & | withRefPrice (double refPrice) noexcept |
| Changes the reference price. | |
| double | getPairedSize () const noexcept |
| Returns the paired size. | |
| void | setPairedSize (double pairedSize) noexcept |
| Changes the paired size. | |
| OrderImbalance & | withPairedSize (double pairedSize) noexcept |
| Changes the paired size. | |
| double | getImbalanceSize () const noexcept |
| Returns the imbalance size. | |
| void | setImbalanceSize (double imbalanceSize) noexcept |
| Changes the imbalance size. | |
| OrderImbalance & | withImbalanceSize (double imbalanceSize) noexcept |
| Changes the imbalance size. | |
| double | getNearPrice () const noexcept |
| Returns the near price. | |
| void | setNearPrice (double nearPrice) noexcept |
| Changes the near price. | |
| OrderImbalance & | withNearPrice (double nearPrice) noexcept |
| Changes the near price. | |
| double | getFarPrice () const noexcept |
| Returns the far price. | |
| void | setFarPrice (double farPrice) noexcept |
| Changes the far price. | |
| OrderImbalance & | withFarPrice (double farPrice) noexcept |
| Changes the far price. | |
| const ImbalanceSide & | getImbalanceSide () const &noexcept |
| Returns the imbalance side. | |
| void | setImbalanceSide (const ImbalanceSide &side) noexcept |
| Changes the imbalance side. | |
| OrderImbalance & | withImbalanceSide (const ImbalanceSide &side) noexcept |
| Changes the imbalance side. | |
| const AuctionType & | getAuctionType () const &noexcept |
| Returns the auction type. | |
| void | setAuctionType (const AuctionType &type) noexcept |
| Changes the auction type. | |
| OrderImbalance & | withAuctionType (const AuctionType &type) noexcept |
| Changes the auction type. | |
| 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 (StringParam eventSymbol) 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 SharedEntity | |
| template<typename T> | |
| bool | is () const noexcept |
| Checks that the object is of type T: its dynamic type is T or derived from T. | |
| template<typename T> | |
| std::shared_ptr< T > | sharedAs () noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T or std::shared_ptr<T>{nullptr} if the object is not managed by std::shared_ptr. | |
| 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 or std::shared_ptr<T>{nullptr} if the object is not managed by std::shared_ptr. | |
| Public Member Functions inherited from Entity | |
| virtual | ~Entity () noexcept |
| 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 EventTypeEnum & | TYPE = EventTypeEnum::ORDER_IMBALANCE |
| 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 (StringParam eventSymbol) | |
| Protected constructor for concrete implementation classes that initializes eventSymbol property. | |
Order imbalance event provides information about order book statistics during auctions.
These events describe the imbalance between buy and sell orders for specific security, along with reference pricing information that reflects the current auction state. The event includes metrics such as paired size, imbalance shares, and hypothetical pricing scenarios.
OrderImbalance event has the following properties:
This event is implemented on top of QDS records OrderImbalance#<source-id>, where <source-id> is up to 4 ASCII characters with a mnemonic for the source like "NUAM".
|
explicit |
Creates a new order imbalance event with the specified event symbol.
| eventSymbol | The event symbol. |
|
overridevirtual |
Replaces the contents of the event.
| event | the event to use as a source. |
Reimplemented from MarketEvent.
References MarketEvent::assign().
|
static |
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
| graalNative | The pointer to the dxFeed Graal SDK structure. |
| InvalidArgumentException |
|
static |
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
| graalNative | The pointer to the dxFeed Graal SDK structure. |
| InvalidArgumentException |
|
noexcept |
Returns the auction type.
|
noexcept |
Returns the far price.
The far price is a hypothetical price at which only auction interest (all auction orders) on the book could trade if the closure happened now. Far price is usually further from the reference price than the near price.
|
noexcept |
Returns the imbalance side.
|
noexcept |
Returns the imbalance size.
The imbalance size is the number of shares that are not matched at the reference price.
|
noexcept |
Returns the near price.
The near price is a hypothetical price at which all interest (all orders) on the book could trade if the closure happened now, including auction and imbalance offset interest.
|
noexcept |
Returns the paired size.
The paired size is the total number of shares that are eligible to be matched at the reference price.
|
noexcept |
Returns the reference price.
The reference price is the price for which the number of paired shares and number of imbalance shares are calculated. Usually, this is the consolidated last sale price before the auction or imbalance event started.
|
noexcept |
Returns sequence number of this event to distinguish order imbalance 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.
| const OrderSource & OrderImbalance::getSource | ( | ) | const & |
Returns source of this event.
|
noexcept |
Returns time of the order imbalance event.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
|
noexcept |
Returns time and sequence of the order imbalance packaged into a single long value.
|
noexcept |
Changes the auction type.
| type | the auction type. |
|
noexcept |
Changes the far price.
| farPrice | the far price. |
|
noexcept |
Changes the imbalance side.
| side | the imbalance side. |
|
noexcept |
Changes the imbalance size.
| imbalanceSize | the imbalance size. |
|
noexcept |
Changes the near price.
| nearPrice | the near price. |
|
noexcept |
Changes the paired size.
| pairedSize | the paired size. |
|
noexcept |
Changes the reference price.
| refPrice | the reference price. |
| void OrderImbalance::setSequence | ( | std::int32_t | sequence | ) |
Changes sequence number of this event.
| sequence | the sequence. |
| InvalidArgumentException | if the sequence is below zero or above ::MAX_SEQUENCE. |
|
noexcept |
|
noexcept |
Changes time of the order imbalance event.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
| time | time of the order imbalance event. |
|
noexcept |
|
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.
|
overridevirtual |
Returns a string representation of the current object.
Reimplemented from EventType.
|
noexcept |
Changes the auction type.
Returns the current order imbalance.
| type | the auction type. |
| OrderImbalance & OrderImbalance::withEventSymbol | ( | StringParam | eventSymbol | ) |
Changes an event's symbol and returns the current order imbalance.
| eventSymbol | The symbol of this event. |
|
noexcept |
Changes event's creation time and returns the current order imbalance.
| eventTime | the difference, measured in milliseconds, between the event creation time and midnight, January 1, 1970 UTC. |
|
noexcept |
Changes the far price.
Returns the current order imbalance.
| farPrice | the far price. |
|
noexcept |
Changes the imbalance side.
Returns the current order imbalance.
| side | the imbalance side. |
|
noexcept |
Changes the imbalance size.
Returns the current order imbalance.
| imbalanceSize | the imbalance size. |
|
noexcept |
Changes the near price.
Returns the current order imbalance.
| nearPrice | the near price. |
|
noexcept |
Changes the paired size.
Returns the current order imbalance.
| pairedSize | the paired size. |
|
noexcept |
Changes the reference price.
Returns the current order imbalance.
| refPrice | the reference price. |
| OrderImbalance & OrderImbalance::withSequence | ( | std::int32_t | sequence | ) |
Changes sequence number of this event.
Returns the current order imbalance.
| sequence | the sequence. |
| InvalidArgumentException | if the sequence is below zero or above ::MAX_SEQUENCE. |
|
noexcept |
Changes source of this event.
Returns the current order imbalance.
| source | source of this event. |
References setSource().
|
noexcept |
Changes time of the order imbalance event.
Returns the current order imbalance.
| time | time of the order imbalance event. |
|
noexcept |
Changes time and sequence of the order imbalance.
Returns the current order imbalance.
| timeSequence | the time and sequence. |
|
staticconstexpr |
Maximum allowed sequence value.