dxFeed Graal CXX API
Loading...
Searching...
No Matches
dxfcpp::SpreadOrder Class Reference

Spread order event is a snapshot for a full available market depth for all spreads on a given underlying symbol. More...

#include <SpreadOrder.hpp>

+ Inheritance diagram for dxfcpp::SpreadOrder:

Public Types

using Ptr = std::shared_ptr<SpreadOrder>
 The alias to a type of shared pointer to the SpreadOrder object.
 
using Unique = std::unique_ptr<SpreadOrder>
 The alias to a type of unique pointer to the SpreadOrder 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::IndexedEvent
using Ptr = std::shared_ptr<IndexedEvent>
 The alias to a type of shared pointer to the IndexedEvent object.
 

Public Member Functions

voidtoGraal () const noexcept override
 Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
 
 SpreadOrder () noexcept=default
 Creates new spread order event with default values.
 
 SpreadOrder (std::string eventSymbol) noexcept
 Creates new spread order event with the specified event symbol.
 
SpreadOrderwithEventSymbol (const std::string &eventSymbol) noexcept
 Changes event's symbol and returns the current spread order.
 
SpreadOrder::Ptr withEventSymbolShared (const std::string &eventSymbol) noexcept
 Changes event's symbol and returns a shared pointer to the current spread order.
 
SpreadOrderwithEventTime (std::int64_t eventTime) noexcept
 Changes event's creation time and returns the current spread order.
 
SpreadOrder::Ptr withEventTimeShared (std::int64_t eventTime) noexcept
 Changes event's creation time and returns a shared pointer to the current spread order.
 
SpreadOrderwithSource (const OrderSource &source) noexcept
 Changes event's source and returns the current spread order.
 
SpreadOrder::Ptr withSourceShared (const OrderSource &source) noexcept
 Changes event's source and returns a shared pointer to the current spread order.
 
SpreadOrderwithEventFlags (std::int32_t eventFlags) noexcept
 Changes transactional event flags and returns the current spread order.
 
SpreadOrder::Ptr withEventFlagsShared (std::int32_t eventFlags) noexcept
 Changes transactional event flags and returns a shared pointer to the current spread order.
 
SpreadOrderwithEventFlags (const EventFlagsMask &eventFlags) noexcept
 Changes transactional event flags and returns the current spread order.
 
SpreadOrder::Ptr withEventFlagsShared (const EventFlagsMask &eventFlags) noexcept
 Changes transactional event flags and returns a shared pointer to the current spread order.
 
SpreadOrderwithIndex (std::int64_t index) noexcept
 Changes unique per-symbol index of this spread order and returns it.
 
SpreadOrder::Ptr withIndexShared (std::int64_t index) noexcept
 Changes unique per-symbol index of this spread order and returns a shared pointer to it.
 
SpreadOrderwithTime (std::int64_t time) noexcept
 Changes time of this spread order and returns it.
 
SpreadOrder::Ptr withTimeShared (std::int64_t time) noexcept
 Changes time of this spread order and returns a shared pointer to it.
 
SpreadOrderwithTimeNanoPart (std::int32_t timeNanoPart) noexcept
 Changes microseconds and nanoseconds time part of this spread order.
 
SpreadOrder::Ptr withTimeNanoPartShared (std::int32_t timeNanoPart) noexcept
 Changes microseconds and nanoseconds time part of this spread order.
 
SpreadOrderwithSequence (std::int32_t sequence) noexcept
 Changes sequence number of this spread order.
 
SpreadOrder::Ptr withSequenceShared (std::int32_t sequence) noexcept
 Changes sequence number of this spread order.
 
SpreadOrderwithTimeNanos (std::int64_t timeNanos) noexcept
 Changes time of this spread order and returns it.
 
SpreadOrder::Ptr withTimeNanosShared (std::int64_t timeNanos) noexcept
 Changes time of this spread order.
 
SpreadOrderwithAction (const OrderAction &action) noexcept
 Changes action of this spread order and returns it.
 
SpreadOrder::Ptr withActionShared (const OrderAction &action) noexcept
 Changes action of this spread order.
 
SpreadOrderwithActionTime (std::int64_t actionTime) noexcept
 Changes time of the last action and returns current spread order.
 
SpreadOrder::Ptr withActionTimeShared (std::int64_t actionTime) noexcept
 Changes time of the last action and returns a shared pointer to the current spread order.
 
SpreadOrderwithOrderId (std::int64_t orderId) noexcept
 Changes order ID.
 
SpreadOrder::Ptr withOrderIdShared (std::int64_t orderId) noexcept
 Changes spread order ID.
 
SpreadOrderwithAuxOrderId (std::int64_t auxOrderId) noexcept
 Changes auxiliary spread order ID.
 
SpreadOrder::Ptr withAuxOrderIdShared (std::int64_t auxOrderId) noexcept
 Changes auxiliary spread order ID.
 
SpreadOrderwithPrice (double price) noexcept
 Changes price of this spread order.
 
SpreadOrder::Ptr withPriceShared (double price) noexcept
 Changes price of this spread order.
 
SpreadOrderwithSize (double size) noexcept
 Changes size of this spread order.
 
SpreadOrder::Ptr withSizeShared (double size) noexcept
 Changes size of this spread order.
 
SpreadOrderwithExecutedSize (double executedSize) noexcept
 Changes executed size of this spread order.
 
SpreadOrder::Ptr withExecutedSizeShared (double executedSize) noexcept
 Changes executed size of this spread order.
 
SpreadOrderwithCount (std::int64_t count) noexcept
 Changes number of individual spread orders in this aggregate spread order.
 
SpreadOrder::Ptr withCountShared (std::int64_t count) noexcept
 Changes number of individual spread orders in this aggregate spread order.
 
SpreadOrderwithTradeId (std::int64_t tradeId) noexcept
 Changes trade ID.
 
SpreadOrder::Ptr withTradeShared (std::int64_t tradeId) noexcept
 Changes trade ID.
 
SpreadOrderwithTradePrice (double tradePrice) noexcept
 Changes trade price.
 
SpreadOrder::Ptr withTradePriceShared (double tradePrice) noexcept
 Changes trade price.
 
SpreadOrderwithTradeSize (double tradeSize) noexcept
 Changes trade size.
 
SpreadOrder::Ptr withTradeSizeShared (double tradeSize) noexcept
 Changes trade size.
 
SpreadOrderwithExchangeCode (char exchangeCode) noexcept
 Changes exchange code of this spread order.
 
SpreadOrder::Ptr withExchangeCodeShared (char exchangeCode) noexcept
 Changes exchange code of this spread order.
 
SpreadOrderwithExchangeCode (std::int16_t exchangeCode) noexcept
 Changes exchange code of this spread order.
 
SpreadOrder::Ptr withExchangeCodeShared (std::int16_t exchangeCode) noexcept
 Changes exchange code of this spread order.
 
SpreadOrderwithOrderSide (const Side &side) noexcept
 Changes side of this spread order.
 
SpreadOrder::Ptr withOrderSideShared (const Side &side) noexcept
 Changes side of this spread order.
 
SpreadOrderwithScope (const Scope &scope) noexcept
 Changes scope of this spread order.
 
SpreadOrder::Ptr withScopeShared (const Scope &scope) noexcept
 Changes scope of this spread order.
 
const std::string & getSpreadSymbol () const &noexcept
 Returns spread symbol of this event.
 
const std::optional< std::string > & getSpreadSymbolOpt () const &noexcept
 Returns spread symbol of this event.
 
void setSpreadSymbol (std::string spreadSymbol) noexcept
 Changes spread symbol of this event.
 
SpreadOrderwithSpreadSymbol (std::string spreadSymbol) noexcept
 Changes spread symbol of this event.
 
SpreadOrder::Ptr withSpreadSymbolShared (std::string spreadSymbol) noexcept
 Changes spread symbol of this event.
 
std::string toString () const noexcept override
 Returns a string representation of the current object.
 
- Public Member Functions inherited from dxfcpp::OrderBase
 OrderBase () noexcept=default
 Creates new order event with default values.
 
 OrderBase (std::string eventSymbol) noexcept
 Creates new order event with the specified event symbol.
 
const OrderSourcegetSource () const &noexcept override
 Returns source of this event.
 
void setSource (const OrderSource &source) noexcept
 Changes 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.
 
void setIndex (std::int64_t index) noexcept override
 Changes unique per-symbol index of this order.
 
std::int64_t getIndex () const noexcept override
 Returns unique per-symbol index of this order.
 
std::int64_t getTimeSequence () const noexcept
 Returns time and sequence of this order packaged into single long value.
 
void setTimeSequence (std::int64_t timeSequence) noexcept
 Changes time and sequence of this order.
 
std::int64_t getTime () const noexcept
 Returns time of this order.
 
void setTime (std::int64_t time) noexcept
 Changes time of this order.
 
void setTimeNanoPart (std::int32_t timeNanoPart) noexcept
 Changes microseconds and nanoseconds time part of this order.
 
std::int32_t getTimeNanoPart () const noexcept
 Returns microseconds and nanoseconds time part of this order.
 
std::int32_t getSequence () const noexcept
 Returns sequence number of this order to distinguish orders that have the same time.
 
void setSequence (std::int32_t sequence) noexcept
 Changes sequence number of this order.
 
std::int64_t getTimeNanos () const noexcept
 Returns time of this order in nanoseconds.
 
void setTimeNanos (std::int64_t timeNanos) noexcept
 Changes time of this order.
 
const OrderActiongetAction () const &noexcept
 Returns order action if available, otherwise - OrderAction::UNDEFINED.
 
void setAction (const OrderAction &action) noexcept
 Changes action of this order.
 
std::int64_t getActionTime () const noexcept
 Returns time of the last action.
 
void setActionTime (std::int64_t actionTime) noexcept
 Changes time of the last action.
 
std::int64_t getOrderId () const noexcept
 Returns order ID if available.
 
void setOrderId (std::int64_t orderId) noexcept
 Changes order ID.
 
std::int64_t getAuxOrderId () const noexcept
 Returns auxiliary order ID if available:
 
void setAuxOrderId (std::int64_t auxOrderId) noexcept
 Changes auxiliary order ID.
 
double getPrice () const noexcept
 Returns price of this order.
 
void setPrice (double price) noexcept
 Changes price of this order.
 
double getSize () const noexcept
 Returns size of this order.
 
void setSize (double size) noexcept
 Changes size of this order.
 
bool hasSize () const noexcept
 Returns true if this order has some size (sizeAsDouble is neither 0 nor NaN).
 
double getExecutedSize () const noexcept
 Returns executed size of this order.
 
void setExecutedSize (double executedSize) noexcept
 Changes executed size of this order.
 
std::int64_t getCount () const noexcept
 Returns number of individual orders in this aggregate order.
 
void setCount (std::int64_t count) noexcept
 Changes number of individual orders in this aggregate order.
 
std::int64_t getTradeId () const noexcept
 Returns trade (order execution) ID for events containing trade-related action.
 
void setTradeId (std::int64_t tradeId) noexcept
 Changes trade ID.
 
double getTradePrice () const noexcept
 Returns trade price for events containing trade-related action.
 
void setTradePrice (double tradePrice) noexcept
 Changes trade price.
 
double getTradeSize () const noexcept
 Returns trade size for events containing trade-related action.
 
void setTradeSize (double tradeSize) noexcept
 Changes trade size.
 
std::int16_t getExchangeCode () const noexcept
 Returns exchange code of this order.
 
std::string getExchangeCodeString () const noexcept
 Returns exchange code of this order as UTF8 string.
 
void setExchangeCode (char exchangeCode) noexcept
 Changes exchange code of this order.
 
void setExchangeCode (std::int16_t exchangeCode) noexcept
 Changes exchange code of this order.
 
const SidegetOrderSide () const &noexcept
 Returns side of this order.
 
void setOrderSide (const Side &side) noexcept
 Changes side of this order.
 
const ScopegetScope () const &noexcept
 Returns scope of this order.
 
void setScope (const Scope &scope) noexcept
 Changes scope of this order.
 
std::string baseFieldsToString () const noexcept
 Returns string representation of this order event's fields.
 
- 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 const EventTypeEnumTYPE = EventTypeEnum::SPREAD_ORDER
 Type identifier and additional information about the current event class.
 
- Static Public Attributes inherited from dxfcpp::OrderBase
static constexpr std::uint32_t MAX_SEQUENCE = (1U << 22U) - 1U
 Maximum allowed sequence value.
 
- Static Public Attributes inherited from dxfcpp::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 dxfcpp::MarketEvent
 MarketEvent (std::string eventSymbol) noexcept
 Protected constructor for concrete implementation classes that initializes eventSymbol property.
 

Detailed Description

Spread order event is a snapshot for a full available market depth for all spreads on a given underlying symbol.

The collection of spread order events of a symbol represents the most recent information that is available about spread orders on the market at any given moment of time.

Spread order is similar to a regular Order, but it has a spreadSymbol property that contains the symbol of the actual spread that is being represented by spread order object. eventSymbol property contains the underlying symbol that was used in subscription.

Like regular orders, spread order events arrive from multiple sources for the same market symbol and are distinguished by their index. It is unique across all the sources of depth information for the symbol. The event with size either 0 or NaN is a signal to remove previously received order for the corresponding index. The method hasSize is a convenient method to test for size presence.

Event flags, transactions and snapshots

Some spread order event sources provide a consistent view of the price-level or detailed order book. Their updates may incorporate multiple changes to price levels or to individual orders that have to be processed at the same time. The corresponding information is carried in eventFlags property.

See Event Flags section of OrderBase class documentation for details.

IndexedEventModel class handles all the snapshot and transaction logic and conveniently represents a list current of events. It relies on the code of AbstractIndexedEventModel to handle this logic. Use the source code of AbstractIndexedEventModel for clarification on transactions and snapshot logic.

Publishing order books

When publishing an order event with DXPublisher::publishEvents() method, least significant 32 bits of order index must be in a range of from 0 to std::numeric_limits<std::int32_t>::max() inclusive. Use setSource method after setIndex to properly include source identifier into the index.

A snapshot has to be published in the descending order of index, starting with an event with the largest index and marking it with SpreadOrder::SNAPSHOT_BEGIN bit in eventFlags, and finishing the snapshot with an event that has zero 32 least significant bits of index. SpreadOrder::SNAPSHOT_END bit in eventFlags is optional during publishing. It will be properly set on receiving end anyway.

Limitations

This event type cannot be used with DXFeed::getLastEvent() method.

Full Order Book Support

Some feeds provide support for "Full Order Book" (FOB) where additional fields will be available:

Implementation details

This event is implemented on top of QDS records SpreadOrder#<source-id>, where <source-id> is up to 4 ASCII characters with a mnemonic for the source like "ISE".

Constructor & Destructor Documentation

◆ SpreadOrder()

dxfcpp::SpreadOrder::SpreadOrder ( std::string eventSymbol)
inlineexplicitnoexcept

Creates new spread order event with the specified event symbol.

Parameters
eventSymbolThe event symbol.

Member Function Documentation

◆ freeGraal()

void dxfcpp::SpreadOrder::freeGraal ( void * graalNative)
staticnoexcept

Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).

Parameters
graalNativeThe pointer to the dxFeed Graal SDK structure.

◆ getSpreadSymbol()

const std::string & dxfcpp::SpreadOrder::getSpreadSymbol ( ) const &
inlinenoexcept

Returns spread symbol of this event.

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

◆ getSpreadSymbolOpt()

const std::optional< std::string > & dxfcpp::SpreadOrder::getSpreadSymbolOpt ( ) const &
inlinenoexcept

Returns spread symbol of this event.

Returns
spread symbol of this event or std::nullopt

◆ setSpreadSymbol()

void dxfcpp::SpreadOrder::setSpreadSymbol ( std::string spreadSymbol)
inlinenoexcept

Changes spread symbol of this event.

Parameters
spreadSymbolspread symbol of this event.

◆ toGraal()

void * dxfcpp::SpreadOrder::toGraal ( ) const
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.

Returns
The pointer to the filled dxFeed Graal SDK structure

Implements dxfcpp::EventType.

◆ toString()

std::string dxfcpp::SpreadOrder::toString ( ) const
overridevirtualnoexcept

Returns a string representation of the current object.

Returns
a string representation

Reimplemented from dxfcpp::EventType.

◆ withAction()

SpreadOrder & dxfcpp::SpreadOrder::withAction ( const OrderAction & action)
inlinenoexcept

Changes action of this spread order and returns it.

Parameters
actionThe side of this spread order.
Returns
The current spread order.

◆ withActionShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withActionShared ( const OrderAction & action)
inlinenoexcept

Changes action of this spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
actionThe action of this spread order.
Returns
A shared pointer to the current spread order.

◆ withActionTime()

SpreadOrder & dxfcpp::SpreadOrder::withActionTime ( std::int64_t actionTime)
inlinenoexcept

Changes time of the last action and returns current spread order.

Parameters
actionTimeThe last spread order action time.
Returns
The current spread order.

◆ withActionTimeShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withActionTimeShared ( std::int64_t actionTime)
inlinenoexcept

Changes time of the last action and returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
actionTimeThe last spread order action time.
Returns
A shared pointer to the current spread order.

◆ withAuxOrderId()

SpreadOrder & dxfcpp::SpreadOrder::withAuxOrderId ( std::int64_t auxOrderId)
inlinenoexcept

Changes auxiliary spread order ID.

Returns the current spread order.

Parameters
auxOrderIdThe auxiliary spread order ID.
Returns
The current spread order.

◆ withAuxOrderIdShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withAuxOrderIdShared ( std::int64_t auxOrderId)
inlinenoexcept

Changes auxiliary spread order ID.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
auxOrderIdThe auxiliary spread order ID.
Returns
A shared pointer to the current spread order.

◆ withCount()

SpreadOrder & dxfcpp::SpreadOrder::withCount ( std::int64_t count)
inlinenoexcept

Changes number of individual spread orders in this aggregate spread order.

Returns the current spread order.

Parameters
countThe number of individual orders in this aggregate spread order.
Returns
The current spread order.

◆ withCountShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withCountShared ( std::int64_t count)
inlinenoexcept

Changes number of individual spread orders in this aggregate spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
countThe number of individual spread orders in this aggregate spread spread order.
Returns
A shared pointer to the current spread order.

◆ withEventFlags() [1/2]

SpreadOrder & dxfcpp::SpreadOrder::withEventFlags ( const EventFlagsMask & eventFlags)
inlinenoexcept

Changes transactional event flags and returns the current spread order.

See EventFlag "Event Flags" section.

Parameters
eventFlagsThe transactional event flags' mask.
Returns
The current spread order.

◆ withEventFlags() [2/2]

SpreadOrder & dxfcpp::SpreadOrder::withEventFlags ( std::int32_t eventFlags)
inlinenoexcept

Changes transactional event flags and returns the current spread order.

See EventFlag "Event Flags" section.

Parameters
eventFlagsThe transactional event flags.
Returns
The current spread order.

◆ withEventFlagsShared() [1/2]

SpreadOrder::Ptr dxfcpp::SpreadOrder::withEventFlagsShared ( const EventFlagsMask & eventFlags)
inlinenoexcept

Changes transactional event flags and returns a shared pointer to the current spread order.

See EventFlag "Event Flags" section.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
eventFlagsThe transactional event flags' mask.
Returns
A shared pointer to the current spread order.

◆ withEventFlagsShared() [2/2]

SpreadOrder::Ptr dxfcpp::SpreadOrder::withEventFlagsShared ( std::int32_t eventFlags)
inlinenoexcept

Changes transactional event flags and returns a shared pointer to the current spread order.

See EventFlag "Event Flags" section.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
eventFlagsThe transactional event flags.
Returns
A shared pointer to the current spread order.

◆ withEventSymbol()

SpreadOrder & dxfcpp::SpreadOrder::withEventSymbol ( const std::string & eventSymbol)
inlinenoexcept

Changes event's symbol and returns the current spread order.

Parameters
eventSymbolThe symbol of this event.
Returns
The current spread order.

◆ withEventSymbolShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withEventSymbolShared ( const std::string & eventSymbol)
inlinenoexcept

Changes event's symbol and returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
eventSymbolThe symbol of this event.
Returns
A shared pointer to the current spread order.

◆ withEventTime()

SpreadOrder & dxfcpp::SpreadOrder::withEventTime ( std::int64_t eventTime)
inlinenoexcept

Changes event's creation time and returns the current spread order.

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

◆ withEventTimeShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withEventTimeShared ( std::int64_t eventTime)
inlinenoexcept

Changes event's creation time and returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
eventTimeThe difference, measured in milliseconds, between the event creation time and midnight, January 1, 1970 UTC.
Returns
A shared pointer to the current spread order.

◆ withExchangeCode() [1/2]

SpreadOrder & dxfcpp::SpreadOrder::withExchangeCode ( char exchangeCode)
inlinenoexcept

Changes exchange code of this spread order.

Returns the current spread order.

Parameters
exchangeCodeThe exchange code of this spread order.
Returns
The current spread order.

◆ withExchangeCode() [2/2]

SpreadOrder & dxfcpp::SpreadOrder::withExchangeCode ( std::int16_t exchangeCode)
inlinenoexcept

Changes exchange code of this spread order.

Returns the current spread order.

Parameters
exchangeCodeThe exchange code of this spread order.
Returns
The current spread order.

◆ withExchangeCodeShared() [1/2]

SpreadOrder::Ptr dxfcpp::SpreadOrder::withExchangeCodeShared ( char exchangeCode)
inlinenoexcept

Changes exchange code of this spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
exchangeCodeThe exchange code of this spread order.
Returns
A shared pointer to the current spread order.

◆ withExchangeCodeShared() [2/2]

SpreadOrder::Ptr dxfcpp::SpreadOrder::withExchangeCodeShared ( std::int16_t exchangeCode)
inlinenoexcept

Changes exchange code of this spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
exchangeCodeThe exchange code of this spread order.
Returns
A shared pointer to the current spread order.

◆ withExecutedSize()

SpreadOrder & dxfcpp::SpreadOrder::withExecutedSize ( double executedSize)
inlinenoexcept

Changes executed size of this spread order.

Returns the current spread order.

Parameters
executedSizeThe executed size of this spread order.
Returns
The current spread order.

◆ withExecutedSizeShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withExecutedSizeShared ( double executedSize)
inlinenoexcept

Changes executed size of this spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
executedSizeThe executed size of this spread order.
Returns
A shared pointer to the current spread order.

◆ withIndex()

SpreadOrder & dxfcpp::SpreadOrder::withIndex ( std::int64_t index)
inlinenoexcept

Changes unique per-symbol index of this spread order and returns it.

Note, that this method also changes source, whose id occupies highest bits of index. Use OrderBase::setSource() after invocation of this method to set the desired value of source.

Parameters
indexThe unique per-symbol index of this spread order.
Returns
The current spread order.

◆ withIndexShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withIndexShared ( std::int64_t index)
inlinenoexcept

Changes unique per-symbol index of this spread order and returns a shared pointer to it.

Note, that this method also changes source, whose id occupies highest bits of index. Use OrderBase::setSource() after invocation of this method to set the desired value of source.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
indexThe unique per-symbol index of this order.
Returns
A shared pointer to the current spread order.

◆ withOrderId()

SpreadOrder & dxfcpp::SpreadOrder::withOrderId ( std::int64_t orderId)
inlinenoexcept

Changes order ID.

Returns the current spread order.

Parameters
orderIdThe spread order ID.
Returns
The current spread order.

◆ withOrderIdShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withOrderIdShared ( std::int64_t orderId)
inlinenoexcept

Changes spread order ID.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
orderIdThe spread order ID.
Returns
A shared pointer to the current spread order.

◆ withOrderSide()

SpreadOrder & dxfcpp::SpreadOrder::withOrderSide ( const Side & side)
inlinenoexcept

Changes side of this spread order.

Returns the current spread order.

Parameters
sideThe side of this spread order.
Returns
The current spread order.

◆ withOrderSideShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withOrderSideShared ( const Side & side)
inlinenoexcept

Changes side of this spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
sideThe side of this spread order.
Returns
A shared pointer to the current spread order.

◆ withPrice()

SpreadOrder & dxfcpp::SpreadOrder::withPrice ( double price)
inlinenoexcept

Changes price of this spread order.

Returns the current spread order.

Parameters
priceThe price of this spread order.
Returns
The current spread order.

◆ withPriceShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withPriceShared ( double price)
inlinenoexcept

Changes price of this spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
priceThe price of this spread order.
Returns
A shared pointer to the current spread order.

◆ withScope()

SpreadOrder & dxfcpp::SpreadOrder::withScope ( const Scope & scope)
inlinenoexcept

Changes scope of this spread order.

Returns the current spread order.

Parameters
scopeThe scope of this spread order.
Returns
The current spread order.

◆ withScopeShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withScopeShared ( const Scope & scope)
inlinenoexcept

Changes scope of this spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
scopeThe scope of this spread order.
Returns
A shared pointer to the current spread order.

◆ withSequence()

SpreadOrder & dxfcpp::SpreadOrder::withSequence ( std::int32_t sequence)
inlinenoexcept

Changes sequence number of this spread order.

Returns the current spread order.

Parameters
sequenceThe sequence.
Returns
The current spread order.
See also
OrderBase::getSequence()

◆ withSequenceShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withSequenceShared ( std::int32_t sequence)
inlinenoexcept

Changes sequence number of this spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
sequenceThe sequence.
Returns
A shared pointer to the current spread order.
See also
OrderBase::getSequence()

◆ withSize()

SpreadOrder & dxfcpp::SpreadOrder::withSize ( double size)
inlinenoexcept

Changes size of this spread order.

Returns the current spread order.

Parameters
sizeThe size of this spread order.
Returns
The current spread order.

◆ withSizeShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withSizeShared ( double size)
inlinenoexcept

Changes size of this spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
sizeThe size of this spread order.
Returns
A shared pointer to the current spread order.

◆ withSource()

SpreadOrder & dxfcpp::SpreadOrder::withSource ( const OrderSource & source)
inlinenoexcept

Changes event's source and returns the current spread order.

This method changes highest bits of the index of this event.

Parameters
sourceThe source of this event.
Returns
The current spread order.

◆ withSourceShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withSourceShared ( const OrderSource & source)
inlinenoexcept

Changes event's source and returns a shared pointer to the current spread order.

This method changes highest bits of the index of this event.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
sourceThe source of this event.
Returns
A shared pointer to the current spread order.

◆ withSpreadSymbol()

SpreadOrder & dxfcpp::SpreadOrder::withSpreadSymbol ( std::string spreadSymbol)
inlinenoexcept

Changes spread symbol of this event.

Returns the current spread order.

Parameters
spreadSymbolspread symbol of this event.
Returns
The current spread order.

◆ withSpreadSymbolShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withSpreadSymbolShared ( std::string spreadSymbol)
inlinenoexcept

Changes spread symbol of this event.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
spreadSymbolspread symbol of this event.
Returns
A shared pointer to the current spread order.

◆ withTime()

SpreadOrder & dxfcpp::SpreadOrder::withTime ( std::int64_t time)
inlinenoexcept

Changes time of this spread order and returns it.

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

Parameters
timeThe time of this spread order.
Returns
The current spread order.

◆ withTimeNanoPart()

SpreadOrder & dxfcpp::SpreadOrder::withTimeNanoPart ( std::int32_t timeNanoPart)
inlinenoexcept

Changes microseconds and nanoseconds time part of this spread order.

Returns the current spread order.

Parameters
timeNanoPartThe microseconds and nanoseconds time part of this spread order.
Returns
The current spread order.

◆ withTimeNanoPartShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withTimeNanoPartShared ( std::int32_t timeNanoPart)
inlinenoexcept

Changes microseconds and nanoseconds time part of this spread order.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
timeNanoPartThe microseconds and nanoseconds time part of this spread order.
Returns
A shared pointer to the current spread order.

◆ withTimeNanos()

SpreadOrder & dxfcpp::SpreadOrder::withTimeNanos ( std::int64_t timeNanos)
inlinenoexcept

Changes time of this spread order and returns it.

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

Parameters
timeNanosThe time of this order in nanoseconds.
Returns
The current spread order.

◆ withTimeNanosShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withTimeNanosShared ( std::int64_t timeNanos)
inlinenoexcept

Changes time of this spread order.

Returns a shared pointer to the current spread order. Time is measured in nanoseconds between the current time and midnight, January 1, 1970 UTC.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
timeNanosThe time of this spread order in nanoseconds.
Returns
A shared pointer to the current spread order.

◆ withTimeShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withTimeShared ( std::int64_t time)
inlinenoexcept

Changes time of this spread order and returns a shared pointer to it.

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

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
timeThe time of this spread order.
Returns
A shared pointer to the current spread order.

◆ withTradeId()

SpreadOrder & dxfcpp::SpreadOrder::withTradeId ( std::int64_t tradeId)
inlinenoexcept

Changes trade ID.

Returns the current spread order.

Parameters
tradeIdThe trade ID.
Returns
The current spread order.

◆ withTradePrice()

SpreadOrder & dxfcpp::SpreadOrder::withTradePrice ( double tradePrice)
inlinenoexcept

Changes trade price.

Returns the current spread order.

Parameters
tradePriceThe trade price.
Returns
The current spread order.

◆ withTradePriceShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withTradePriceShared ( double tradePrice)
inlinenoexcept

Changes trade price.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
tradePriceThe trade price.
Returns
A shared pointer to the current spread order.

◆ withTradeShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withTradeShared ( std::int64_t tradeId)
inlinenoexcept

Changes trade ID.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
tradeIdThe trade ID.
Returns
A shared pointer to the current spread order.

◆ withTradeSize()

SpreadOrder & dxfcpp::SpreadOrder::withTradeSize ( double tradeSize)
inlinenoexcept

Changes trade size.

Returns the current spread order.

Parameters
tradeSizeThe trade size.
Returns
The current spread order.

◆ withTradeSizeShared()

SpreadOrder::Ptr dxfcpp::SpreadOrder::withTradeSizeShared ( double tradeSize)
inlinenoexcept

Changes trade size.

Returns a shared pointer to the current spread order.

Warning
Please do not use this method unless the object was created with std::shared_ptr<SpreadOrder>(new SpreadOrder(...)) or std::make_shared<SpreadOrder>(...)
Parameters
tradeSizeThe trade size.
Returns
A shared pointer to the current spread order.