6#include "../../detail/Conf.hpp"
8DXFCXX_DISABLE_MSC_WARNINGS_PUSH(4251)
10#include "../../detail/Math.hpp"
11#include "../../detail/StringParam.hpp"
12#include "../../exceptions/InvalidArgumentException.hpp"
13#include "../EventTypeEnum.hpp"
14#include "./AuctionType.hpp"
15#include "./ImbalanceSide.hpp"
16#include "./MarketEvent.hpp"
17#include "./OrderSource.hpp"
24
25
26
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
64 friend struct EventMapper;
66 static constexpr std::uint64_t SECONDS_SHIFT = 32ULL;
67 static constexpr std::uint64_t MILLISECONDS_SHIFT = 22ULL;
68 static constexpr std::uint64_t MILLISECONDS_MASK = 0x3ffULL;
71
72
73
74
75
76
79 static constexpr std::uint32_t IMBALANCE_SIDE_MASK = 0x07;
80 static constexpr std::uint32_t IMBALANCE_SIDE_SHIFT = 0;
83 static constexpr std::uint32_t AUCTION_TYPE_MASK = 0x07;
84 static constexpr std::uint32_t AUCTION_TYPE_SHIFT = 3;
87 std::int32_t sourceId{};
88 std::int64_t timeSequence{};
89 double refPrice = math::NaN;
90 double pairedSize = math::NaN;
91 double imbalanceSize = math::NaN;
92 double nearPrice = math::NaN;
93 double farPrice = math::NaN;
99 void fillData(
void *graalNative)
noexcept override;
100 void fillGraalData(
void *graalNative)
const override;
101 static void freeGraalData(
void *graalNative)
noexcept;
114
115
116
117
121
122
123
124
125
126
130
131
132
133
134
135
139
140
141
142
143
144 static void freeGraal(
void *graalNative);
153
154
155
156
162
163
164
165
166
170
171
172
173
174
175
181
182
183
184
188
189
190
191
192 void setSource(
const OrderSource &source)
noexcept;
195
196
197
198
199
200
204
205
206
207
211
212
213
214
215
216
217
218 void setTimeSequence(std::int64_t timeSequence)
noexcept;
221
222
223
224
225
226
227 OrderImbalance &withTimeSequence(std::int64_t timeSequence)
noexcept;
230
231
232
233
234
238
239
240
241
242
243 void setTime(std::int64_t time)
noexcept;
246
247
248
249
250
251
255
256
257
258
259
260
264
265
266
267
268
269
273
274
275
276
277
278
279
280
284
285
286
287
288
289
290
291
295
296
297
298
302
303
304
305
306
307
311
312
313
314
315
316
320
321
322
323
327
328
329
330
331
332
336
337
338
339
340
341
345
346
347
348
352
353
354
355
356
357
361
362
363
364
365
366
367
371
372
373
374
378
379
380
381
382
383
387
388
389
390
391
392
393
394
398
399
400
401
405
406
407
408
409
410
414
415
416
417
421
422
423
424
428
429
430
431
432
433
437
438
439
440
444
445
446
447
451
452
453
454
455
456
460
461
462
463
471DXFCXX_DISABLE_MSC_WARNINGS_POP()
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_builder_with_name(dxfc_dxendpoint_builder_t builderHandle, const char *name)
Changes the name used to distinguish multiple endpoints in the same process (GraalVM Isolate) in logs...
Definition DXEndpoint.cpp:1125
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_builder_with_properties(dxfc_dxendpoint_builder_t builder, const dxfc_dxendpoint_property_t **properties, size_t size)
Sets all supported properties from the provided properties object.
Definition DXEndpoint.cpp:1168
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_password(dxfc_dxendpoint_t endpoint, const char *password)
Changes password for this endpoint.
Definition DXEndpoint.cpp:1451
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_get_publisher(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxpublisher_t *publisher)
Definition DXEndpoint.cpp:1652
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_builder_supports_property(dxfc_dxendpoint_builder_t builder, const char *key, DXFC_OUT int *supports)
Checks if a property is supported.
Definition DXEndpoint.cpp:1200
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_add_state_change_listener(dxfc_dxendpoint_t endpoint, dxfc_dxendpoint_state_change_listener listener)
Adds a listener notified about changes in state property.
Definition DXEndpoint.cpp:1598
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_disconnect(dxfc_dxendpoint_t endpoint)
Terminates all remote network connections.
Definition DXEndpoint.cpp:1513
#define DXFCPP_EXPORT
Definition api.h:35
void * dxfc_dxendpoint_builder_t
The dxFeed endpoint's builder handle.
Definition api.h:219
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_close_and_await_termination(dxfc_dxendpoint_t endpoint)
Closes this endpoint and wait until all pending data processing tasks are completed.
Definition DXEndpoint.cpp:1395
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_await_not_connected(dxfc_dxendpoint_t endpoint)
Waits while this endpoint state becomes NOT_CONNECTED or CLOSED.
Definition DXEndpoint.cpp:1564
void(*) dxfc_dxendpoint_state_change_listener(dxfc_dxendpoint_state_t old_state, dxfc_dxendpoint_state_t new_state, void *user_data)
The endpoint current state change listener.
Definition api.h:190
dxfc_dxendpoint_state_t
Represents the current state of endpoint.
Definition api.h:161
@ DXFC_DXENDPOINT_STATE_CLOSED
Endpoint was closed.
Definition api.h:181
@ DXFC_DXENDPOINT_STATE_NOT_CONNECTED
Endpoint was created by is not connected to remote endpoints.
Definition api.h:165
@ DXFC_DXENDPOINT_STATE_CONNECTING
The connect function was called to establish connection to remove endpoint, but the connection is not...
Definition api.h:171
@ DXFC_DXENDPOINT_STATE_CONNECTED
The connection to the remote endpoint is established.
Definition api.h:176
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_get_instance(void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Returns a default application-wide singleton instance of dxFeed endpoint with a FEED role.
Definition DXEndpoint.cpp:1264
#define DXFC_OUT
Definition api.h:17
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_get_state(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxendpoint_state_t *state)
Returns the state of this endpoint.
Definition DXEndpoint.cpp:1581
void * dxfc_dxendpoint_t
The dxFeed endpoint handle.
Definition api.h:210
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_builder_with_property(dxfc_dxendpoint_builder_t builder, const char *key, const char *value)
Sets the specified property.
Definition DXEndpoint.cpp:1146
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_builder_free(dxfc_dxendpoint_builder_t builder)
Removes a builder from the registry.
Definition DXEndpoint.cpp:1252
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_connect(dxfc_dxendpoint_t endpoint, const char *address)
Connects to the specified remote address.
Definition DXEndpoint.cpp:1473
dxfc_error_code_t
List of error codes.
Definition api.h:61
@ DXFC_EC_ERROR
The error returned if the current operation cannot be completed.
Definition api.h:72
@ DXFC_EC_SUCCESS
OK.
Definition api.h:65
@ DXFC_EC_G_ERR
dxFeed Graal Native API error.
Definition api.h:69
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_remove_state_change_listener(dxfc_dxendpoint_t endpoint, dxfc_dxendpoint_state_change_listener listener)
Removes a listener notified about changes in state property.
Definition DXEndpoint.cpp:1624
DXFCPP_EXPORT dxfc_error_code_t dxfc_system_set_property(const char *key, const char *value)
Sets the system property indicated by the specified key.
Definition System.cpp:208
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_builder_build(dxfc_dxendpoint_builder_t builder, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Builds the new dxFeed endpoint instance.
Definition DXEndpoint.cpp:1222
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_get_feed(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxfeed_t *feed)
Definition DXEndpoint.cpp:1647
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_await_processed(dxfc_dxendpoint_t endpoint)
Waits until this endpoint stops processing data (becomes quiescent).
Definition DXEndpoint.cpp:1547
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_close(dxfc_dxendpoint_t endpoint)
Closes this endpoint.
Definition DXEndpoint.cpp:1378
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_new_builder(DXFC_OUT dxfc_dxendpoint_builder_t *builder)
Creates a new dxFeed endpoint's builder instance.
Definition DXEndpoint.cpp:1087
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_reconnect(dxfc_dxendpoint_t endpoint)
Terminates all established network connections and initiates connecting again with the same address.
Definition DXEndpoint.cpp:1496
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_get_role(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxendpoint_role_t *role)
Returns the role of this endpoint.
Definition DXEndpoint.cpp:1412
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_user(dxfc_dxendpoint_t endpoint, const char *user)
Changes username for this endpoint.
Definition DXEndpoint.cpp:1429
DXFCPP_EXPORT dxfc_error_code_t dxfc_system_get_property(const char *key, DXFC_OUT char *buffer, size_t buffer_size)
Gets the system property indicated by the specified key.
dxfc_dxendpoint_role_t
Represents the role of an endpoint that was specified during its creation.
Definition api.h:101
@ DXFC_DXENDPOINT_ROLE_PUBLISHER
PUBLISHER endpoint connects to the remote publisher hub (also known as multiplexor) or creates a publ...
Definition api.h:139
@ DXFC_DXENDPOINT_ROLE_STREAM_FEED
STREAM_FEED endpoint is similar to DXFC_DXENDPOINT_ROLE_FEED and also connects to the remote data fee...
Definition api.h:128
@ DXFC_DXENDPOINT_ROLE_FEED
FEED endpoint connects to the remote data feed provider and is optimized for real-time or delayed dat...
Definition api.h:111
@ DXFC_DXENDPOINT_ROLE_STREAM_PUBLISHER
STREAM_PUBLISHER endpoint is similar to DXFC_DXENDPOINT_ROLE_PUBLISHER and also connects to the remot...
Definition api.h:148
@ DXFC_DXENDPOINT_ROLE_LOCAL_HUB
LOCAL_HUB endpoint is a local hub without the ability to establish network connections.
Definition api.h:155
@ DXFC_DXENDPOINT_ROLE_ON_DEMAND_FEED
ON_DEMAND_FEED endpoint is similar to DXFC_DXENDPOINT_ROLE_FEED, but it is designed to be used with d...
Definition api.h:119
void * dxfc_dxpublisher_t
The dxFeed publisher handle.
Definition api.h:229
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_create(void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Creates an endpoint with FEED role.
Definition DXEndpoint.cpp:1321
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_get_instance2(dxfc_dxendpoint_role_t role, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Returns a default application-wide singleton instance of DXEndpoint for a specific role.
Definition DXEndpoint.cpp:1292
void * dxfc_dxfeed_t
The dxFeed handle.
Definition api.h:224
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_builder_with_role(dxfc_dxendpoint_builder_t builder, dxfc_dxendpoint_role_t role)
Sets role for the created dxFeed endpoint.
Definition DXEndpoint.cpp:1108
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_create2(dxfc_dxendpoint_role_t role, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Creates an endpoint with a specified role.
Definition DXEndpoint.cpp:1349
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_free(dxfc_dxendpoint_t endpoint)
Removes the dxFeed endpoint from the registry.
Definition DXEndpoint.cpp:1657
DXFCPP_EXPORT dxfc_error_code_t dxfc_dxendpoint_disconnect_and_clear(dxfc_dxendpoint_t endpoint)
Terminates all remote network connections and clears stored data.
Definition DXEndpoint.cpp:1530
AnalyticOrder & withPrice(double price) noexcept override
Changes price of this analytic order.
Definition AnalyticOrder.cpp:174
AnalyticOrder & withScope(const Scope &scope) noexcept override
Changes the scope of this analytic order.
Definition AnalyticOrder.cpp:214
AnalyticOrder & withSequence(std::int32_t sequence) override
Changes sequence number of this analytic order.
Definition AnalyticOrder.cpp:150
AnalyticOrder & withIcebergHiddenSize(double icebergHiddenSize) noexcept
Changes iceberg hidden size and returns the current analytic order.
Definition AnalyticOrder.cpp:244
AnalyticOrder() noexcept
Creates new analytic order event with default values.
Definition AnalyticOrder.cpp:112
double getIcebergHiddenSize() const noexcept
Returns iceberg hidden size of this analytic order.
Definition AnalyticOrder.cpp:236
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition AnalyticOrder.cpp:70
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition AnalyticOrder.cpp:84
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition AnalyticOrder.cpp:50
const IcebergType & getIcebergType() const &noexcept
Returns iceberg type of this analytic order.
Definition AnalyticOrder.cpp:264
void setIcebergPeakSize(double icebergPeakSize) noexcept
Changes iceberg peak size of this analytic order.
Definition AnalyticOrder.cpp:226
AnalyticOrder & withTimeNanoPart(std::int32_t timeNanoPart) noexcept override
Changes microseconds and nanoseconds time part of this analytic order.
Definition AnalyticOrder.cpp:146
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition AnalyticOrder.cpp:104
AnalyticOrder & withMarketMaker(StringParam marketMaker) override
Changes market maker or other aggregate identifier of this analytic order.
Definition AnalyticOrder.cpp:218
double getIcebergPeakSize() const noexcept
Returns iceberg peak size of this analytic order.
Definition AnalyticOrder.cpp:222
void setIcebergExecutedSize(double icebergExecutedSize) noexcept
Changes the iceberg executed size of this analytic order.
Definition AnalyticOrder.cpp:254
std::string toString() const override
Returns a string representation of the current object.
Definition AnalyticOrder.cpp:279
void setIcebergHiddenSize(double icebergHiddenSize) noexcept
Changes iceberg hidden size of this analytic order.
Definition AnalyticOrder.cpp:240
AnalyticOrder & withAction(const OrderAction &action) noexcept override
Changes the action of this analytic order and returns it.
Definition AnalyticOrder.cpp:158
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition AnalyticOrder.hpp:90
std::unique_ptr< AnalyticOrder > Unique
The alias to a type of unique pointer to the AnalyticOrder object.
Definition AnalyticOrder.hpp:87
AnalyticOrder & withExecutedSize(double executedSize) noexcept override
Changes executed size of this analytic order.
Definition AnalyticOrder.cpp:182
std::shared_ptr< AnalyticOrder > Ptr
The alias to a type of shared pointer to the AnalyticOrder object.
Definition AnalyticOrder.hpp:84
AnalyticOrder & withTradePrice(double tradePrice) noexcept override
Changes trade price.
Definition AnalyticOrder.cpp:194
AnalyticOrder & withOrderSide(const Side &side) noexcept override
Changes side of this analytic order.
Definition AnalyticOrder.cpp:210
AnalyticOrder & withEventFlags(std::int32_t eventFlags) noexcept override
Changes transactional event flags and returns the current analytic order.
Definition AnalyticOrder.cpp:130
AnalyticOrder & withIcebergPeakSize(double icebergPeakSize) noexcept
Changes iceberg peak size and returns the current analytic order.
Definition AnalyticOrder.cpp:230
AnalyticOrder & withExchangeCode(char exchangeCode) override
Changes exchange code of this analytic order.
Definition AnalyticOrder.cpp:202
double getIcebergExecutedSize() const noexcept
Returns iceberg executed size of this analytic order.
Definition AnalyticOrder.cpp:250
AnalyticOrder & withSize(double size) noexcept override
Changes size of this analytic order.
Definition AnalyticOrder.cpp:178
AnalyticOrder & withEventFlags(const EventFlagsMask &eventFlags) noexcept override
Changes transactional event flags and returns the current analytic order.
Definition AnalyticOrder.cpp:134
AnalyticOrder & withIcebergExecutedSize(double icebergExecutedSize) noexcept
Changes iceberg executed size and returns the current analytic order.
Definition AnalyticOrder.cpp:258
AnalyticOrder & withMarketMaker(S &&marketMaker) noexcept
Changes the market maker or the other aggregate identifier of this order, or makes it null with std::...
Definition AnalyticOrder.hpp:380
void setIcebergType(const IcebergType &icebergType) noexcept
Changes iceberg type of this analytic order.
Definition AnalyticOrder.cpp:268
AnalyticOrder & withEventSymbol(StringParam eventSymbol) override
Changes an event's symbol and returns the current analytic order.
Definition AnalyticOrder.cpp:118
AnalyticOrder(StringParam eventSymbol)
Creates a new analytic order event with the specified event symbol.
Definition AnalyticOrder.cpp:115
AnalyticOrder & withIcebergType(const IcebergType &icebergType) noexcept
Changes an iceberg type and returns the current analytic order.
Definition AnalyticOrder.cpp:273
AnalyticOrder & withTradeSize(double tradeSize) noexcept override
Changes trade size.
Definition AnalyticOrder.cpp:198
AnalyticOrder & withSource(const OrderSource &source) noexcept override
Changes an event's source and returns the current analytic order.
Definition AnalyticOrder.cpp:126
T & operator*() const noexcept
Definition AutoClose.hpp:173
AutoClose() noexcept=default
Creates an empty AutoClose.
AutoClose(std::shared_ptr< T > entity) noexcept
Creates an AutoClose that closes the entity.
Definition AutoClose.hpp:119
~AutoClose() noexcept
Closes the entity.
Definition AutoClose.hpp:140
const std::shared_ptr< T > & get() const noexcept
Definition AutoClose.hpp:163
std::shared_ptr< T > release() noexcept
Makes this AutoClose empty without closing the entity.
Definition AutoClose.hpp:158
AutoClose & operator=(AutoClose &&other) noexcept
Closes the current entity and takes the entity of the other AutoClose, which becomes empty.
Definition AutoClose.hpp:130
operator bool() const noexcept
Definition AutoClose.hpp:178
AutoClose(AutoClose &&other) noexcept
Takes the entity of the other AutoClose, which becomes empty.
Definition AutoClose.hpp:126
T * operator->() const noexcept
Definition AutoClose.hpp:168
void reset() noexcept
Closes the entity now and makes this AutoClose empty.
Definition AutoClose.hpp:145
void setSequence(std::int32_t sequence)
Changes sequence number of this event.
Definition Candle.cpp:277
Candle & withBidVolume(double bidVolume) noexcept
Changes bid volume in this candle.
Definition Candle.cpp:398
double getImpVolatility() const noexcept
Returns the implied volatility.
Definition Candle.cpp:418
void setClose(double close) noexcept
Changes the last (close) price of this candle.
Definition Candle.cpp:352
void setTime(std::int64_t time) noexcept
Changes the timestamp of the event in milliseconds.
Definition Candle.cpp:261
void setBidVolume(double bidVolume) noexcept
Changes bid volume in this candle.
Definition Candle.cpp:394
void setEventFlags(std::int32_t eventFlags) noexcept override
Changes transactional event flags.
Definition Candle.cpp:219
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition Candle.cpp:106
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition Candle.cpp:140
std::unique_ptr< Candle > Unique
The alias to a type of unique pointer to the Candle object.
Definition Candle.hpp:113
void setImpVolatility(double impVolatility)
Changes implied volatility.
Definition Candle.cpp:422
Candle & withOpen(double open) noexcept
Changes the first (open) price of this candle.
Definition Candle.cpp:314
Candle & withHigh(double high) noexcept
Changes the maximal (high) price of this candle.
Definition Candle.cpp:328
Candle & withCount(std::int64_t count) noexcept
Changes total number of original trade (or quote) events in this candle.
Definition Candle.cpp:300
Candle & withAskVolume(double askVolume) noexcept
Changes ask volume in this candle.
Definition Candle.cpp:412
double getAskVolume() const noexcept
Returns ask volume in this candle.
Definition Candle.cpp:404
std::int64_t getTime() const noexcept override
Returns the timestamp of the event in milliseconds.
Definition Candle.cpp:255
Candle & withSequence(std::int32_t sequence)
Changes sequence number of this event.
Definition Candle.cpp:286
Candle(CandleSymbol eventSymbol) noexcept
Creates a new candle with the specified candle event symbol.
Definition Candle.cpp:170
void setEventSymbol(const CandleSymbol &eventSymbol) noexcept override
Changes the event symbol that identifies this event type in subscription.
Definition Candle.cpp:185
std::shared_ptr< Candle > Ptr
The alias to a type of shared pointer to the Candle object.
Definition Candle.hpp:110
Candle() noexcept
Creates a new candle with default values.
Definition Candle.cpp:167
void setOpen(double open) noexcept
Changes the first (open) price of this candle.
Definition Candle.cpp:310
const std::optional< CandleSymbol > & getEventSymbolOpt() const &noexcept override
Returns a symbol of this event.
Definition Candle.cpp:181
double getOpen() const noexcept
Returns the first (open) price of this candle.
Definition Candle.cpp:306
void setEventTime(std::int64_t eventTime) noexcept override
Changes event creation time.
Definition Candle.cpp:199
std::int64_t getCount() const noexcept
Returns total number of original trade (or quote) events in this candle.
Definition Candle.cpp:292
void setAskVolume(double askVolume) noexcept
Changes ask volume in this candle.
Definition Candle.cpp:408
double getBidVolume() const noexcept
Returns bid volume in this candle.
Definition Candle.cpp:390
Candle & withEventFlags(const EventFlagsMask &eventFlags) noexcept
Changes transactional event flags and returns the current candle.
Definition Candle.cpp:233
const CandleSymbol & getEventSymbol() const &noexcept override
Returns a symbol of this event.
Definition Candle.cpp:173
double getHigh() const noexcept
Returns the maximal (high) price of this candle.
Definition Candle.cpp:320
Candle & withClose(double close) noexcept
Changes the last (close) price of this candle.
Definition Candle.cpp:356
void setHigh(double high) noexcept
Changes the maximal (high) price of this candle.
Definition Candle.cpp:324
double getVWAP() const noexcept
Returns volume-weighted average price (VWAP) in this candle.
Definition Candle.cpp:376
Candle & withVolume(double volume) noexcept
Changes total volume in this candle.
Definition Candle.cpp:370
Candle & withEventFlags(std::int32_t eventFlags) noexcept
Changes transactional event flags and returns the current candle.
Definition Candle.cpp:223
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition Candle.cpp:126
double getLow() const noexcept
Returns the minimal (low) price of this candle.
Definition Candle.cpp:334
Candle & withIndex(std::int64_t index) noexcept
Changes the unique per-symbol index of this event.
Definition Candle.cpp:243
Candle & withLow(double low) noexcept
Changes the minimal (low) price of this candle.
Definition Candle.cpp:342
Candle & withEventSymbol(const CandleSymbol &eventSymbol) noexcept
Changes an event's symbol and returns the current candle.
Definition Candle.cpp:189
EventFlagsMask getEventFlagsMask() const noexcept override
Returns transactional event flags.
Definition Candle.cpp:215
double getVolume() const noexcept
Returns total volume in this candle.
Definition Candle.cpp:362
std::int64_t getIndex() const noexcept override
Returns unique per-symbol index of this event.
Definition Candle.cpp:251
void setLow(double low) noexcept
Changes the minimal (low) price of this candle.
Definition Candle.cpp:338
void setEventFlags(const EventFlagsMask &eventFlags) noexcept override
Changes transactional event flags.
Definition Candle.cpp:229
void setIndex(std::int64_t index) override
Changes unique per-symbol index of this event.
Definition Candle.cpp:239
Candle & withImpVolatility(double impVolatility) noexcept
Changes implied volatility.
Definition Candle.cpp:426
void setOpenInterest(double openInterest) noexcept
Changes the open interest.
Definition Candle.cpp:436
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition Candle.cpp:147
Candle & withOpenInterest(double openInterest) noexcept
Changes the open interest.
Definition Candle.cpp:440
std::int64_t getEventTime() const noexcept override
Returns time when an event was created or zero when time is not available.
Definition Candle.cpp:195
Candle & withTime(std::int64_t time) noexcept
Changes the timestamp of the event in milliseconds.
Definition Candle.cpp:267
Candle & withVWAP(double vwap) noexcept
Changes volume-weighted average price (VWAP) in this candle.
Definition Candle.cpp:384
static constexpr std::uint32_t MAX_SEQUENCE
Maximum allowed sequence value.
Definition Candle.hpp:123
void setVWAP(double vwap) noexcept
Changes volume-weighted average price (VWAP) in this candle.
Definition Candle.cpp:380
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition Candle.hpp:116
double getClose() const noexcept
Returns the last (close) price of this candle.
Definition Candle.cpp:348
Candle & withEventTime(std::int64_t eventTime) noexcept
Changes event's creation time and returns the current candle.
Definition Candle.cpp:203
std::int32_t getSequence() const noexcept
Returns the sequence number of this event to distinguish events that have the same time.
Definition Candle.cpp:273
std::int32_t getEventFlags() const noexcept override
Returns transactional event flags.
Definition Candle.cpp:211
void setCount(std::int64_t count) noexcept
Changes total number of original trade (or quote) events in this candle.
Definition Candle.cpp:296
double getOpenInterest() const noexcept
Returns the open interest.
Definition Candle.cpp:432
std::string toString() const override
Returns a string representation of the current object.
Definition Candle.cpp:448
void setVolume(double volume) noexcept
Changes total volume in this candle.
Definition Candle.cpp:366
Builder class for DXEndpoint that supports additional configuration properties.
Definition DXEndpoint.hpp:1069
std::shared_ptr< DXEndpoint > build()
Builds DXEndpoint instance.
Definition DXEndpoint.cpp:695
std::shared_ptr< Builder > withExecutor(const std::shared_ptr< Executor > &executor)
Sets the executor that is used for notifications (events, state changes, etc.) of the endpoint to bui...
Definition DXEndpoint.hpp:1194
std::shared_ptr< Builder > withProperties(Properties &&properties)
Sets all supported properties from the provided properties object.
Definition DXEndpoint.hpp:1160
~Builder() noexcept override
Releases the GraalVM handle.
Definition DXEndpoint.cpp:733
std::shared_ptr< Builder > withRole(Role role)
Sets role for the created DXEndpoint.
Definition DXEndpoint.cpp:647
Subscription for a set of symbols and event types.
Definition DXFeedSubscription.hpp:102
TimePeriodInfo getAggregationPeriodInfo() const
Returns the aggregation period that was applied to the events delivered to this subscription: the max...
Definition DXFeedSubscription.cpp:1042
bool containsEventType(const EventTypeEnum &eventType) override
Returns true if this subscription contains the corresponding event type.
Definition DXFeedSubscription.cpp:961
std::size_t addChangeListener(std::shared_ptr< ObservableSubscriptionChangeListener > listener) override
Adds subscription change listener.
Definition DXFeedSubscription.cpp:1062
bool isClosed() override
Returns true if this subscription is closed.
Definition DXFeedSubscription.cpp:823
void addSymbols(SymbolIt begin, SymbolIt end) const
Adds the specified collection (using iterators) of symbols to the set of subscribed symbols.
Definition DXFeedSubscription.hpp:581
void close() const
Closes this subscription and makes it permanently detached.
Definition DXFeedSubscription.cpp:832
static constexpr char SLOW_LISTENER_THRESHOLD_PROPERTY[]
"dxfcpp.subscription.slowListenerThreshold"
Definition DXFeedSubscription.hpp:113
void setEventsBatchLimit(std::int32_t eventsBatchLimit) const
Sets maximum number of events in the single notification of OnEventHandler.
Definition DXFeedSubscription.cpp:1108
std::unordered_set< EventTypeEnum > getEventTypes() override
Returns a set of subscribed event types.
Definition DXFeedSubscription.cpp:957
void setSymbols(std::initializer_list< SymbolWrapper > collection) const
Changes the set of subscribed symbols so that it contains just the symbols from the specified collect...
Definition DXFeedSubscription.cpp:992
static constexpr std::int32_t MAX_BATCH_LIMIT
The maximum events' batch limit for a single notification in OnEventHandler.
Definition DXFeedSubscription.hpp:145
void removeSymbols(SymbolIt begin, SymbolIt end) const
Removes the specified collection (using iterators) of symbols from the set of subscribed symbols.
Definition DXFeedSubscription.hpp:648
void removeSymbols(SymbolsCollection &&collection) const
Removes the specified collection of symbols from the set of subscribed symbols.
Definition DXFeedSubscription.hpp:669
void removeSymbols(const SymbolWrapper &symbolWrapper) const
Removes the specified symbol from the set of subscribed symbols.
Definition DXFeedSubscription.cpp:1011
static constexpr char EVENT_LAG_THRESHOLD_PROPERTY[]
"dxfcpp.subscription.eventLagThreshold"
Definition DXFeedSubscription.hpp:122
void attach(std::shared_ptr< DXFeed > feed)
Attaches subscription to the specified feed.
Definition DXFeedSubscription.cpp:805
TimePeriod getAggregationPeriod() const
Returns the aggregation period for data for this subscription instance.
Definition DXFeedSubscription.cpp:1026
std::string toString() const override
Returns a string representation of the current object.
Definition DXFeedSubscription.cpp:732
static constexpr std::int32_t OPTIMAL_BATCH_LIMIT
The optimal events' batch limit for a single notification in OnEventHandler.
Definition DXFeedSubscription.hpp:140
void addSymbols(std::initializer_list< SymbolWrapper > collection) const
Adds the specified collection (initializer list) of symbols to the set of subscribed symbols.
Definition DXFeedSubscription.cpp:1007
void setSymbols(SymbolsCollection &&collection) const
Changes the set of subscribed symbols so that it contains just the symbols from the specified collect...
Definition DXFeedSubscription.hpp:532
void setAggregationPeriod(const TimePeriod &aggregationPeriod) const
Sets the aggregation period for data.
Definition DXFeedSubscription.cpp:1030
static std::shared_ptr< DXFeedSubscription > create(const EventTypeEnum &eventType)
Creates a detached subscription for a single event type.
Definition DXFeedSubscription.cpp:753
std::int32_t getEventsBatchLimit() const
Definition DXFeedSubscription.cpp:1104
std::size_t addEventListener(EventListener &&listener)
Adds listener for events.
Definition DXFeedSubscription.hpp:786
static std::shared_ptr< DXFeedSubscription > create(EventTypesCollection &&eventTypes)
Creates a detached subscription for the given collection of event types.
Definition DXFeedSubscription.hpp:344
OnEventHandler & onEvent()
Returns a reference to an incoming events' handler (delegate), to which listeners can be added and re...
Definition DXFeedSubscription.cpp:1056
void addSymbols(const SymbolsCollection &collection) const
Adds the specified collection of symbols to the set of subscribed symbols.
Definition DXFeedSubscription.hpp:602
void setSymbols(SymbolIt begin, SymbolIt end) const
Changes the set of subscribed symbols so that it contains just the symbols from the specified collect...
Definition DXFeedSubscription.hpp:511
void removeChangeListener(std::size_t changeListenerId) override
Removes subscription change listener by id.
Definition DXFeedSubscription.cpp:1087
std::vector< SymbolWrapper > getDecoratedSymbols() const
Returns a set of decorated symbols (depending on the actual implementation of the subscription).
Definition DXFeedSubscription.cpp:983
void clear() const
Clears the set of subscribed symbols.
Definition DXFeedSubscription.cpp:965
std::int64_t getTotalDroppedEvents() const
Returns the total number of events that were dropped for this subscription since it was created.
Definition DXFeedSubscription.cpp:1048
void detach(std::shared_ptr< DXFeed > feed)
Detaches subscription from the specified feed.
Definition DXFeedSubscription.cpp:814
void addSymbols(const SymbolWrapper &symbolWrapper) const
Adds the specified symbol to the set of subscribed symbols.
Definition DXFeedSubscription.cpp:996
static constexpr char WARNING_PERIOD_PROPERTY[]
"dxfcpp.subscription.warningPeriod"
Definition DXFeedSubscription.hpp:131
void setAggregationPeriod(std::chrono::milliseconds aggregationPeriod) const
Sets the aggregation period for data.
Definition DXFeedSubscription.cpp:1034
void removeSymbols(std::initializer_list< SymbolWrapper > collection) const
Removes the specified collection (initializer list) of symbols from the set of subscribed symbols.
Definition DXFeedSubscription.cpp:1022
std::vector< SymbolWrapper > getSymbols() const
Returns a set of subscribed symbols (depending on the actual implementation of the subscription).
Definition DXFeedSubscription.cpp:974
Extends DXFeedSubscription to conveniently subscribe to time-series of events for a set of symbols an...
Definition DXFeedSubscription.hpp:953
std::int64_t getFromTime()
Returns the earliest timestamp from which time-series of events shall be received.
Definition DXFeedSubscription.cpp:1136
void setFromTime(std::chrono::milliseconds fromTime)
Sets the earliest timestamp from which time-series of events shall be received.
Definition DXFeedSubscription.cpp:1147
bool in(std::uint32_t eventFlagsMask) const noexcept
Determines if the given flag is in the mask.
Definition IndexedEvent.cpp:24
static const EventFlag SNAPSHOT_END
0x08 - A bitmask to get snapshot end indicator from the value of eventFlags property.
Definition EventFlag.hpp:11
std::uint32_t getFlag() const noexcept
Definition IndexedEvent.cpp:20
static bool isSnapshotSnip(const std::shared_ptr< Event > &event)
Determines if the given event is marked as a snapshot snip.
Definition EventFlag.hpp:352
static const EventFlag REMOVE_SYMBOL
0x80 - For internal use.
Definition EventFlag.hpp:15
friend std::int32_t operator|(const EventFlag &eventFlag1, std::int32_t eventFlag2) noexcept
Performs a bit or operation with two event flags.
Definition EventFlag.hpp:242
EventFlag() noexcept
Creates the invalid event flag.
Definition IndexedEvent.cpp:17
static bool isSnapshotBegin(const std::shared_ptr< Event > &event)
Determines if the given event marks the beginning of a snapshot.
Definition EventFlag.hpp:330
friend std::int32_t operator&(const EventFlag &eventFlag1, std::int32_t eventFlag2) noexcept
Performs a bit and operation with two event flags.
Definition EventFlag.hpp:264
friend std::int32_t operator|(std::int32_t eventFlag1, const EventFlag &eventFlag2) noexcept
Performs a bit or operation with two event flags.
Definition EventFlag.hpp:253
static bool isPending(const std::shared_ptr< Event > &event)
Determines if the given event is in a pending state.
Definition EventFlag.hpp:373
static const EventFlag SNAPSHOT_MODE
0x40 - A bitmask to set snapshot mode indicator into the value of eventFlags property.
Definition EventFlag.hpp:14
friend std::int32_t operator&(std::int32_t eventFlag1, const EventFlag &eventFlag2) noexcept
Performs a bit and operation with two event flags.
Definition EventFlag.hpp:275
bool in(const EventFlagsMask &eventFlagsMask) const noexcept
Determines if the given flag is in the mask.
Definition EventFlag.hpp:219
static const EventFlag SNAPSHOT_SNIP
0x10 - A bitmask to get snapshot snip indicator from the value of eventFlags property.
Definition EventFlag.hpp:12
static const EventFlag SNAPSHOT_BEGIN
0x04 - A bitmask to get snapshot begin indicator from the value of eventFlags property.
Definition EventFlag.hpp:10
static bool isRemove(const std::shared_ptr< Event > &event)
Determines if the given event is marked for removal.
Definition EventFlag.hpp:384
static bool isSnapshotEndOrSnip(const std::shared_ptr< Event > &event)
Determines if the given event marks the end of a snapshot or a snapshot snip.
Definition EventFlag.hpp:362
static const EventFlag TX_PENDING
0x01 - A bitmask to get transaction pending indicator from the value of eventFlags property.
Definition EventFlag.hpp:8
static bool isSnapshotEnd(const std::shared_ptr< Event > &event)
Determines if the given event marks the end of a snapshot.
Definition EventFlag.hpp:341
static const EventFlag REMOVE_EVENT
0x02 - A bitmask to get removal indicator from the value of eventFlags property.
Definition EventFlag.hpp:9
constexpr std::uint32_t getMask() const noexcept
Returns an integer representation of an event mask.
Definition EventFlag.hpp:445
bool contains(const EventFlag &flag) const noexcept
Definition IndexedEvent.cpp:43
friend EventFlagsMask operator|(const EventFlagsMask &eventFlagsMask, const EventFlag &eventFlag) noexcept
Performs a bit or operation with an event flags' mask and an event flag.
Definition EventFlag.hpp:462
EventFlagsMask() noexcept
Creates an empty event flags mask.
Definition IndexedEvent.cpp:36
EventFlagsMask(std::initializer_list< EventFlag > eventFlags) noexcept
Creates event flags mask by initializer list with flags.
Definition IndexedEvent.cpp:39
EventFlagsMask(MaskType mask) noexcept
Create event flags mask by integer value.
Definition EventFlag.hpp:417
EventFlagsMask(EventFlagIt begin, EventFlagIt end) noexcept
Creates event flags mask by iterators of container with flags.
Definition EventFlag.hpp:427
friend EventFlagsMask operator&(const EventFlagsMask &eventFlagsMask, const EventFlag &eventFlag) noexcept
Performs a bit and operation with an event flags' mask and an event flag.
Definition EventFlag.hpp:473
The enumeration type that provides additional information about the dxFeed Graal C++-API event type.
Definition EventTypeEnum.hpp:40
bool isTimeSeries() const noexcept
Definition EventTypeEnum.cpp:237
static const ConstantMap< std::string_view, EventTypeEnum > ALL_BY_CLASS_NAME
All event types by their class names.
Definition EventTypeEnum.hpp:194
std::string getClassName() const
Definition EventTypeEnum.cpp:209
std::string getName() const
Definition EventTypeEnum.cpp:205
bool isLasting() const noexcept
Definition EventTypeEnum.cpp:229
static const ConstantMap< std::uint32_t, EventTypeEnum > ALL_BY_ID
All event types by their ids.
Definition EventTypeEnum.hpp:196
bool isOnlyIndexed() const noexcept
Definition EventTypeEnum.cpp:241
bool isIndexed() const noexcept
Definition EventTypeEnum.cpp:233
std::uint32_t getId() const noexcept
Definition EventTypeEnum.cpp:201
static const ConstantMap< std::string_view, EventTypeEnum > ALL_BY_NAME
All event types by their names.
Definition EventTypeEnum.hpp:193
static const std::span< const std::reference_wrapper< const EventTypeEnum > > ALL
All event types (constant-initialized, so it can be used in the dynamic initialization of global vari...
Definition EventTypeEnum.hpp:99
bool isMarket() const noexcept
Definition EventTypeEnum.cpp:245
Builder is a static inner class that provides a flexible and readable way to construct instances of t...
Definition HistoryEndpoint.hpp:114
std::shared_ptr< Builder > withAddress(StringParam address)
Specifies the address for the target endpoint.
Definition HistoryEndpoint.cpp:36
std::shared_ptr< Builder > withAuthToken(StringParam authToken)
Sets the authentication token for the target endpoint.
Definition HistoryEndpoint.cpp:54
std::shared_ptr< HistoryEndpoint > build() const
Builds and returns a configured instance of HistoryEndpoint.
Definition HistoryEndpoint.cpp:72
std::shared_ptr< Builder > withFormat(Format format)
Sets the format to be used for data handling.
Definition HistoryEndpoint.cpp:66
std::shared_ptr< Builder > withPassword(StringParam password)
Sets the password for the target endpoint.
Definition HistoryEndpoint.cpp:48
std::shared_ptr< Builder > withUserName(StringParam userName)
Sets the username for the target endpoint.
Definition HistoryEndpoint.cpp:42
std::shared_ptr< Builder > withCompression(Compression compression)
Sets the compression type to be used for data transmission or storage.
Definition HistoryEndpoint.cpp:60
std::shared_ptr< Builder > withAuthToken(const AuthToken &authToken)
Sets the authentication token for the target endpoint.
Definition HistoryEndpoint.hpp:161
Source identifier for IndexedEvent.
Definition IndexedEventSource.hpp:31
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition IndexedEventSource.cpp:20
constexpr IndexedEventSource(std::int32_t id, ConstString::Literal name, bool orderSource=false) noexcept
Creates a constant source in constant expressions.
Definition IndexedEventSource.hpp:49
std::string name() const
Returns the string representation of the object.
Definition IndexedEventSource.cpp:73
static const IndexedEventSource DEFAULT
The default source with zero identifier for all events that do not support multiple sources.
Definition IndexedEventSource.hpp:11
constexpr std::string_view nameView() const noexcept
Definition IndexedEventSource.hpp:60
IndexedEventSource(const IndexedEventSource &other, bool orderSource) noexcept
Creates a copy of the source for an OrderSource.
Definition IndexedEventSource.cpp:58
IndexedEventSource & operator=(const IndexedEventSource &other) noexcept
Copies the identifier and the name of the source; the type of this source is kept.
Definition IndexedEventSource.cpp:62
static IndexedEventSource fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition IndexedEventSource.cpp:35
std::int32_t id() const noexcept
Returns the source identifier.
Definition IndexedEventSource.cpp:69
IndexedEventSource(const IndexedEventSource &other) noexcept
Creates a copy of the source.
Definition IndexedEventSource.cpp:55
void * toGraal() const
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition IndexedEventSource.cpp:13
std::string toString() const
Returns the string representation of the object.
Definition IndexedEventSource.cpp:77
Represents a subscription to a specific source of indexed events.
Definition IndexedEventSubscriptionSymbol.hpp:41
virtual const std::unique_ptr< SymbolWrapper > & getEventSymbol() const
Returns the wrapped event symbol (CandleSymbol, WildcardSymbol, etc.).
Definition IndexedEventSubscriptionSymbol.cpp:20
virtual void * toGraal() const
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition IndexedEventSubscriptionSymbol.cpp:28
static IndexedEventSubscriptionSymbol fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure (rec...
Definition IndexedEventSubscriptionSymbol.cpp:54
virtual const std::unique_ptr< IndexedEventSource > & getSource() const
Returns indexed event source.
Definition IndexedEventSubscriptionSymbol.cpp:24
IndexedEventSubscriptionSymbol(const SymbolWrapper &eventSymbol, const IndexedEventSource &source)
Creates an indexed event subscription symbol with a specified event symbol and source.
Definition IndexedEventSubscriptionSymbol.cpp:14
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition IndexedEventSubscriptionSymbol.cpp:41
virtual std::string toString() const
Returns string representation of this indexed event subscription symbol.
Definition IndexedEventSubscriptionSymbol.cpp:70
std::string toString() const override
Returns a string representation of the current object.
Definition MarketMaker.cpp:444
MarketMaker & withAskSize(double askSize) noexcept
Changes ask size of this market maker event.
Definition MarketMaker.cpp:424
MarketMaker & withBidSize(double bidSize) noexcept
Changes bid size of this market maker event.
Definition MarketMaker.cpp:368
MarketMaker & withAskPrice(double askPrice) noexcept
Changes ask price of this market maker event.
Definition MarketMaker.cpp:410
std::int16_t getExchangeCode() const noexcept
Returns exchange code of this market maker event.
Definition MarketMaker.cpp:277
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition MarketMaker.cpp:197
void setBidPrice(double bidPrice) noexcept
Changes bid price of this market maker event.
Definition MarketMaker.cpp:350
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition MarketMaker.hpp:145
void setExchangeCode(char exchangeCode) noexcept
Changes exchange code of this market maker event.
Definition MarketMaker.cpp:285
MarketMaker() noexcept
Creates new market maker event with default values.
Definition MarketMaker.cpp:205
void setEventFlags(std::int32_t eventFlags) noexcept override
Changes transactional event flags.
Definition MarketMaker.cpp:235
std::optional< std::string > getMarketMakerOpt() const
Returns market maker or other aggregate identifier of this market maker event.
Definition MarketMaker.cpp:316
MarketMaker & withMarketMaker(StringParam marketMaker)
Changes market maker or other aggregate identifier of this market maker event.
Definition MarketMaker.cpp:326
std::int64_t getBidCount() const noexcept
Returns number of individual bid orders in this market maker event.
Definition MarketMaker.cpp:374
double getAskSize() const noexcept
Returns ask size of this market maker event.
Definition MarketMaker.cpp:416
void setEventFlags(const EventFlagsMask &eventFlags) noexcept override
Changes transactional event flags.
Definition MarketMaker.cpp:245
std::int32_t getEventFlags() const noexcept override
Returns transactional event flags.
Definition MarketMaker.cpp:227
MarketMaker & withExchangeCode(char exchangeCode) noexcept
Changes exchange code of this market maker event.
Definition MarketMaker.cpp:289
MarketMaker & withMarketMaker(S &&marketMaker)
Changes the market maker or the other aggregate identifier, or makes it null with std::nullopt.
Definition MarketMaker.hpp:392
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition MarketMaker.cpp:177
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition MarketMaker.cpp:163
MarketMaker(StringParam eventSymbol)
Creates a new market maker event with the specified event symbol.
Definition MarketMaker.cpp:208
void setAskSize(double askSize) noexcept
Changes ask size of this market maker event.
Definition MarketMaker.cpp:420
MarketMaker & withEventSymbol(StringParam eventSymbol)
Changes an event's symbol and returns the current market maker.
Definition MarketMaker.cpp:211
std::int64_t getIndex() const noexcept override
Returns a unique per-symbol index of this event.
Definition MarketMaker.cpp:255
double getBidSize() const noexcept
Returns bid size of this market maker event.
Definition MarketMaker.cpp:360
EventFlagsMask getEventFlagsMask() const noexcept override
Returns transactional event flags.
Definition MarketMaker.cpp:231
std::shared_ptr< MarketMaker > Ptr
The alias to a type of shared pointer to the MarketMaker object.
Definition MarketMaker.hpp:139
void setAskPrice(double askPrice) noexcept
Changes ask price of this market maker event.
Definition MarketMaker.cpp:406
double getBidPrice() const noexcept
Returns bid price of this market maker event.
Definition MarketMaker.cpp:346
MarketMaker & withEventFlags(const EventFlagsMask &eventFlags) noexcept
Changes transactional event flags and returns the current market maker.
Definition MarketMaker.cpp:249
void setBidSize(double bidSize) noexcept
Changes bid size of this market maker event.
Definition MarketMaker.cpp:364
double getAskPrice() const noexcept
Returns ask price of this market maker event.
Definition MarketMaker.cpp:402
std::int64_t getTime() const noexcept
Returns time of the last bid or ask change: the maximum of bidTime and askTime.
Definition MarketMaker.cpp:273
std::unique_ptr< MarketMaker > Unique
The alias to a type of unique pointer to the MarketMaker object.
Definition MarketMaker.hpp:142
MarketMaker & withBidPrice(double bidPrice) noexcept
Changes bid price of this market maker event.
Definition MarketMaker.cpp:354
std::string getExchangeCodeString() const noexcept
Returns exchange code of this market maker event as UTF8 string.
Definition MarketMaker.cpp:281
std::string getMarketMaker() const
Returns market maker or other aggregate identifier of this market maker event.
Definition MarketMaker.cpp:306
const IndexedEventSource & getSource() const &noexcept override
Returns the source of this event.
Definition MarketMaker.cpp:223
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition MarketMaker.cpp:143
void setMarketMaker(S &&marketMaker)
Changes the market maker or the other aggregate identifier, or makes it null with std::nullopt.
Definition MarketMaker.hpp:368
MarketMaker & withEventFlags(std::int32_t eventFlags) noexcept
Changes transactional event flags and returns the current market maker.
Definition MarketMaker.cpp:239
void setMarketMaker(StringParam marketMaker)
Changes market maker or other aggregate identifier of this market maker event.
Definition MarketMaker.cpp:320
std::int64_t getAskCount() const noexcept
Returns number of individual ask orders in this market maker event.
Definition MarketMaker.cpp:430
std::int64_t getBidTime() const noexcept
Returns time of the last bid change of this market maker event.
Definition MarketMaker.cpp:332
std::int64_t getAskTime() const noexcept
Returns time of the last ask change of this market maker event.
Definition MarketMaker.cpp:388
const std::string & getExchangeInfo() const &noexcept
Returns the exchange-specific information that can be included with an order (it may contain unprinta...
Definition NuamOrder.cpp:393
void setExchangeInfo(S &&exchangeInfo) noexcept
Changes the exchange-specific information of the order, or makes it null with std::nullopt.
Definition NuamOrder.hpp:752
std::int32_t getTriggerSessionType() const noexcept
Returns the session type to trigger on.
Definition NuamOrder.cpp:473
void setRefreshQuantity(double refreshQuantity) noexcept
Changes the initial display quantity of a reserve order.
Definition NuamOrder.cpp:534
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition NuamOrder.cpp:133
NuamOrder & withTradePrice(double tradePrice) noexcept override
Changes trade price.
Definition NuamOrder.cpp:243
std::shared_ptr< NuamOrder > Ptr
The alias to a type of shared pointer to the NuamOrder object.
Definition NuamOrder.hpp:163
NuamOrder & withTradeSize(double tradeSize) noexcept override
Changes trade size.
Definition NuamOrder.cpp:247
double getMatchedQuantity() const noexcept
Returns the matched quantity within the transaction that updated the order.
Definition NuamOrder.cpp:558
void setTriggerSessionType(std::int32_t triggerSessionType) noexcept
Changes the session type to trigger on.
Definition NuamOrder.cpp:477
NuamOrder & withOrderSide(const Side &side) noexcept override
Changes side of this Nuam order.
Definition NuamOrder.cpp:259
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition NuamOrder.cpp:119
void setParticipantId(std::int32_t participantId) noexcept
Changes the ID of the participant the actor belongs to.
Definition NuamOrder.cpp:289
NuamOrder & withExecutedSize(double executedSize) noexcept override
Changes executed size of this Nuam order.
Definition NuamOrder.cpp:231
std::unique_ptr< NuamOrder > Unique
The alias to a type of unique pointer to the NuamOrder object.
Definition NuamOrder.hpp:166
NuamOrder & withSubmitterId(std::int32_t submitterId) noexcept
Changes the ID of the actor that submitted the message that changed the order.
Definition NuamOrder.cpp:307
NuamOrder & withClientOrderId(S &&clientOrderId) noexcept
Changes the client-generated order identity, or makes it null with std::nullopt.
Definition NuamOrder.hpp:606
void setClientOrderId(S &&clientOrderId) noexcept
Changes the client-generated order identity, or makes it null with std::nullopt.
Definition NuamOrder.hpp:586
NuamOrder & withLeavesQuantity(double leavesQuantity) noexcept
Changes the remaining (open) quantity of the order.
Definition NuamOrder.cpp:552
NuamOrder & withTimeInForceData(std::int32_t timeInForceData) noexcept
Changes the additional data of the time in force, used for the time validities that require it.
Definition NuamOrder.cpp:439
std::int32_t getActorId() const noexcept
Returns the actor identifier for the user sending the request.
Definition NuamOrder.cpp:271
void setCustomerAccount(S &&customerAccount) noexcept
Changes the account to use for this order, or makes it null with std::nullopt.
Definition NuamOrder.hpp:639
void setCustomerAccount(StringParam customerAccount)
Changes the account to use for this order.
Definition NuamOrder.cpp:361
NuamOrder & withDisplayQuantity(double displayQuantity) noexcept
Changes the actual display quantity of a reserve order at the end of the transaction.
Definition NuamOrder.cpp:524
NuamOrder & withMarketMaker(StringParam marketMaker) override
Changes market maker or other aggregate identifier of this Nuam order.
Definition NuamOrder.cpp:267
NuamOrder & withSource(const OrderSource &source) noexcept override
Changes event's source and returns the current Nuam order.
Definition NuamOrder.cpp:175
NuamOrder & withEventTime(std::int64_t eventTime) noexcept override
Changes event's creation time and returns the current Nuam order.
Definition NuamOrder.cpp:171
void setOnBehalfOfSubmitterId(std::int32_t onBehalfOfSubmitterId) noexcept
Changes the ID of the actor that submitted the order message on behalf of someone else.
Definition NuamOrder.cpp:317
NuamOrder & withExchangeInfo(StringParam exchangeInfo)
Changes the exchange-specific information that can be included with an order (it may contain unprinta...
Definition NuamOrder.cpp:409
double getRefreshQuantity() const noexcept
Returns the initial display quantity of a reserve order.
Definition NuamOrder.cpp:530
void setOrderQuantity(double orderQuantity) noexcept
Changes the initial quantity of the order when it was entered (it can be changed later if the order i...
Definition NuamOrder.cpp:506
const std::optional< std::string > & getClientOrderIdOpt() const &noexcept
Returns the client-generated order identity.
Definition NuamOrder.cpp:335
double getLeavesQuantity() const noexcept
Returns the remaining (open) quantity of the order.
Definition NuamOrder.cpp:544
void setLeavesQuantity(double leavesQuantity) noexcept
Changes the remaining (open) quantity of the order.
Definition NuamOrder.cpp:548
NuamOrder & withOnBehalfOfSubmitterId(std::int32_t onBehalfOfSubmitterId) noexcept
Changes the ID of the actor that submitted the order message on behalf of someone else.
Definition NuamOrder.cpp:321
void setCustomerInfo(S &&customerInfo) noexcept
Changes the free-text information filled in by the client, or makes it null with std::nullopt.
Definition NuamOrder.hpp:693
NuamOrder & withTimeInForce(const NuamTimeInForceType &timeInForce) noexcept
Changes the time in force of this order, that is how long the order remains active in the order book ...
Definition NuamOrder.cpp:425
void setCustomerInfo(StringParam customerInfo)
Changes the free-text information filled in by the client entering the transaction.
Definition NuamOrder.cpp:383
NuamOrder & withMatchedQuantity(double matchedQuantity) noexcept
Changes the matched quantity within the transaction that updated the order.
Definition NuamOrder.cpp:566
NuamOrder & withCustomerInfo(S &&customerInfo) noexcept
Changes the free-text information filled in by the client, or makes it null with std::nullopt.
Definition NuamOrder.hpp:713
const NuamTimeInForceType & getTimeInForce() const &noexcept
Returns the time in force of this order, that is how long the order remains active in the order book ...
Definition NuamOrder.cpp:415
NuamOrder & withExchangeCode(std::int16_t exchangeCode) override
Changes exchange code of this Nuam order.
Definition NuamOrder.cpp:255
NuamOrder & withParticipantId(std::int32_t participantId) noexcept
Changes the ID of the participant the actor belongs to.
Definition NuamOrder.cpp:293
NuamOrder & withCount(std::int64_t count) noexcept override
Changes a number of individual orders in this aggregate order.
Definition NuamOrder.cpp:235
void setTriggerPrice(double triggerPrice) noexcept
Changes the trigger price of the order.
Definition NuamOrder.cpp:463
void setClientOrderId(StringParam clientOrderId)
Changes the client-generated order identity.
Definition NuamOrder.cpp:339
NuamOrder & withTriggerSessionType(std::int32_t triggerSessionType) noexcept
Changes the session type to trigger on.
Definition NuamOrder.cpp:481
const std::string & getCustomerAccount() const &noexcept
Returns the account to use for this order.
Definition NuamOrder.cpp:349
std::int32_t getTriggerOrderBookId() const noexcept
Returns the ID of the order book the order will trigger on.
Definition NuamOrder.cpp:445
NuamOrder() noexcept
Creates new Nuam order event with default values.
Definition NuamOrder.cpp:161
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition NuamOrder.cpp:99
std::string toString() const override
Returns a string representation of the current object.
Definition NuamOrder.cpp:583
NuamOrder & withPrice(double price) noexcept override
Changes price of this Nuam order.
Definition NuamOrder.cpp:223
NuamOrder & withActionTime(std::int64_t actionTime) noexcept override
Changes time of the last action and returns current Nuam order.
Definition NuamOrder.cpp:211
double getTriggerPrice() const noexcept
Returns the trigger price of the order.
Definition NuamOrder.cpp:459
const NuamOrderType & getOrderType() const &noexcept
Returns the type of this order: limit, market, best order, etc.
Definition NuamOrder.cpp:487
NuamOrder & withEventFlags(std::int32_t eventFlags) noexcept override
Changes transactional event flags and returns the current Nuam order.
Definition NuamOrder.cpp:179
NuamOrder & withIndex(std::int64_t index) override
Changes unique per-symbol index of this Nuam order and returns it.
Definition NuamOrder.cpp:187
NuamOrder & withAuxOrderId(std::int64_t auxOrderId) noexcept override
Changes auxiliary order ID.
Definition NuamOrder.cpp:219
NuamOrder & withOrderType(const NuamOrderType &orderType) noexcept
Changes the type of this order: limit, market, best order, etc.
Definition NuamOrder.cpp:496
const std::string & getClientOrderId() const &noexcept
Returns the client-generated order identity.
Definition NuamOrder.cpp:327
const std::string & getCustomerInfo() const &noexcept
Returns the free-text information filled in by the client entering the transaction.
Definition NuamOrder.cpp:371
std::int32_t getParticipantId() const noexcept
Returns the ID of the participant the actor belongs to.
Definition NuamOrder.cpp:285
void setDisplayQuantity(double displayQuantity) noexcept
Changes the actual display quantity of a reserve order at the end of the transaction.
Definition NuamOrder.cpp:520
const std::optional< std::string > & getExchangeInfoOpt() const &noexcept
Returns the exchange-specific information that can be included with an order (it may contain unprinta...
Definition NuamOrder.cpp:401
const std::optional< std::string > & getCustomerAccountOpt() const &noexcept
Returns the account to use for this order.
Definition NuamOrder.cpp:357
void setSubmitterId(std::int32_t submitterId) noexcept
Changes the ID of the actor that submitted the message that changed the order.
Definition NuamOrder.cpp:303
NuamOrder & withTimeNanoPart(std::int32_t timeNanoPart) noexcept override
Changes microseconds and nanoseconds time part of this Nuam order.
Definition NuamOrder.cpp:195
void setExchangeInfo(StringParam exchangeInfo)
Changes the exchange-specific information that can be included with an order (it may contain unprinta...
Definition NuamOrder.cpp:405
NuamOrder & withOrderId(std::int64_t orderId) noexcept override
Changes order ID.
Definition NuamOrder.cpp:215
NuamOrder & withTriggerOrderBookId(std::int32_t triggerOrderBookId) noexcept
Changes the ID of the order book the order will trigger on.
Definition NuamOrder.cpp:453
NuamOrder & withCustomerAccount(S &&customerAccount) noexcept
Changes the account to use for this order, or makes it null with std::nullopt.
Definition NuamOrder.hpp:659
NuamOrder & withMarketMaker(S &&marketMaker) noexcept
Changes the market maker or the other aggregate identifier of this order, or makes it null with std::...
Definition NuamOrder.hpp:459
const std::optional< std::string > & getCustomerInfoOpt() const &noexcept
Returns the free-text information filled in by the client entering the transaction.
Definition NuamOrder.cpp:379
void setTriggerOrderBookId(std::int32_t triggerOrderBookId) noexcept
Changes the ID of the order book the order will trigger on.
Definition NuamOrder.cpp:449
NuamOrder & withRefreshQuantity(double refreshQuantity) noexcept
Changes the initial display quantity of a reserve order.
Definition NuamOrder.cpp:538
NuamOrder & withOrderQuantity(double orderQuantity) noexcept
Changes the initial quantity of the order when it was entered (it can be changed later if the order i...
Definition NuamOrder.cpp:510
NuamOrder & withTradeId(std::int64_t tradeId) noexcept override
Changes trade ID.
Definition NuamOrder.cpp:239
void setOrderType(const NuamOrderType &orderType) noexcept
Changes the type of this order: limit, market, best order, etc.
Definition NuamOrder.cpp:491
NuamOrder & withTime(std::int64_t time) noexcept override
Changes time of this Nuam order and returns it.
Definition NuamOrder.cpp:191
void setActorId(std::int32_t actorId) noexcept
Changes the actor identifier for the user sending the request.
Definition NuamOrder.cpp:275
void setMatchedQuantity(double matchedQuantity) noexcept
Changes the matched quantity within the transaction that updated the order.
Definition NuamOrder.cpp:562
void setTimeInForceData(std::int32_t timeInForceData) noexcept
Changes the additional data of the time in force, used for the time validities that require it.
Definition NuamOrder.cpp:435
NuamOrder & withExchangeCode(char exchangeCode) override
Changes exchange code of this Nuam order.
Definition NuamOrder.cpp:251
std::int32_t getSubmitterId() const noexcept
Returns the ID of the actor that submitted the message that changed the order.
Definition NuamOrder.cpp:299
NuamOrder & withSize(double size) noexcept override
Changes size of this Nuam order.
Definition NuamOrder.cpp:227
NuamOrder & withClientOrderId(StringParam clientOrderId)
Changes the client-generated order identity.
Definition NuamOrder.cpp:343
NuamOrder & withCustomerAccount(StringParam customerAccount)
Changes the account to use for this order.
Definition NuamOrder.cpp:365
NuamOrder & withActorId(std::int32_t actorId) noexcept
Changes the actor identifier for the user sending the request.
Definition NuamOrder.cpp:279
double getDisplayQuantity() const noexcept
Returns the actual display quantity of a reserve order at the end of the transaction.
Definition NuamOrder.cpp:516
double getOrderQuantity() const noexcept
Returns the initial quantity of the order when it was entered (it can be changed later if the order i...
Definition NuamOrder.cpp:502
NuamOrder & withExchangeInfo(S &&exchangeInfo) noexcept
Changes the exchange-specific information of the order, or makes it null with std::nullopt.
Definition NuamOrder.hpp:773
NuamOrder & withEventSymbol(StringParam eventSymbol) override
Changes the event's symbol and returns the current Nuam order.
Definition NuamOrder.cpp:167
NuamOrder & withTimeNanos(std::int64_t timeNanos) noexcept override
Changes time of this Nuam order and returns it.
Definition NuamOrder.cpp:203
NuamOrder(StringParam eventSymbol)
Creates new Nuam order event with the specified event symbol.
Definition NuamOrder.cpp:164
NuamOrder & withCustomerInfo(StringParam customerInfo)
Changes the free-text information filled in by the client entering the transaction.
Definition NuamOrder.cpp:387
NuamOrder & withAction(const OrderAction &action) noexcept override
Changes an action of this Nuam order and returns it.
Definition NuamOrder.cpp:207
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition NuamOrder.hpp:169
NuamOrder & withTriggerPrice(double triggerPrice) noexcept
Changes the trigger price of the order.
Definition NuamOrder.cpp:467
NuamOrder & withEventFlags(const EventFlagsMask &eventFlags) noexcept override
Changes transactional event flags and returns the current Nuam order.
Definition NuamOrder.cpp:183
NuamOrder & withSequence(std::int32_t sequence) override
Changes sequence number of this Nuam order.
Definition NuamOrder.cpp:199
std::int32_t getTimeInForceData() const noexcept
Returns the additional data of the time in force, used for the time validities that require it.
Definition NuamOrder.cpp:431
void setTimeInForce(const NuamTimeInForceType &timeInForce) noexcept
Changes the time in force of this order, that is how long the order remains active in the order book ...
Definition NuamOrder.cpp:420
std::int32_t getOnBehalfOfSubmitterId() const noexcept
Returns the ID of the actor that submitted the order message on behalf of someone else.
Definition NuamOrder.cpp:313
NuamOrder & withScope(const Scope &scope) noexcept override
Changes scope of this Nuam order.
Definition NuamOrder.cpp:263
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition NuamOrder.cpp:153
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition NuamTimeAndSale.cpp:100
std::shared_ptr< NuamTimeAndSale > Ptr
The alias to a type of shared pointer to the NuamTimeAndSale object.
Definition NuamTimeAndSale.hpp:80
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition NuamTimeAndSale.cpp:45
NuamTimeAndSale(StringParam eventSymbol)
Creates new Nuam time and sale event with the specified event symbol.
Definition NuamTimeAndSale.cpp:111
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition NuamTimeAndSale.cpp:65
std::int64_t getMatchId() const noexcept
Returns the match ID, which uniquely identifies the match between the buyer and the seller associated...
Definition NuamTimeAndSale.cpp:114
void setMatchId(std::int64_t matchId) noexcept
Changes the match ID, which uniquely identifies the match between the buyer and the seller associated...
Definition NuamTimeAndSale.cpp:118
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition NuamTimeAndSale.hpp:86
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition NuamTimeAndSale.cpp:79
std::string toString() const override
Returns a string representation of the current object.
Definition NuamTimeAndSale.cpp:122
NuamTimeAndSale() noexcept
Creates new Nuam time and sale event with default values.
Definition NuamTimeAndSale.cpp:108
std::unique_ptr< NuamTimeAndSale > Unique
The alias to a type of unique pointer to the NuamTimeAndSale object.
Definition NuamTimeAndSale.hpp:83
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition NuamTrade.cpp:77
void setLastPriceForAll(double lastPriceForAll) noexcept
Changes price of the last trade (for all deals) reported by the exchange.
Definition NuamTrade.cpp:145
std::int32_t getNumberOfTrades() const noexcept
Returns number of trades reported by the exchange.
Definition NuamTrade.cpp:149
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition NuamTrade.hpp:93
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition NuamTrade.cpp:57
std::unique_ptr< NuamTrade > Unique
The alias to a type of unique pointer to the NuamTrade object.
Definition NuamTrade.hpp:90
double getLastSignificantPrice() const noexcept
Returns price of the last trade reported as significant by the exchange.
Definition NuamTrade.cpp:133
double getLastPriceForAll() const noexcept
Returns price of the last trade (for all deals) reported by the exchange.
Definition NuamTrade.cpp:141
std::string toString() const override
Returns a string representation of the current object.
Definition NuamTrade.cpp:165
std::shared_ptr< NuamTrade > Ptr
The alias to a type of shared pointer to the NuamTrade object.
Definition NuamTrade.hpp:87
void setTradeStatTime(std::int64_t tradeStatTime) noexcept
Changes time when trade statistics information was updated.
Definition NuamTrade.cpp:129
void setVWAP(double vwap) noexcept
Changes volume-weighted average price (VWAP) reported by the exchange.
Definition NuamTrade.cpp:161
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition NuamTrade.cpp:111
NuamTrade(StringParam eventSymbol)
Creates new Nuam trade event with the specified event symbol.
Definition NuamTrade.cpp:122
void setLastSignificantPrice(double lastSignificantPrice) noexcept
Changes price of the last trade reported as significant by the exchange.
Definition NuamTrade.cpp:137
double getVWAP() const noexcept
Returns volume-weighted average price (VWAP) reported by the exchange.
Definition NuamTrade.cpp:157
NuamTrade() noexcept
Creates new Nuam trade event with default values.
Definition NuamTrade.cpp:119
std::int64_t getTradeStatTime() const noexcept
Returns time when trade statistics information was updated.
Definition NuamTrade.cpp:125
void setNumberOfTrades(std::int32_t numberOfTrades) noexcept
Changes number of trades reported by the exchange.
Definition NuamTrade.cpp:153
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition NuamTrade.cpp:91
OptionSale & withOptionSymbol(StringParam optionSymbol)
Changes option symbol of this event.
Definition OptionSale.cpp:563
void setUnderlyingPrice(double underlyingPrice) noexcept
Changes underlying price at the time of this option sale event.
Definition OptionSale.cpp:509
bool isValidTick() const noexcept
Returns whether this event represents a valid intraday tick.
Definition OptionSale.cpp:465
void setAggressorSide(const Side &side) noexcept
Changes aggressor side of this option sale event.
Definition OptionSale.cpp:427
bool isSpreadLeg() const noexcept
Returns whether this event represents a spread leg.
Definition OptionSale.cpp:437
std::string getExchangeCodeString() const noexcept
Returns exchange code of this option sale as UTF8 string.
Definition OptionSale.cpp:302
void setEventFlags(std::int32_t eventFlags) noexcept override
Changes transactional event flags.
Definition OptionSale.cpp:185
OptionSale & withAskPrice(double askPrice) noexcept
Changes the current ask price on the market when this option sale event had occurred.
Definition OptionSale.cpp:378
std::int64_t getTimeSequence() const noexcept
Returns time and sequence of this event packaged into a single long value.
Definition OptionSale.cpp:219
static constexpr std::uint32_t MAX_SEQUENCE
Maximum allowed sequence value.
Definition OptionSale.hpp:110
const IndexedEventSource & getSource() const &noexcept override
Returns the source of this event.
Definition OptionSale.cpp:173
OptionSale & withValidTick(bool validTick) noexcept
Changes whether this event represents a valid intraday tick.
Definition OptionSale.cpp:473
OptionSale & withEventSymbol(StringParam eventSymbol)
Changes an event's symbol and returns the current option sale.
Definition OptionSale.cpp:161
std::int64_t getTime() const noexcept
Returns time of this event.
Definition OptionSale.cpp:233
OptionSale & withAggressorSide(const Side &side) noexcept
Changes aggressor side of this option sale event.
Definition OptionSale.cpp:431
OptionSale & withTimeNanoPart(std::int32_t timeNanoPart) noexcept
Changes microseconds and nanoseconds time part of this option sale.
Definition OptionSale.cpp:270
OptionSale & withExtendedTradingHours(bool extendedTradingHours) noexcept
Changes whether this event represents an extended trading hours sale.
Definition OptionSale.cpp:459
void setPrice(double price) noexcept
Changes price of this option sale event.
Definition OptionSale.cpp:332
OptionSale & withExchangeSaleConditions(S &&exchangeSaleConditions) noexcept
Changes the sale conditions, or makes it null with std::nullopt.
Definition OptionSale.hpp:550
bool isExtendedTradingHours() const noexcept
Returns whether this event represents an extended trading hours sale.
Definition OptionSale.cpp:451
void setVolatility(double volatility) noexcept
Changes Black-Scholes implied volatility of the option at the time of this option sale event.
Definition OptionSale.cpp:523
OptionSale() noexcept
Creates new option sale event with default values.
Definition OptionSale.cpp:155
std::string toString() const override
Returns a string representation of the current object.
Definition OptionSale.cpp:569
double getPrice() const noexcept
Returns price of this option sale event.
Definition OptionSale.cpp:328
OptionSale & withSize(double size) noexcept
Changes the size of this option sale event.
Definition OptionSale.cpp:350
OptionSale & withType(const TimeAndSaleType &type) noexcept
Changes the type of this option sale event.
Definition OptionSale.cpp:487
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition OptionSale.cpp:127
const std::string & getOptionSymbol() const &noexcept
Returns option symbol of this event.
Definition OptionSale.cpp:547
OptionSale & withEventFlags(std::int32_t eventFlags) noexcept
Changes transactional event flags and returns the current option sale.
Definition OptionSale.cpp:189
OptionSale & withDelta(double delta) noexcept
Changes option delta at the time of this option sale event.
Definition OptionSale.cpp:541
std::int16_t getExchangeCode() const noexcept
Returns exchange code of this option sale event.
Definition OptionSale.cpp:298
bool isNew() const noexcept
Returns whether this is a new event (not cancellation or correction).
Definition OptionSale.cpp:493
void setTradeThroughExempt(char tradeThroughExempt)
Changes TradeThroughExempt flag of this option sale event.
Definition OptionSale.cpp:411
OptionSale & withExchangeSaleConditions(StringParam exchangeSaleConditions)
Changes sale conditions provided for this event by data feed.
Definition OptionSale.cpp:400
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition OptionSale.cpp:147
void setExchangeSaleConditions(StringParam exchangeSaleConditions)
Changes sale conditions provided for this event by data feed.
Definition OptionSale.cpp:396
OptionSale & withPrice(double price) noexcept
Changes price of this option sale event.
Definition OptionSale.cpp:336
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition OptionSale.hpp:103
void setExchangeCode(char exchangeCode) noexcept
Changes exchange code of this option sale event.
Definition OptionSale.cpp:308
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition OptionSale.cpp:113
const std::optional< std::string > & getExchangeSaleConditionsOpt() const &noexcept
Returns sale conditions provided for this event by data feed.
Definition OptionSale.cpp:392
void setOptionSymbol(S &&optionSymbol) noexcept
Changes the option symbol of this event, or makes it null with std::nullopt.
Definition OptionSale.hpp:816
std::int64_t getTimeNanos() const noexcept
Returns time of the original event in nanoseconds.
Definition OptionSale.cpp:251
void setSize(double size) noexcept
Changes the size of this option sale event.
Definition OptionSale.cpp:346
void setSpreadLeg(bool spreadLeg) noexcept
Changes whether this event represents a spread leg.
Definition OptionSale.cpp:441
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition OptionSale.cpp:93
std::int32_t getTimeNanoPart() const noexcept
Returns microseconds and nanoseconds time part of the original event.
Definition OptionSale.cpp:276
void setExtendedTradingHours(bool extendedTradingHours) noexcept
Changes whether this event represents an extended trading hours sale.
Definition OptionSale.cpp:455
std::unique_ptr< OptionSale > Unique
The alias to a type of unique pointer to the OptionSale object.
Definition OptionSale.hpp:100
void setAskPrice(double askPrice) noexcept
Changes the current ask price on the market when this option sale event had occurred.
Definition OptionSale.cpp:374
std::int64_t getIndex() const noexcept override
Returns a unique per-symbol index of this event.
Definition OptionSale.cpp:205
void setValidTick(bool validTick) noexcept
Changes whether this event represents a valid intraday tick.
Definition OptionSale.cpp:469
OptionSale & withOptionSymbol(S &&optionSymbol) noexcept
Changes the option symbol of this event, or makes it null with std::nullopt.
Definition OptionSale.hpp:836
OptionSale & withVolatility(double volatility) noexcept
Changes Black-Scholes implied volatility of the option at the time of this option sale event.
Definition OptionSale.cpp:527
OptionSale & withBidPrice(double bidPrice) noexcept
Changes the current bid price on the market when this option sale event had occurred.
Definition OptionSale.cpp:364
const TimeAndSaleType & getType() const &noexcept
Returns the type of this option sale event.
Definition OptionSale.cpp:479
std::shared_ptr< OptionSale > Ptr
The alias to a type of shared pointer to the OptionSale object.
Definition OptionSale.hpp:97
std::int32_t getSequence() const noexcept
Returns the sequence number of this event to distinguish events that have the same time.
Definition OptionSale.cpp:280
void setBidPrice(double bidPrice) noexcept
Changes the current bid price on the market when this option sale event had occurred.
Definition OptionSale.cpp:360
void setExchangeSaleConditions(S &&exchangeSaleConditions) noexcept
Changes the sale conditions, or makes it null with std::nullopt.
Definition OptionSale.hpp:530
void setType(const TimeAndSaleType &type) noexcept
Changes the type of this option sale event.
Definition OptionSale.cpp:483
void setOptionSymbol(StringParam optionSymbol)
Changes option symbol of this event.
Definition OptionSale.cpp:559
const std::optional< std::string > & getOptionSymbolOpt() const &noexcept
Returns option symbol of this event.
Definition OptionSale.cpp:555
void setSequence(std::int32_t sequence)
Changes sequence number of this event.
Definition OptionSale.cpp:284
void setDelta(double delta) noexcept
Changes option delta at the time of this option sale event.
Definition OptionSale.cpp:537
OptionSale & withUnderlyingPrice(double underlyingPrice) noexcept
Changes underlying price at the time of this option sale event.
Definition OptionSale.cpp:513
bool isCancel() const noexcept
Returns whether this is a cancellation of a previous event.
Definition OptionSale.cpp:501
OptionSale & withExchangeCode(char exchangeCode) noexcept
Changes exchange code of this option sale event.
Definition OptionSale.cpp:312
const Side & getAggressorSide() const &noexcept
Returns the aggressor side of this option sale event.
Definition OptionSale.cpp:423
std::int32_t getEventFlags() const noexcept override
Returns transactional event flags.
Definition OptionSale.cpp:177
OptionSale & withSequence(std::int32_t sequence)
Changes sequence number of this event.
Definition OptionSale.cpp:292
const std::string & getExchangeSaleConditions() const &noexcept
Returns sale conditions provided for this event by data feed.
Definition OptionSale.cpp:384
char getTradeThroughExempt() const noexcept
Returns TradeThroughExempt flag of this option sale event.
Definition OptionSale.cpp:406
OptionSale & withTradeThroughExempt(char tradeThroughExempt)
Changes TradeThroughExempt flag of this option sale event.
Definition OptionSale.cpp:417
double getAskPrice() const noexcept
Returns the current ask price on the market when this option sale event had occurred.
Definition OptionSale.cpp:370
EventFlagsMask getEventFlagsMask() const noexcept override
Returns transactional event flags.
Definition OptionSale.cpp:181
double getVolatility() const noexcept
Returns Black-Scholes implied volatility of the option at the time of this option sale event.
Definition OptionSale.cpp:519
bool isCorrection() const noexcept
Returns whether this is a correction of a previous event.
Definition OptionSale.cpp:497
double getBidPrice() const noexcept
Returns the current bid price on the market when this option sale event had occurred.
Definition OptionSale.cpp:356
OptionSale & withEventFlags(const EventFlagsMask &eventFlags) noexcept
Changes transactional event flags and returns the current option sale.
Definition OptionSale.cpp:199
double getSize() const noexcept
Returns the size of this option sale event.
Definition OptionSale.cpp:342
OptionSale(StringParam eventSymbol)
Creates a new option sale event with the specified event symbol.
Definition OptionSale.cpp:158
void setTimeNanoPart(std::int32_t timeNanoPart) noexcept
Changes microseconds and nanoseconds time part of the original event.
Definition OptionSale.cpp:266
void setEventFlags(const EventFlagsMask &eventFlags) noexcept override
Changes transactional event flags.
Definition OptionSale.cpp:195
double getUnderlyingPrice() const noexcept
Returns the underlying price at the time of this option sale event.
Definition OptionSale.cpp:505
OptionSale & withSpreadLeg(bool spreadLeg) noexcept
Changes whether this event represents a spread leg.
Definition OptionSale.cpp:445
double getDelta() const noexcept
Return option delta at the time of this option sale event.
Definition OptionSale.cpp:533
Base class for common fields of Order, AnalyticOrder, and SpreadOrder events.
Definition OrderBase.hpp:83
void setPrice(double price) noexcept
Changes price of this order.
Definition OrderBase.cpp:218
void setTimeNanoPart(std::int32_t timeNanoPart) noexcept
Changes microseconds and nanoseconds time part of this order.
Definition OrderBase.cpp:152
void setSize(double size) noexcept
Changes size of this order.
Definition OrderBase.cpp:226
double getTradePrice() const noexcept
Returns trade price for events containing trade-related action.
Definition OrderBase.cpp:258
double getSize() const noexcept
Returns size of this order.
Definition OrderBase.cpp:222
void setIndex(std::int64_t index) override
Changes the unique per-symbol index of this order.
Definition OrderBase.cpp:120
std::int64_t getTime() const noexcept
Returns time of this order.
Definition OrderBase.cpp:140
std::int64_t getIndex() const noexcept override
Returns a unique per-symbol index of this order.
Definition OrderBase.cpp:128
std::int64_t getAuxOrderId() const noexcept
Returns auxiliary order ID if available:
Definition OrderBase.cpp:206
void setExchangeCode(char exchangeCode)
Changes exchange code of this order.
Definition OrderBase.cpp:287
void setSource(const OrderSource &source) noexcept
Changes source of this event.
Definition OrderBase.cpp:92
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition OrderBase.cpp:68
std::int64_t getTimeNanos() const noexcept
Returns time of this order in nanoseconds.
Definition OrderBase.cpp:173
void setOrderSide(const Side &side) noexcept
Changes side of this order.
Definition OrderBase.cpp:307
void setSequence(std::int32_t sequence)
Changes sequence number of this order.
Definition OrderBase.cpp:164
void setExchangeCode(std::int16_t exchangeCode)
Changes exchange code of this order.
Definition OrderBase.cpp:294
double getExecutedSize() const noexcept
Returns executed size of this order.
Definition OrderBase.cpp:234
void setOrderId(std::int64_t orderId) noexcept
Changes order ID.
Definition OrderBase.cpp:202
void setTradeId(std::int64_t tradeId) noexcept
Changes trade ID.
Definition OrderBase.cpp:254
void setTime(std::int64_t time) noexcept
Changes time of this order.
Definition OrderBase.cpp:145
std::string baseFieldsToString() const
Returns string representation of this order event's fields.
Definition OrderBase.cpp:319
void setTimeSequence(std::int64_t timeSequence) noexcept
Changes time and sequence of this order.
Definition OrderBase.cpp:136
const Side & getOrderSide() const &noexcept
Returns side of this order.
Definition OrderBase.cpp:303
void setScope(const Scope &scope) noexcept
Changes scope of this order.
Definition OrderBase.cpp:315
void setEventFlags(const EventFlagsMask &eventFlags) noexcept override
Changes transactional event flags.
Definition OrderBase.cpp:116
void setExecutedSize(double executedSize) noexcept
Changes executed size of this order.
Definition OrderBase.cpp:238
void setTimeNanos(std::int64_t timeNanos) noexcept
Changes time of this order.
Definition OrderBase.cpp:177
std::int64_t getCount() const noexcept
Returns the number of individual orders in this aggregate order.
Definition OrderBase.cpp:242
std::int16_t getExchangeCode() const noexcept
Returns exchange code of this order.
Definition OrderBase.cpp:274
std::string getExchangeCodeString() const noexcept
Returns exchange code of this order as UTF8 string.
Definition OrderBase.cpp:279
double getTradeSize() const noexcept
Returns trade size for events containing trade-related action.
Definition OrderBase.cpp:266
OrderBase() noexcept
Creates new order event with default values.
Definition OrderBase.cpp:76
std::int32_t getSequence() const noexcept
Returns sequence number of this order to distinguish orders that have the same time.
Definition OrderBase.cpp:160
std::int64_t getOrderId() const noexcept
Returns order ID if available.
Definition OrderBase.cpp:198
std::int32_t getTimeNanoPart() const noexcept
Returns microseconds and nanoseconds time part of this order.
Definition OrderBase.cpp:156
void setActionTime(std::int64_t actionTime) noexcept
Changes time of the last action.
Definition OrderBase.cpp:194
const OrderAction & getAction() const &noexcept
Returns order action if available, otherwise - OrderAction::UNDEFINED.
Definition OrderBase.cpp:182
void setTradeSize(double tradeSize) noexcept
Changes trade size.
Definition OrderBase.cpp:270
EventFlagsMask getEventFlagsMask() const noexcept override
Returns transactional event flags.
Definition OrderBase.cpp:108
double getPrice() const noexcept
Returns price of this order.
Definition OrderBase.cpp:214
static constexpr std::uint32_t MAX_SEQUENCE
Maximum allowed sequence value.
Definition OrderBase.hpp:171
void setEventFlags(std::int32_t eventFlags) noexcept override
Changes transactional event flags.
Definition OrderBase.cpp:112
void setAuxOrderId(std::int64_t auxOrderId) noexcept
Changes auxiliary order ID.
Definition OrderBase.cpp:210
const Scope & getScope() const &noexcept
Returns scope of this order.
Definition OrderBase.cpp:311
void setAction(const OrderAction &action) noexcept
Changes action of this order.
Definition OrderBase.cpp:186
const OrderSource & getSource() const &override
Returns source of this event.
Definition OrderBase.cpp:82
std::int32_t getEventFlags() const noexcept override
Returns transactional event flags.
Definition OrderBase.cpp:104
void setCount(std::int64_t count) noexcept
Changes the number of individual orders in this aggregate order.
Definition OrderBase.cpp:246
std::int64_t getActionTime() const noexcept
Returns time of the last action.
Definition OrderBase.cpp:190
OrderBase(StringParam eventSymbol)
Creates a new order event with the specified event symbol.
Definition OrderBase.cpp:79
bool hasSize() const noexcept
Returns true if this order has some size (sizeAsDouble is neither 0 nor NaN).
Definition OrderBase.cpp:230
std::int64_t getTradeId() const noexcept
Returns trade (order execution) ID for events containing trade-related action.
Definition OrderBase.cpp:250
std::int64_t getTimeSequence() const noexcept
Returns time and sequence of this order packaged into a single long value.
Definition OrderBase.cpp:132
void setTradePrice(double tradePrice) noexcept
Changes trade price.
Definition OrderBase.cpp:262
void setRefPrice(double refPrice) noexcept
Changes the reference price.
Definition OrderImbalance.cpp:220
OrderImbalance & withRefPrice(double refPrice) noexcept
Changes the reference price.
Definition OrderImbalance.cpp:224
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition OrderImbalance.cpp:72
const ImbalanceSide & getImbalanceSide() const &noexcept
Returns the imbalance side.
Definition OrderImbalance.cpp:286
OrderImbalance(StringParam eventSymbol)
Creates a new order imbalance event with the specified event symbol.
Definition OrderImbalance.cpp:137
void setFarPrice(double farPrice) noexcept
Changes the far price.
Definition OrderImbalance.cpp:276
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition OrderImbalance.hpp:111
OrderImbalance() noexcept
Creates new order imbalance event with default values.
Definition OrderImbalance.cpp:134
OrderImbalance & withEventSymbol(StringParam eventSymbol)
Changes an event's symbol and returns the current order imbalance.
Definition OrderImbalance.cpp:140
std::int64_t getTimeSequence() const noexcept
Returns time and sequence of the order imbalance packaged into a single long value.
Definition OrderImbalance.cpp:166
OrderImbalance & withAuctionType(const AuctionType &type) noexcept
Changes the auction type.
Definition OrderImbalance.cpp:308
void setSource(const OrderSource &source) noexcept
Changes source of this event.
Definition OrderImbalance.cpp:156
double getNearPrice() const noexcept
Returns the near price.
Definition OrderImbalance.cpp:258
void setPairedSize(double pairedSize) noexcept
Changes the paired size.
Definition OrderImbalance.cpp:234
OrderImbalance & withPairedSize(double pairedSize) noexcept
Changes the paired size.
Definition OrderImbalance.cpp:238
OrderImbalance & withSequence(std::int32_t sequence)
Changes sequence number of this event.
Definition OrderImbalance.cpp:210
void setImbalanceSize(double imbalanceSize) noexcept
Changes the imbalance size.
Definition OrderImbalance.cpp:248
double getFarPrice() const noexcept
Returns the far price.
Definition OrderImbalance.cpp:272
OrderImbalance & withFarPrice(double farPrice) noexcept
Changes the far price.
Definition OrderImbalance.cpp:280
void setSequence(std::int32_t sequence)
Changes sequence number of this event.
Definition OrderImbalance.cpp:202
static constexpr std::uint32_t MAX_SEQUENCE
Maximum allowed sequence value.
Definition OrderImbalance.hpp:118
OrderImbalance & withNearPrice(double nearPrice) noexcept
Changes the near price.
Definition OrderImbalance.cpp:266
const AuctionType & getAuctionType() const &noexcept
Returns the auction type.
Definition OrderImbalance.cpp:300
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition OrderImbalance.cpp:92
double getPairedSize() const noexcept
Returns the paired size.
Definition OrderImbalance.cpp:230
std::unique_ptr< OrderImbalance > Unique
The alias to a type of unique pointer to the OrderImbalance object.
Definition OrderImbalance.hpp:108
void setImbalanceSide(const ImbalanceSide &side) noexcept
Changes the imbalance side.
Definition OrderImbalance.cpp:290
std::int64_t getTime() const noexcept
Returns time of the order imbalance event.
Definition OrderImbalance.cpp:180
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition OrderImbalance.cpp:126
const OrderSource & getSource() const &
Returns source of this event.
Definition OrderImbalance.cpp:152
std::string toString() const override
Returns a string representation of the current object.
Definition OrderImbalance.cpp:314
OrderImbalance & withImbalanceSize(double imbalanceSize) noexcept
Changes the imbalance size.
Definition OrderImbalance.cpp:252
double getImbalanceSize() const noexcept
Returns the imbalance size.
Definition OrderImbalance.cpp:244
void setAuctionType(const AuctionType &type) noexcept
Changes the auction type.
Definition OrderImbalance.cpp:304
void setNearPrice(double nearPrice) noexcept
Changes the near price.
Definition OrderImbalance.cpp:262
OrderImbalance & withSource(const OrderSource &source) noexcept
Changes source of this event.
Definition OrderImbalance.cpp:160
std::int32_t getSequence() const noexcept
Returns sequence number of this event to distinguish order imbalance events that have the same time.
Definition OrderImbalance.cpp:198
double getRefPrice() const noexcept
Returns the reference price.
Definition OrderImbalance.cpp:216
OrderImbalance & withImbalanceSide(const ImbalanceSide &side) noexcept
Changes the imbalance side.
Definition OrderImbalance.cpp:294
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition OrderImbalance.cpp:106
std::shared_ptr< OrderImbalance > Ptr
The alias to a type of shared pointer to the OrderImbalance object.
Definition OrderImbalance.hpp:105
static const OrderSource EDX
EDX Exchange.
Definition OrderSource.hpp:572
static const OrderSource ABE
ABE (abe.io) exchange.
Definition OrderSource.hpp:388
static const OrderSource smfe
Small Exchange.
Definition OrderSource.hpp:468
static const OrderSource glbx
CME Globex.
Definition OrderSource.hpp:412
static const OrderSource BZX
Bats BZX Exchange.
Definition OrderSource.hpp:324
static const OrderSource BYX
Bats BYX Exchange.
Definition OrderSource.hpp:316
static const OrderSource OCEA
Blue Ocean Technologies Alternative Trading System.
Definition OrderSource.hpp:500
static std::span< const std::reference_wrapper< const OrderSource > > publishable(const EventTypeEnum &eventType)
Returns a list of the publishable order sources for the given event type: the sources whose isPublish...
Definition OrderSource.cpp:406
static const OrderSource bzx
Bats BZX Exchange.
Definition OrderSource.hpp:332
static const OrderSource & valueOf(std::int32_t sourceId)
Returns order source for the specified source identifier.
Definition OrderSource.cpp:369
static const OrderSource COMPOSITE_ASK
Ask side of a composite Quote.
Definition OrderSource.hpp:153
static const OrderSource COMPOSITE
Composite Quote.
Definition OrderSource.hpp:198
OrderSource(const OrderSource &other) noexcept
Creates a copy of the order source.
Definition OrderSource.cpp:287
static const OrderSource CEUX
Bats Europe DXE Exchange.
Definition OrderSource.hpp:356
static const OrderSource FAIR
FAIR (FairX) exchange.
Definition OrderSource.hpp:396
static const OrderSource nuam
Nuam Exchange Gate.
Definition OrderSource.hpp:596
static const OrderSource NEO
CBOE NEO book.
Definition OrderSource.hpp:652
static const OrderSource CFE
CBOE Futures Exchange.
Definition OrderSource.hpp:444
static const OrderSource DEX
Direct-Edge EDGX Exchange.
Definition OrderSource.hpp:299
static const OrderSource pink
Pink Sheets.
Definition OrderSource.hpp:516
static const OrderSource CHIX
Bats Europe CXE Exchange.
Definition OrderSource.hpp:348
static const OrderSource CEDX
Cboe European Derivatives.
Definition OrderSource.hpp:540
static const OrderSource xeur
Eurex Exchange.
Definition OrderSource.hpp:436
static const OrderSource REGIONAL_ASK
Ask side of a regional Quote.
Definition OrderSource.hpp:171
static const OrderSource ISE
International Securities Exchange.
Definition OrderSource.hpp:283
static const OrderSource BOSS
Bruce book.
Definition OrderSource.hpp:636
OrderSource & operator=(const OrderSource &other) noexcept=default
Copies the order source.
static const OrderSource ntv
NASDAQ Total View.
Definition OrderSource.hpp:243
static const OrderSource neo
CBOE NEO book.
Definition OrderSource.hpp:660
static const OrderSource dex
Direct-Edge EDGX Exchange.
Definition OrderSource.hpp:308
static const OrderSource SMFE
Small Exchange.
Definition OrderSource.hpp:460
static const OrderSource memx
Members Exchange.
Definition OrderSource.hpp:492
static const OrderSource otcm
OTC Overnight.
Definition OrderSource.hpp:628
static const OrderSource ESPD
NASDAQ eSpeed.
Definition OrderSource.hpp:259
static const OrderSource OTCM
OTC Overnight.
Definition OrderSource.hpp:620
static const OrderSource boss
Bruce book.
Definition OrderSource.hpp:644
static const OrderSource GLBX
CME Globex.
Definition OrderSource.hpp:404
static const OrderSource IGC
IG CFDs Gate.
Definition OrderSource.hpp:556
static const OrderSource NTV
NASDAQ Total View.
Definition OrderSource.hpp:235
static const OrderSource REGIONAL_BID
Bid side of a regional Quote.
Definition OrderSource.hpp:162
static const OrderSource BI20
Borsa Istanbul Exchange.
Definition OrderSource.hpp:380
static const OrderSource arca
NYSE Arca traded securities.
Definition OrderSource.hpp:532
static const OrderSource BATE
Bats Europe BXE Exchange.
Definition OrderSource.hpp:340
static const OrderSource ocea
Blue Ocean Technologies Alternative Trading System.
Definition OrderSource.hpp:507
static std::span< const std::reference_wrapper< const OrderSource > > fullOrderBook()
Returns a list of the publishable order sources that support Full Order Book, in the order of their d...
Definition OrderSource.cpp:410
static const OrderSource ARCA
NYSE Arca traded securities.
Definition OrderSource.hpp:524
static const OrderSource DEFAULT
Default source for publishing custom order books.
Definition OrderSource.hpp:227
static const OrderSource igc
IG CFDs Gate.
Definition OrderSource.hpp:564
static const OrderSource ERIS
Eris Exchange group of companies.
Definition OrderSource.hpp:420
static const OrderSource AGGREGATE_BID
Bid side of an aggregate order book (futures depth and NASDAQ Level II).
Definition OrderSource.hpp:179
static const OrderSource NUAM
Nuam Exchange Gate.
Definition OrderSource.hpp:588
static const OrderSource XNFI
NASDAQ Fixed Income.
Definition OrderSource.hpp:267
static bool isSpecialSourceId(std::int32_t sourceId) noexcept
Determines whether the specified source identifier refers to a special order source.
Definition OrderSource.cpp:365
static const OrderSource C2OX
CBOE Options C2 Exchange.
Definition OrderSource.hpp:452
static const OrderSource moon
MOON ATS.
Definition OrderSource.hpp:612
static const OrderSource cedx
Cboe European Derivatives.
Definition OrderSource.hpp:548
static const OrderSource NFX
NASDAQ Futures Exchange.
Definition OrderSource.hpp:251
static const ConstantMap< std::variant< std::int32_t, std::string_view >, OrderSource > PREDEFINED_SOURCES
The predefined sources by identifier and by name.
Definition OrderSource.hpp:265
static const OrderSource edx
EDX Exchange.
Definition OrderSource.hpp:580
static const OrderSource AGGREGATE
Aggregate order book (futures depth and NASDAQ Level II).
Definition OrderSource.hpp:219
static const OrderSource REGIONAL
Regional Quote.
Definition OrderSource.hpp:209
static const OrderSource MOON
MOON ATS.
Definition OrderSource.hpp:604
static const OrderSource COMPOSITE_BID
Bid side of a composite Quote.
Definition OrderSource.hpp:144
static const OrderSource DEA
Direct-Edge EDGA Exchange.
Definition OrderSource.hpp:291
static const OrderSource ICE
Intercontinental Exchange.
Definition OrderSource.hpp:275
bool isFullOrderBook() const noexcept
Returns true if this source supports Full Order Book.
Definition OrderSource.cpp:418
static const OrderSource BXTR
Bats Europe TRF.
Definition OrderSource.hpp:364
static const OrderSource AGGREGATE_ASK
Ask side of an aggregate order book (futures depth and NASDAQ Level II).
Definition OrderSource.hpp:187
static const OrderSource IST
Borsa Istanbul Exchange.
Definition OrderSource.hpp:372
static const OrderSource iex
Investors exchange.
Definition OrderSource.hpp:476
static const OrderSource MEMX
Members Exchange.
Definition OrderSource.hpp:484
static const OrderSource XEUR
Eurex Exchange.
Definition OrderSource.hpp:428
bool isPublishable(const EventTypeEnum &eventType) const
Returns true if the events of the given type can be directly published with this source.
Definition OrderSource.cpp:414
Order event is a snapshot for a full available market depth for a symbol.
Definition Order.hpp:100
std::shared_ptr< Order > Ptr
The alias to a type of shared pointer to the Order object.
Definition Order.hpp:116
void setMarketMaker(S &&marketMaker) noexcept
Changes the market maker or the other aggregate identifier of this order, or makes it null with std::...
Definition Order.hpp:426
virtual Order & withTradeSize(double tradeSize) noexcept
Changes trade size.
Definition Order.cpp:242
virtual Order & withSequence(std::int32_t sequence)
Changes sequence number of this order.
Definition Order.cpp:170
virtual Order & withTimeNanos(std::int64_t timeNanos) noexcept
Changes time of this order and returns it.
Definition Order.cpp:176
virtual Order & withMarketMaker(StringParam marketMaker)
Changes market maker or other aggregate identifier of this order.
Definition Order.cpp:288
virtual Order & withTime(std::int64_t time) noexcept
Changes time of this order and returns it.
Definition Order.cpp:158
void setMarketMaker(StringParam marketMaker)
Changes market maker or other aggregate identifier of this order.
Definition Order.cpp:284
virtual Order & withIndex(std::int64_t index)
Changes the unique per-symbol index of this order and returns it.
Definition Order.cpp:152
virtual Order & withOrderId(std::int64_t orderId) noexcept
Changes order ID.
Definition Order.cpp:194
virtual Order & withSource(const OrderSource &source) noexcept
Changes an event's source and returns the current order.
Definition Order.cpp:134
const std::string & getMarketMaker() const &noexcept
Returns market maker or other aggregate identifier of this order.
Definition Order.cpp:272
virtual Order & withEventFlags(std::int32_t eventFlags) noexcept
Changes transactional event flags and returns the current order.
Definition Order.cpp:140
Order(StringParam eventSymbol)
Creates a new order event with the specified event symbol.
Definition Order.cpp:119
virtual Order & withExchangeCode(std::int16_t exchangeCode)
Changes exchange code of this order.
Definition Order.cpp:254
virtual Order & withScope(const Scope &scope) noexcept
Changes scope of this order.
Definition Order.cpp:266
virtual Order & withExecutedSize(double executedSize) noexcept
Changes executed size of this order.
Definition Order.cpp:218
virtual Order & withEventFlags(const EventFlagsMask &eventFlags) noexcept
Changes transactional event flags and returns the current order.
Definition Order.cpp:146
virtual Order & withAction(const OrderAction &action) noexcept
Changes the action of this order and returns it.
Definition Order.cpp:182
Order & withMarketMaker(S &&marketMaker) noexcept
Changes the market maker or the other aggregate identifier of this order, or makes it null with std::...
Definition Order.hpp:446
virtual Order & withTimeNanoPart(std::int32_t timeNanoPart) noexcept
Changes microseconds and nanoseconds time part of this order.
Definition Order.cpp:164
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition Order.cpp:108
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition Order.cpp:76
virtual Order & withEventSymbol(StringParam eventSymbol)
Changes an event's symbol and returns the current order.
Definition Order.cpp:122
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition Order.cpp:90
virtual Order & withSize(double size) noexcept
Changes size of this order.
Definition Order.cpp:212
virtual Order & withPrice(double price) noexcept
Changes price of this order.
Definition Order.cpp:206
std::string toString() const override
Returns a string representation of the current object.
Definition Order.cpp:294
virtual Order & withAuxOrderId(std::int64_t auxOrderId) noexcept
Changes auxiliary order ID.
Definition Order.cpp:200
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition Order.cpp:56
Order() noexcept
Creates new order event with default values.
Definition Order.cpp:116
virtual Order & withOrderSide(const Side &side) noexcept
Changes side of this order.
Definition Order.cpp:260
virtual Order & withEventTime(std::int64_t eventTime) noexcept
Changes the event's creation time and returns the current order.
Definition Order.cpp:128
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition Order.hpp:122
virtual Order & withCount(std::int64_t count) noexcept
Changes the number of individual orders in this aggregate order.
Definition Order.cpp:224
virtual Order & withTradeId(std::int64_t tradeId) noexcept
Changes trade ID.
Definition Order.cpp:230
virtual Order & withTradePrice(double tradePrice) noexcept
Changes trade price.
Definition Order.cpp:236
virtual Order & withExchangeCode(char exchangeCode)
Changes exchange code of this order.
Definition Order.cpp:248
virtual Order & withActionTime(std::int64_t actionTime) noexcept
Changes time of the last action and returns the current order.
Definition Order.cpp:188
const std::optional< std::string > & getMarketMakerOpt() const &noexcept
Returns market maker or other aggregate identifier of this order.
Definition Order.cpp:280
Time and Sale represents a trade or other market event with price, like market open/close price,...
Definition TimeAndSale.hpp:61
const TimeAndSaleType & getType() const &noexcept
Returns type of this time and sale event.
Definition TimeAndSale.cpp:336
void setExchangeCode(char exchangeCode) noexcept
Changes exchange code of this time and sale event.
Definition TimeAndSale.cpp:19
std::string getExchangeCodeString() const noexcept
Returns exchange code of this time and sale event as UTF8 string.
Definition TimeAndSale.cpp:228
void setBidPrice(double bidPrice) noexcept
Changes the current bid price on the market when this time and sale event had occurred.
Definition TimeAndSale.cpp:266
std::int64_t getTime() const noexcept override
Returns the timestamp of the event in milliseconds.
Definition TimeAndSale.cpp:185
bool isNew() const noexcept
Returns whether this is a new event (not cancellation or correction).
Definition TimeAndSale.cpp:344
void setSequence(std::int32_t sequence)
Changes sequence number of this event.
Definition TimeAndSale.cpp:216
std::int64_t getIndex() const noexcept override
Returns a unique per-symbol index of this event.
Definition TimeAndSale.cpp:177
double getBidPrice() const noexcept
Returns the current bid price on the market when this time and sale event had occurred.
Definition TimeAndSale.cpp:262
double getAskPrice() const noexcept
Returns the current ask price on the market when this time and sale event had occurred.
Definition TimeAndSale.cpp:270
const std::string & getExchangeSaleConditions() const &noexcept
Returns sale conditions provided for this event by data feed.
Definition TimeAndSale.cpp:278
void setValidTick(bool validTick) noexcept
Changes whether this event represents a valid intraday tick.
Definition TimeAndSale.cpp:332
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition TimeAndSale.cpp:91
bool isValidTick() const noexcept
Returns whether this event represents a valid intraday tick.
Definition TimeAndSale.cpp:328
TimeAndSale() noexcept
Creates new time and sale event with default values.
Definition TimeAndSale.cpp:151
void setAskPrice(double askPrice) noexcept
Changes price of this time and sale event.the current ask price on the market when this time and sale...
Definition TimeAndSale.cpp:274
std::string baseFieldsToString() const
Returns a string representation of the fields of this event, without the class name and the braces.
Definition TimeAndSale.cpp:388
std::int64_t getTradeId() const noexcept
Returns trade ID of this time and sale event.
Definition TimeAndSale.cpp:238
void setTimeNanoPart(std::int32_t timeNanoPart) noexcept
Changes microseconds and nanoseconds time part of the original event.
Definition TimeAndSale.cpp:204
void setExtendedTradingHours(bool extendedTradingHours) noexcept
Changes whether this event represents an extended trading hours sale.
Definition TimeAndSale.cpp:324
bool isExtendedTradingHours() const noexcept
Returns whether this event represents an extended trading hours sale.
Definition TimeAndSale.cpp:320
double getSize() const noexcept
Returns size of this time and sale event.
Definition TimeAndSale.cpp:254
std::int32_t getSequence() const noexcept
Returns the sequence number of this event to distinguish events that have the same time.
Definition TimeAndSale.cpp:212
std::string toString() const override
Returns a string representation of the current object.
Definition TimeAndSale.cpp:403
void setAggressorSide(const Side &side) noexcept
Changes aggressor side of this time and sale event.
Definition TimeAndSale.cpp:308
void setEventFlags(const EventFlagsMask &eventFlags) noexcept override
Changes transactional event flags.
Definition TimeAndSale.cpp:173
void setEventFlags(std::int32_t eventFlags) noexcept override
Changes transactional event flags.
Definition TimeAndSale.cpp:169
void setSize(double size) noexcept
Changes size of this time and sale event.
Definition TimeAndSale.cpp:258
const IndexedEventSource & getSource() const &noexcept override
Returns the source of this event.
Definition TimeAndSale.cpp:157
static constexpr std::uint32_t MAX_SEQUENCE
Maximum allowed sequence value.
Definition TimeAndSale.hpp:150
std::int64_t getTimeNanos() const noexcept
Returns time of the original event in nanoseconds.
Definition TimeAndSale.cpp:195
const std::optional< std::string > & getSellerOpt() const &noexcept
Returns seller of this time and sale event.
Definition TimeAndSale.cpp:380
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition TimeAndSale.cpp:110
bool isCancel() const noexcept
Returns whether this is a cancellation of a previous event.
Definition TimeAndSale.cpp:352
const std::optional< std::string > & getBuyerOpt() const &noexcept
Returns buyer of this time and sale event.
Definition TimeAndSale.cpp:364
void setPrice(double price) noexcept
Changes price of this time and sale event.
Definition TimeAndSale.cpp:250
bool isCorrection() const noexcept
Returns whether this is a correction of a previous event.
Definition TimeAndSale.cpp:348
void setSpreadLeg(bool spreadLeg) noexcept
Changes whether this event represents a spread leg.
Definition TimeAndSale.cpp:316
std::int32_t getTimeNanoPart() const noexcept
Returns microseconds and nanoseconds time part of the original event.
Definition TimeAndSale.cpp:208
std::int32_t getEventFlags() const noexcept override
Returns transactional event flags.
Definition TimeAndSale.cpp:161
double getPrice() const noexcept
Returns price of this time and sale event.
Definition TimeAndSale.cpp:246
const std::string & getSeller() const &noexcept
Returns seller of this time and sale event.
Definition TimeAndSale.cpp:372
void setExchangeSaleConditions(S &&exchangeSaleConditions) noexcept
Changes the sale conditions, or makes it null with std::nullopt.
Definition TimeAndSale.hpp:419
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition TimeAndSale.cpp:124
const std::string & getBuyer() const &noexcept
Returns buyer of this time and sale event.
Definition TimeAndSale.cpp:356
void setType(const TimeAndSaleType &type) noexcept
Changes type of this time and sale event.
Definition TimeAndSale.cpp:340
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition TimeAndSale.hpp:143
std::int16_t getExchangeCode() const noexcept
Returns exchange code of this time and sale event.
Definition TimeAndSale.cpp:224
char getTradeThroughExempt() const noexcept
Returns TradeThroughExempt flag of this time and sale event.
Definition TimeAndSale.cpp:294
void setBuyer(S &&buyer) noexcept
Changes the buyer of this time and sale event, or makes it null with std::nullopt.
Definition TimeAndSale.hpp:559
void setSeller(S &&seller) noexcept
Changes the seller of this time and sale event, or makes it null with std::nullopt.
Definition TimeAndSale.hpp:590
std::shared_ptr< TimeAndSale > Ptr
The alias to a type of shared pointer to the TimeAndSale object.
Definition TimeAndSale.hpp:137
const std::optional< std::string > & getExchangeSaleConditionsOpt() const &noexcept
Returns sale conditions provided for this event by data feed.
Definition TimeAndSale.cpp:286
bool isSpreadLeg() const noexcept
Returns whether this event represents a spread leg.
Definition TimeAndSale.cpp:312
EventFlagsMask getEventFlagsMask() const noexcept override
Returns transactional event flags.
Definition TimeAndSale.cpp:165
const Side & getAggressorSide() const &noexcept
Returns aggressor side of this time and sale event.
Definition TimeAndSale.cpp:304
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition TimeAndSale.cpp:143
void setTradeThroughExempt(char tradeThroughExempt)
Changes TradeThroughExempt flag of this time and sale event.
Definition TimeAndSale.cpp:298
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition TimeSeriesSubscriptionSymbol.cpp:21
std::string toString() const override
Returns string representation of this time-series subscription symbol.
Definition TimeSeriesSubscriptionSymbol.cpp:68
std::int64_t getFromTime() const
Returns the subscription time.
Definition TimeSeriesSubscriptionSymbol.cpp:17
static TimeSeriesSubscriptionSymbol fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure (rec...
Definition TimeSeriesSubscriptionSymbol.cpp:52
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition TimeSeriesSubscriptionSymbol.cpp:35
Base class for common fields of Trade and TradeETH events.
Definition TradeBase.hpp:41
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition TradeBase.cpp:63
void setSequence(std::int32_t sequence)
Changes sequence number of the last trade.
Definition TradeBase.cpp:119
double getChange() const noexcept
Returns change of the last trade.
Definition TradeBase.cpp:210
void setChange(double change) noexcept
Changes change of the last trade.
Definition TradeBase.cpp:214
void setDayId(std::int32_t dayId) noexcept
Changes identifier of the current trading day.
Definition TradeBase.cpp:174
std::string baseFieldsToString() const
Returns string representation of this trade event's fields.
Definition TradeBase.cpp:218
std::int64_t getTime() const noexcept
Returns time of the last trade.
Definition TradeBase.cpp:85
std::int32_t getDayId() const noexcept
Returns identifier of the current trading day.
Definition TradeBase.cpp:170
double getSize() const noexcept
Returns size of the last trade as floating number with fractions.
Definition TradeBase.cpp:162
std::int16_t getExchangeCode() const noexcept
Returns exchange code of the last trade.
Definition TradeBase.cpp:128
std::int32_t getSequence() const noexcept
Returns sequence number of the last trade to distinguish trades that have the same time.
Definition TradeBase.cpp:115
void setTickDirection(const Direction &direction) noexcept
Changes tick direction of the last trade.
Definition TradeBase.cpp:198
static constexpr std::uint32_t MAX_SEQUENCE
Maximum allowed sequence value.
Definition TradeBase.hpp:88
double getDayTurnover() const noexcept
Returns total turnover traded for a day.
Definition TradeBase.cpp:186
void setDayTurnover(double dayTurnover) noexcept
Changes total turnover traded for a day.
Definition TradeBase.cpp:190
void setSize(double size) noexcept
Changes size of the last trade as floating number with fractions.
Definition TradeBase.cpp:166
void setTimeNanoPart(std::int32_t timeNanoPart) noexcept
Changes microseconds and nanoseconds time part of the last trade.
Definition TradeBase.cpp:107
std::int64_t getTimeSequence() const noexcept
Returns time and sequence of the last trade packaged into a single long value.
Definition TradeBase.cpp:77
bool isExtendedTradingHours() const noexcept
Returns whether last trade was in extended trading hours.
Definition TradeBase.cpp:202
const Direction & getTickDirection() const &noexcept
Returns tick direction of the last trade.
Definition TradeBase.cpp:194
double getDayVolume() const noexcept
Returns total volume traded for a day as floating number with fractions.
Definition TradeBase.cpp:178
void setExchangeCode(char exchangeCode) noexcept
Changes exchange code of the last trade.
Definition TradeBase.cpp:138
std::int64_t getTradeId() const noexcept
Returns trade ID of the last trade.
Definition TradeBase.cpp:146
double getPrice() const noexcept
Returns price of the last trade.
Definition TradeBase.cpp:154
std::string getExchangeCodeString() const noexcept
Returns exchange code of last trade as UTF8 string.
Definition TradeBase.cpp:132
void setPrice(double price) noexcept
Changes price of the last trade.
Definition TradeBase.cpp:158
std::int32_t getTimeNanoPart() const noexcept
Returns microseconds and nanoseconds time part of the last trade.
Definition TradeBase.cpp:111
TradeBase() noexcept
Creates new trade event with default values.
Definition TradeBase.cpp:71
void setExtendedTradingHours(bool extendedTradingHours) noexcept
Changes whether last trade was in extended trading hours.
Definition TradeBase.cpp:206
std::int64_t getTimeNanos() const noexcept
Returns time of the last trade in nanoseconds.
Definition TradeBase.cpp:98
void setDayVolume(double dayVolume) noexcept
Changes total volume traded for a day as floating number with fractions.
Definition TradeBase.cpp:182
Trade event is a snapshot of the price and size of the last trade during regular trading hours and an...
Definition Trade.hpp:76
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition Trade.cpp:88
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition Trade.hpp:91
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition Trade.cpp:70
Trade(StringParam eventSymbol)
Creates a new trade event with the specified event symbol.
Definition Trade.cpp:95
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition Trade.cpp:39
std::string toString() const override
Returns a string representation of the current object.
Definition Trade.cpp:98
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition Trade.cpp:57
Trade() noexcept
Creates new trade event with default values.
Definition Trade.cpp:92
std::shared_ptr< Trade > Ptr
The alias to a type of shared pointer to the Trade object.
Definition Trade.hpp:85
std::variant< CandleExchange, CandlePrice, CandleSession, CandlePeriod, CandleAlignment, CandlePriceLevel, CandleDataType > CandleSymbolAttributeVariant
The common "variant" type for the candle attribute types.
Definition CandleSymbol.hpp:125
DXFCPP_END_NAMESPACE dxfcpp::EventFlagsMask operator|(const dxfcpp::EventFlag &eventFlag1, const dxfcpp::EventFlag &eventFlag2) noexcept
Performs a bit or operation with two event flags.
Definition EventFlag.hpp:490
SessionTypeEnum
The codes of the session types.
Definition SessionType.hpp:26
SessionFilterEnum
The codes of the predefined session filters.
Definition SessionFilter.hpp:28
@ NO_TRADING
Non-trading session type is used to mark periods of time during which trading is not allowed.
Definition SessionType.hpp:28
@ REGULAR
Regular session type marks regular trading hours session.
Definition SessionType.hpp:32
@ AFTER_MARKET
After-market session type marks extended trading session after regular trading hours.
Definition SessionType.hpp:34
@ PRE_MARKET
Pre-market session type marks extended trading session before regular trading hours.
Definition SessionType.hpp:30
@ NO_TRADING
Accepts any session with type SessionType::NO_TRADING.
Definition SessionFilter.hpp:37
@ REGULAR
Accepts any session with type SessionType::REGULAR.
Definition SessionFilter.hpp:41
@ ANY
Accepts any session - useful for pure schedule navigation.
Definition SessionFilter.hpp:30
@ AFTER_MARKET
Accepts any session with type SessionType::AFTER_MARKET.
Definition SessionFilter.hpp:43
@ TRADING
Accepts trading sessions only - those with (Session::isTrading() == true).
Definition SessionFilter.hpp:32
@ PRE_MARKET
Accepts any session with type SessionType::PRE_MARKET.
Definition SessionFilter.hpp:39
@ NON_TRADING
Accepts non-trading sessions only - those with (Session::isTrading() == false).
Definition SessionFilter.hpp:34
DXFCPP_EXPORT std::string toString(double d)
Converts a double value to a string in the format of Java Double.toString: the shortest decimal repre...
The AuthToken class represents an authorization token and encapsulates information about the authoriz...
Definition AuthToken.hpp:41
std::string getScheme() const
Returns the authentication scheme.
Definition AuthToken.cpp:81
static constexpr char BEARER_SCHEME[]
String representation for the Bearer (token) authorization.
Definition AuthToken.hpp:46
static AuthToken createBasicToken(StringParam user, StringParam password)
Constructs an AuthToken with the specified username and password per RFC2617.
Definition AuthToken.cpp:25
static AuthToken createBearerTokenOrNull(StringParam token)
Constructs an AuthToken with the specified bearer token per RFC6750.
Definition AuthToken.cpp:43
std::string getPassword() const
Returns the password or dxfcpp::String::NUL (std::string{"<null>"}) if it is not known or applicable.
Definition AuthToken.cpp:73
static AuthToken createBasicTokenOrNull(StringParam user, StringParam password)
Constructs an AuthToken with the specified username and password per RFC2617.
Definition AuthToken.cpp:29
static const AuthToken NULL_TOKEN
A stub that is needed to simulate null AuthToken without using std::optional.
Definition AuthToken.hpp:15
static AuthToken valueOf(StringParam string)
Constructs an AuthToken from the specified string.
Definition AuthToken.cpp:17
std::string getHttpAuthorization() const
Returns the HTTP authorization header value.
Definition AuthToken.cpp:57
static AuthToken createBearerToken(StringParam token)
Constructs an AuthToken with the specified bearer token per RFC6750.
Definition AuthToken.cpp:39
static AuthToken createBasicToken(StringParam userPassword)
Constructs an AuthToken with the specified username and password per RFC2617.
Definition AuthToken.cpp:21
static AuthToken createCustomToken(StringParam scheme, StringParam value)
Constructs an AuthToken with a custom scheme and value.
Definition AuthToken.cpp:53
std::string getValue() const
Returns the access token for RFC6750 or the Base64-encoded "username:password" for RFC2617.
Definition AuthToken.cpp:89
static constexpr char BASIC_SCHEME[]
String representation for Basic (Base64(login:password)) authorization.
Definition AuthToken.hpp:43
std::string getUser() const
Returns the username or dxfcpp::String::NUL (std::string{"<null>"}) if it is not known or applicable.
Definition AuthToken.cpp:65
static const CandleAlignment SESSION
Align candles on trading sessions.
Definition CandleAlignment.hpp:37
static const std::span< const std::reference_wrapper< const CandleAlignment > > VALUES
All elements (constant-initialized, so the initializers of global variables can use it).
Definition CandleAlignment.hpp:47
std::string toString() const
Returns string representation of this candle alignment.
Definition CandleAlignment.cpp:25
static constexpr char ATTRIBUTE_KEY[]
The attribute key that is used to store the value of CandleAlignment in a symbol string using methods...
Definition CandleAlignment.hpp:62
static const CandleAlignment DEFAULT
Default alignment is CandleAlignment::MIDNIGHT.
Definition CandleAlignment.hpp:38
static const CandleAlignment MIDNIGHT
Align candles at midnight.
Definition CandleAlignment.hpp:36
static const ConstantMap< std::string_view, CandleAlignment > BY_STRING
The elements by their string representations (constant-initialized, so it can be used in the dynamic ...
Definition CandleAlignment.hpp:58
static const CandleDataType ETH
All valid ETH TimeAndSales or Quotes from an extended trading hours are used to build candles.
Definition CandleDataType.hpp:162
static const CandleDataType UNDEFINED
Data type is selected by a chart server.
Definition CandleDataType.hpp:163
static const CandleDataType ALL
All valid TimeAndSales or Quotes are used to build candles.
Definition CandleDataType.hpp:160
static const CandleDataType SOURCE
Aggregation rules are defined per data source (e.g., an exchange).
Definition CandleDataType.hpp:158
static const CandleDataType DEFAULT
Default data type is CandleDataType::UNDEFINED.
Definition CandleDataType.hpp:164
CandleDataType() noexcept
Creates the CandleDataType::UNDEFINED data type.
static constexpr char ATTRIBUTE_KEY[]
The attribute key that is used to store the value of CandleDataType in a symbol string using methods ...
Definition CandleDataType.hpp:82
static const CandleDataType THO
Selected types of data are identical to those used for CandleSession::REGULAR.
Definition CandleDataType.hpp:159
bool operator==(const CandleDataType &candleDataType) const noexcept
Compares the values of the data types (case-sensitive).
Definition CandleDataType.cpp:51
static const CandleDataType RTH
All valid non-ETH TimeAndSales or Quotes from a regular trading hours are used to build candles.
Definition CandleDataType.hpp:161
std::string getValue() const
Returns string representation of this data type attribute.
Definition CandleDataType.cpp:43
std::string toString() const
Returns string representation of this data type attribute (the same as CandleDataType::getValue()).
Definition CandleDataType.cpp:47
char getExchangeCode() const noexcept
Returns exchange code.
Definition CandleExchange.cpp:11
std::string toString() const
Returns string representation of this exchange.
Definition CandleExchange.cpp:19
static const CandleExchange COMPOSITE
Composite exchange where data is taken from all exchanges.
Definition CandleExchange.hpp:62
static CandleExchange valueOf(char exchangeCode) noexcept
Returns an exchange attribute object that corresponds to the specified exchange code character.
Definition CandleExchange.cpp:27
static const CandleExchange DEFAULT
Default exchange is CandleExchange::COMPOSITE.
Definition CandleExchange.hpp:64
static CandlePeriod valueOf(double value, const CandleType &type)
Returns candle period with the given value and type.
Definition CandlePeriod.cpp:92
static const CandlePeriod TICK
Tick aggregation where each candle represents an individual tick.
Definition CandlePeriod.hpp:117
double getValue() const noexcept
Returns aggregation period value.
Definition CandlePeriod.cpp:42
std::int64_t getPeriodIntervalMillis() const noexcept
Returns an aggregation period in milliseconds as closely as possible.
Definition CandlePeriod.cpp:32
static constexpr char ATTRIBUTE_KEY[]
The attribute key that is used to store the value of CandlePeriod in a symbol string using methods of...
Definition CandlePeriod.hpp:66
static const CandlePeriod DEFAULT
The default period is CandlePeriod::TICK.
Definition CandlePeriod.hpp:119
const CandleType & getType() const &noexcept
Returns aggregation period type.
Definition CandlePeriod.cpp:46
std::string toString() const
Returns string representation of this aggregation period.
Definition CandlePeriod.cpp:50
static const CandlePeriod DAY
Day aggregation where each candle represents a day.
Definition CandlePeriod.hpp:118
static CandlePriceLevel valueOf(double value)
Returns candle price level with the given value.
Definition CandlePriceLevel.cpp:47
static constexpr char ATTRIBUTE_KEY[]
The attribute key that is used to store the value of CandlePriceLevel in a symbol string using method...
Definition CandlePriceLevel.hpp:57
std::string toString() const
Returns string representation of this price level.
Definition CandlePriceLevel.cpp:22
double getValue() const noexcept
Returns price level value.
Definition CandlePriceLevel.cpp:18
static const CandlePriceLevel DEFAULT
Default price level corresponds to NaN (std::numeric_limits<double>::quiet_NaN()).
Definition CandlePriceLevel.hpp:154
static const CandlePrice SETTLEMENT
Official settlement price that is defined by exchange or last trading price otherwise.
Definition CandlePrice.hpp:127
std::string toString() const
Returns string representation of this candle price type.
Definition CandlePrice.cpp:23
static const CandlePrice BID
Quote bid price.
Definition CandlePrice.hpp:124
static const CandlePrice MARK
Market price defined as average between quote bid and ask prices.
Definition CandlePrice.hpp:126
static const std::span< const std::reference_wrapper< const CandlePrice > > VALUES
All elements (constant-initialized, so the initializers of global variables can use it).
Definition CandlePrice.hpp:137
static const ConstantMap< std::string_view, CandlePrice > BY_STRING
The elements by their string representations (constant-initialized, so it can be used in the dynamic ...
Definition CandlePrice.hpp:150
static const CandlePrice ASK
Quote ask price.
Definition CandlePrice.hpp:125
static const CandlePrice DEFAULT
The default price type is CandlePrice::LAST.
Definition CandlePrice.hpp:128
static constexpr char ATTRIBUTE_KEY[]
The attribute key that is used to store the value of CandlePrice in a symbol string using methods of ...
Definition CandlePrice.hpp:81
static const CandlePrice LAST
Last trading price.
Definition CandlePrice.hpp:123
static const std::span< const std::reference_wrapper< const CandleSession > > VALUES
All elements (constant-initialized, so the initializers of global variables can use it).
Definition CandleSession.hpp:202
std::string toString() const
Returns string representation of this candle session attribute.
Definition CandleSession.cpp:117
static const CandleSession DEFAULT
The default trading session is CandleSession::ANY.
Definition CandleSession.hpp:193
const SessionFilter & getSessionFilter() const &noexcept
Returns a session filter that corresponds to this session attribute.
Definition CandleSession.cpp:107
static const ConstantMap< std::string_view, CandleSession > BY_STRING
The elements by their string representations (constant-initialized, so it can be used in the dynamic ...
Definition CandleSession.hpp:212
static const CandleSession ANY
All trading sessions are used to build candles.
Definition CandleSession.hpp:191
static const CandleSession REGULAR
Only regular trading session data is used to build candles.
Definition CandleSession.hpp:192
static constexpr char ATTRIBUTE_KEY[]
The attribute key that is used to store the value of CandleSession in a symbol string using methods o...
Definition CandleSession.hpp:68
Attribute of the CandleSymbol.
Definition CandleSymbolAttribute.hpp:24
Symbol that should be used with DXFeedSubscription class to subscribe for Candle events.
Definition CandleSymbol.hpp:186
const std::optional< CandlePeriod > & getPeriod() const &noexcept
Returns the aggregation period of this symbol.
Definition CandleSymbol.cpp:294
const std::optional< CandlePriceLevel > & getPriceLevel() const &noexcept
Returns the price level attribute of this symbol.
Definition CandleSymbol.cpp:302
const std::optional< CandleExchange > & getExchange() const &noexcept
Returns exchange attribute of this symbol.
Definition CandleSymbol.cpp:282
const std::string & getBaseSymbol() const &noexcept
Returns base market symbol without attributes.
Definition CandleSymbol.cpp:278
const std::optional< CandlePrice > & getPrice() const &noexcept
Returns the price type attribute of this symbol.
Definition CandleSymbol.cpp:286
const std::optional< CandleDataType > & getDataType() const &noexcept
Returns the data type attribute of this symbol.
Definition CandleSymbol.cpp:306
static CandleSymbol NUL()
Returns the candle symbol "<null>".
Definition CandleSymbol.cpp:539
virtual void * toGraal() const
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition CandleSymbol.cpp:336
const std::string & toString() const &noexcept
Returns string representation of this symbol.
Definition CandleSymbol.cpp:310
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition CandleSymbol.cpp:347
const std::optional< CandleSession > & getSession() const &noexcept
Returns the session attribute of this symbol.
Definition CandleSymbol.cpp:290
static CandleSymbol fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition CandleSymbol.cpp:363
const std::optional< CandleAlignment > & getAlignment() const &noexcept
Returns alignment attribute of this symbol.
Definition CandleSymbol.cpp:298
Type of the candle aggregation period constitutes CandlePeriod type together its actual value.
Definition CandleType.hpp:33
std::string toString() const
Returns string representation of this candle type.
Definition CandleType.cpp:24
std::int64_t getPeriodIntervalMillis() const noexcept
Returns a candle type period in milliseconds as closely as possible.
Definition CandleType.cpp:16
static const CandleType DAY
Certain number of days.
Definition CandleType.hpp:72
static const CandleType MINUTE
Certain number of minutes.
Definition CandleType.hpp:70
static const CandleType PRICE_MOMENTUM
Certain price change, calculated according to the following rules:
Definition CandleType.hpp:107
static const CandleType SECOND
Certain number of seconds.
Definition CandleType.hpp:69
static const CandleType WEEK
Certain number of weeks.
Definition CandleType.hpp:73
static const CandleType OPTEXP
Certain number of option expirations.
Definition CandleType.hpp:74
static const CandleType TICK
Certain number of ticks.
Definition CandleType.hpp:68
static const ConstantMap< std::string_view, CandleType > BY_STRING
The elements by their string representations (constant-initialized, so it can be used in the dynamic ...
Definition CandleType.hpp:113
static const CandleType YEAR
Certain number of years.
Definition CandleType.hpp:79
static const CandleType VOLUME
Certain volume of trades.
Definition CandleType.hpp:84
std::string getName() const
Returns a name of this candle type.
Definition CandleType.cpp:20
static const CandleType PRICE
Certain price change, calculated according to the following rules:
Definition CandleType.hpp:95
static const CandleType PRICE_RENKO
Certain price change, calculated according to the following rules:
Definition CandleType.hpp:119
static const std::span< const std::reference_wrapper< const CandleType > > VALUES
All elements (constant-initialized, so the initializers of global variables can use it).
Definition CandleType.hpp:92
static const CandleType MONTH
Certain number of months.
Definition CandleType.hpp:69
static const CandleType HOUR
Certain number of hours.
Definition CandleType.hpp:71
Mixin for wrapping calls to common promise methods.
Definition Promise.hpp:91
JavaException getException() const
Returns exceptional outcome of computation.
Definition Promise.hpp:139
void cancel() const
This method cancels computation.
Definition Promise.hpp:186
bool hasResult() const
Returns true when computation has completed normally.
Definition Promise.hpp:107
bool isCancelled() const
Returns true when computation was cancelled.
Definition Promise.hpp:126
bool hasException() const
Returns true when a computation has completed exceptionally or was canceled.
Definition Promise.hpp:116
bool awaitWithoutException(const std::chrono::milliseconds &timeoutInMilliseconds) const
Wait for computation to complete or timeout or throw an exception in case of exceptional completion.
Definition Promise.hpp:173
bool isDone() const
Returns true when a computation has completed normally, or exceptionally, or was canceled.
Definition Promise.hpp:97
bool awaitWithoutException(std::int32_t timeoutInMilliseconds) const
Wait for computation to complete or timeout or throw an exception in case of exceptional completion.
Definition Promise.hpp:156
Manages network connections to feed or publisher.
Definition DXEndpoint.hpp:189
void removeMessageConnectorListener(std::size_t listenerId) noexcept
Removes a listener added with DXEndpoint::addMessageConnectorListener().
Definition DXEndpoint.cpp:946
bool isClosed() const
Definition DXEndpoint.cpp:901
SimpleHandler< void(DXEndpoint::State, DXEndpoint::State)> & onStateChange() noexcept
Returns the onStateChange handler that can be used to add or remove listeners.
Definition DXEndpoint.cpp:918
static std::shared_ptr< DXEndpoint > create(Role role)
Creates an endpoint with a specified role.
Definition DXEndpoint.cpp:888
void setRequestedAggregationPeriod(const TimePeriod &requestedAggregationPeriod) const
Sets the aggregation period that this endpoint requests from the server.
Definition DXEndpoint.cpp:568
static constexpr char DXFEED_AGGREGATION_PERIOD_PROPERTY[]
"dxfeed.aggregationPeriod"
Definition DXEndpoint.hpp:279
static constexpr char DXENDPOINT_EVENT_TIME_PROPERTY[]
"dxendpoint.eventTime"
Definition DXEndpoint.hpp:366
void setRequestedAggregationPeriod(std::chrono::milliseconds requestedAggregationPeriod) const
Sets the aggregation period that this endpoint requests from the server.
Definition DXEndpoint.cpp:573
static constexpr char NAME_PROPERTY[]
"name"
Definition DXEndpoint.hpp:206
static constexpr char DXFEED_PASSWORD_PROPERTY[]
"dxfeed.password"
Definition DXEndpoint.hpp:260
std::shared_ptr< DXFeed > getFeed() const
Definition DXEndpoint.cpp:528
static constexpr char DXSCHEME_NANO_TIME_PROPERTY[]
"dxscheme.nanoTime"
Definition DXEndpoint.hpp:399
State
Represents the current state of endpoint.
Definition DXEndpoint.hpp:491
@ CLOSED
Endpoint was closed.
Definition DXEndpoint.hpp:511
@ CONNECTING
The connect method was called to establish connection to remove endpoint, but the connection is not e...
Definition DXEndpoint.hpp:501
@ CONNECTED
The connection to the remote endpoint is established.
Definition DXEndpoint.hpp:506
@ NOT_CONNECTED
Endpoint was created by is not connected to remote endpoints.
Definition DXEndpoint.hpp:495
static constexpr char DXFEED_THREAD_POOL_SIZE_PROPERTY[]
"dxfeed.threadPoolSize"
Definition DXEndpoint.hpp:269
TimePeriodInfo getAggregationPeriodInfo() const
Returns the aggregation period that the servers report, over all connections of this endpoint.
Definition DXEndpoint.cpp:586
static constexpr char DXPUBLISHER_THREAD_POOL_SIZE_PROPERTY[]
"dxpublisher.threadPoolSize"
Definition DXEndpoint.hpp:349
void reconnect() const
Terminates all established network connections and initiates connecting again with the same address.
Definition DXEndpoint.cpp:473
std::shared_ptr< DXEndpoint > Ptr
The alias to a type of shared pointer to the DXEndpoint object.
Definition DXEndpoint.hpp:191
static std::shared_ptr< DXEndpoint > create()
Creates an endpoint with FEED role.
Definition DXEndpoint.cpp:879
void removeStateChangeListener(std::size_t listenerId) noexcept
Removes a listener notified about changes in state property.
Definition DXEndpoint.cpp:909
const std::string & getName() const &noexcept
Definition DXEndpoint.cpp:905
Role
Represents the role of an endpoint that was specified during its creation.
Definition DXEndpoint.hpp:420
@ PUBLISHER
PUBLISHER endpoint connects to the remote publisher hub (also known as multiplexor) or creates a publ...
Definition DXEndpoint.hpp:465
@ STREAM_FEED
STREAM_FEED endpoint is similar to DXEndpoint::FEED and also connects to the remote data feed provide...
Definition DXEndpoint.hpp:453
@ LOCAL_HUB
LOCAL_HUB endpoint is a local hub without the ability to establish network connections.
Definition DXEndpoint.hpp:481
@ ON_DEMAND_FEED
ON_DEMAND_FEED endpoint is similar to DXEndpoint::FEED, but it is designed to be used with OnDemandSe...
Definition DXEndpoint.hpp:444
@ STREAM_PUBLISHER
STREAM_PUBLISHER endpoint is similar to DXEndpoint::PUBLISHER and also connects to the remote publish...
Definition DXEndpoint.hpp:474
@ FEED
FEED endpoint connects to the remote data feed provider and is optimized for real-time or delayed dat...
Definition DXEndpoint.hpp:431
std::string toString() const override
Returns a string representation of the current object.
Definition DXEndpoint.cpp:754
void awaitProcessed() const
Waits until this endpoint stops processing data (becomes quiescent).
Definition DXEndpoint.cpp:509
std::shared_ptr< DXPublisher > getPublisher() const
Definition DXEndpoint.cpp:537
static constexpr char DXFEED_PROPERTIES_PROPERTY[]
"dxfeed.properties"
Definition DXEndpoint.hpp:221
std::optional< TimePeriod > getRequestedAggregationPeriod() const
Returns the aggregation period that this endpoint requests from the server, or an empty value if no p...
Definition DXEndpoint.cpp:556
static constexpr char DXSCHEME_ENABLED_PROPERTY_PREFIX[]
"dxscheme.enabled."
Definition DXEndpoint.hpp:413
State getState() const
Returns the state of this endpoint.
Definition DXEndpoint.cpp:433
static constexpr char DXPUBLISHER_ADDRESS_PROPERTY[]
"dxpublisher.address"
Definition DXEndpoint.hpp:340
std::vector< MessageConnectorInfo > getConnectors() const
Returns the snapshots of the message connectors of this endpoint: one for each address it connects to...
Definition DXEndpoint.cpp:926
void awaitNotConnected() const
Waits while this endpoint state becomes NOT_CONNECTED or CLOSED.
Definition DXEndpoint.cpp:500
static constexpr char DXFEED_STRIPE_PROPERTY[]
"dxfeed.stripe"
Definition DXEndpoint.hpp:296
static std::shared_ptr< DXEndpoint > getInstance(Role role)
Returns a default application-wide singleton instance of DXEndpoint for a specific role.
Definition DXEndpoint.cpp:861
void close() const
Closes this endpoint.
Definition DXEndpoint.cpp:956
static constexpr char DXFEED_REQUESTED_AGGREGATION_PERIOD_PROPERTY[]
"dxfeed.requestedAggregationPeriod"
Definition DXEndpoint.hpp:321
void setRequestedAggregationPeriod(std::int64_t requestedAggregationPeriod) const
Sets the aggregation period that this endpoint requests from the server.
Definition DXEndpoint.cpp:577
void disconnect() const
Terminates all remote network connections.
Definition DXEndpoint.cpp:482
void closeAndAwaitTermination() const
Closes this endpoint and wait until all pending data processing tasks are completed.
Definition DXEndpoint.cpp:518
static std::shared_ptr< DXEndpoint > getInstance()
Returns a default application-wide singleton instance of DXEndpoint with a FEED role.
Definition DXEndpoint.cpp:852
static constexpr char DXPUBLISHER_PROPERTIES_PROPERTY[]
"dxpublisher.properties"
Definition DXEndpoint.hpp:330
static constexpr char DXFEED_WILDCARD_ENABLE_PROPERTY[]
"dxfeed.wildcard.enable"
Definition DXEndpoint.hpp:288
static constexpr char DXFEED_ADDRESS_PROPERTY[]
"dxfeed.address"
Definition DXEndpoint.hpp:240
static constexpr char DXFEED_STICKY_SUBSCRIPTION_PROPERTY[]
"dxfeed.stickySubscriptionPeriod"
Definition DXEndpoint.hpp:304
static constexpr char DXFEED_USER_PROPERTY[]
"dxfeed.user"
Definition DXEndpoint.hpp:250
void disconnectAndClear() const
Terminates all remote network connections and clears stored data.
Definition DXEndpoint.cpp:491
Role getRole() const noexcept
Returns the role of this endpoint.
Definition DXEndpoint.cpp:897
std::optional< ConnectionError > getLastConnectionError() const
Returns the last connection error of this endpoint: the newest failed connect attempt or dropped conn...
Definition DXEndpoint.cpp:922
static constexpr char DXENDPOINT_STORE_EVERYTHING_PROPERTY[]
"dxendpoint.storeEverything"
Definition DXEndpoint.hpp:379
static std::shared_ptr< Builder > newBuilder()
Creates a new Builder instance.
Definition DXEndpoint.cpp:870
Main entry class for dxFeed API (read it first).
Definition DXFeed.hpp:142
void detachSubscriptionAndClear(const std::shared_ptr< DXFeedSubscription > &subscription) const
Detaches the given subscription from this feed and clears data delivered to this subscription by publ...
Definition DXFeed.cpp:102
Collection getLastEvents(Collection &&events)
Returns the last events for the specified list of event instances.
Definition DXFeed.hpp:330
std::shared_ptr< PromiseList< E > > getLastEventsPromises(std::initializer_list< SymbolWrapper > collection) const
Requests the last events for the specified event type and a collection of symbols.
Definition DXFeed.hpp:778
std::vector< std::shared_ptr< E > > getTimeSeriesIfSubscribed(const SymbolWrapper &symbol, std::chrono::milliseconds fromTime, std::chrono::milliseconds toTime) const
Returns time series of events for the specified event type, symbol and a range of time if there is a ...
Definition DXFeed.hpp:1056
std::shared_ptr< DXFeedSubscription > createSubscription(const EventTypeEnum &eventType) const
Creates a new subscription for a single event type that is attached to this feed.
Definition DXFeed.cpp:167
std::shared_ptr< DXFeedTimeSeriesSubscription > createTimeSeriesSubscription(std::initializer_list< EventTypeEnum > eventTypes) const
Creates new subscription for multiple event types that is attached to this feed.
Definition DXFeed.cpp:214
std::shared_ptr< DXFeedSubscription > createSubscription(EventTypeIt begin, EventTypeIt end) const
Creates new subscription for multiple event types that is attached to this feed.
Definition DXFeed.hpp:424
std::shared_ptr< PromiseList< E > > getLastEventsPromises(const SymbolsCollection &collection) const
Requests the last events for the specified event type and a collection of symbols.
Definition DXFeed.hpp:729
std::shared_ptr< E > getLastEventIfSubscribed(const SymbolWrapper &symbol)
Returns the last event for the specified event type and symbol if there is a subscription for it.
Definition DXFeed.hpp:364
std::shared_ptr< DXFeedSubscription > createSubscription(std::initializer_list< EventTypeEnum > eventTypes) const
Creates new subscription for multiple event types that is attached to this feed.
Definition DXFeed.cpp:180
std::vector< std::shared_ptr< E > > getTimeSeriesIfSubscribed(const SymbolWrapper &symbol, std::chrono::milliseconds fromTime) const
Returns time series of events for the specified event type, symbol and a range of time (without an up...
Definition DXFeed.hpp:1087
std::shared_ptr< DXFeedTimeSeriesSubscription > createTimeSeriesSubscription(EventTypeIt begin, EventTypeIt end) const
Creates new subscription for multiple event types that is attached to this feed.
Definition DXFeed.hpp:523
static std::shared_ptr< DXFeed > getInstance()
Returns a default application-wide singleton instance of feed.
Definition DXFeed.cpp:25
std::shared_ptr< E > getLastEvent(std::shared_ptr< E > event)
Returns the last event for the specified event instance.
Definition DXFeed.hpp:306
std::shared_ptr< PromiseList< E > > getLastEventsPromises(SymbolIt begin, SymbolIt end) const
Requests the last events for the specified event type and a collection of symbols.
Definition DXFeed.hpp:670
std::shared_ptr< DXFeedSubscription > createSubscription(const EventTypesCollection &eventTypes) const
Creates new subscription for multiple event types that is attached to this feed.
Definition DXFeed.hpp:469
std::shared_ptr< Promise< std::shared_ptr< E > > > getLastEventPromise(const SymbolWrapper &symbol) const
Requests the last event for the specified event type and symbol.
Definition DXFeed.hpp:616
std::shared_ptr< DXFeedTimeSeriesSubscription > createTimeSeriesSubscription(const EventTypesCollection &eventTypes) const
Creates new subscription for multiple event types that is attached to this feed.
Definition DXFeed.hpp:582
std::string toString() const override
Returns a string representation of the current object.
Definition DXFeed.cpp:359
std::shared_ptr< DXFeed > Ptr
The alias to a type of shared pointer to the DXFeed object.
Definition DXFeed.hpp:144
std::shared_ptr< Promise< std::vector< std::shared_ptr< E > > > > getIndexedEventsPromise(const SymbolWrapper &symbol, const IndexedEventSource &source) const
Requests a container of indexed events for the specified event type, symbol and source.
Definition DXFeed.hpp:834
void detachSubscription(const std::shared_ptr< DXFeedSubscription > &subscription) const
Detaches the given subscription from this feed.
Definition DXFeed.cpp:76
std::vector< std::shared_ptr< E > > getIndexedEventsIfSubscribed(const SymbolWrapper &symbol, const IndexedEventSource &source) const
Returns a vector of indexed events for the specified event type, symbol and source if there is a subs...
Definition DXFeed.hpp:892
void attachSubscription(const std::shared_ptr< DXFeedSubscription > &subscription) const
Attaches the given subscription to this feed.
Definition DXFeed.cpp:34
std::shared_ptr< DXFeedTimeSeriesSubscription > createTimeSeriesSubscription(const EventTypeEnum &eventType) const
Creates a new subscription for a single event type that is attached to this feed.
Definition DXFeed.cpp:195
Provides API for publishing of events to local or remote DXFeed.
Definition DXPublisher.hpp:62
std::shared_ptr< DXPublisher > Ptr
The alias to a type of shared pointer to the DXPublisher object.
Definition DXPublisher.hpp:64
void publishEvents(EventIt begin, EventIt end) const
Publishes events to the corresponding feed.
Definition DXPublisher.hpp:215
std::shared_ptr< ObservableSubscription > getSubscription(const EventTypeEnum &eventType)
Returns an observable set of subscribed symbols for the specified event type.
Definition DXPublisher.cpp:49
std::string toString() const override
Returns a string representation of the current object.
Definition DXPublisher.cpp:86
void publishEvents(std::initializer_list< std::shared_ptr< EventType > > events) const
Publishes events to the corresponding feed.
Definition DXPublisher.hpp:193
void publishEvents(EventsCollection &&events) const
Publishes events to the corresponding feed.
Definition DXPublisher.hpp:173
static std::shared_ptr< DXPublisher > getInstance()
Returns a default application-wide singleton instance of DXPublisher.
Definition DXPublisher.cpp:22
void publishEvents(std::shared_ptr< EventType > event) const
Publishes an event to the corresponding feed.
Definition DXPublisher.cpp:45
A base of the enums that emulate Java enums.
Definition Enum.hpp:35
std::string getName() const
Returns the enum element name.
Definition Enum.hpp:75
constexpr Enum(OtherCodeType code, std::string_view name) noexcept
Creates an element of the enum.
Definition Enum.hpp:56
constexpr Code getCode() const noexcept
Returns code that is used in flag bits.
Definition Enum.hpp:66
std::string toString() const
Returns a string representation of an enum element.
Definition Enum.hpp:84
friend bool operator==(const E &e1, const E &e2)
Compares two elements of an enum.
Definition Enum.hpp:97
static const Child & valueOf(OtherCodeType code) noexcept
Returns enum element by integer code bit pattern.
Definition Enum.hpp:123
Mixin for wrapping Promise method calls for a single event.
Definition Promise.hpp:253
std::shared_ptr< E > getResult() const
Returns result of computation.
Definition Promise.hpp:261
std::shared_ptr< E > await() const
Wait for the computation to complete and return its result or throw an exception in case of exception...
Definition Promise.hpp:271
std::shared_ptr< E > await(const std::chrono::milliseconds &timeoutInMilliseconds) const &
Wait for computation to complete or timeout and return its result or throw an exception in case of ex...
Definition Promise.hpp:303
std::shared_ptr< E > await(std::int32_t timeoutInMilliseconds) const &
Wait for computation to complete or timeout and return its result or throw an exception in case of ex...
Definition Promise.hpp:287
const DataType & getData() const noexcept
Definition EventSourceWrapper.cpp:123
bool isOrderSource() const noexcept
Definition EventSourceWrapper.cpp:107
std::string toStringUnderlying() const
Returns a string representation of the underlying object.
Definition EventSourceWrapper.cpp:95
std::string toString() const
Returns a string representation of the current object.
Definition EventSourceWrapper.cpp:85
static EventSourceWrapper fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition EventSourceWrapper.cpp:63
std::unique_ptr< void, decltype(&EventSourceWrapper::freeGraal)> toGraalUnique() const
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition EventSourceWrapper.cpp:81
EventSourceWrapper(const IndexedEventSource &data) noexcept
Constructs a wrapper from IndexedEventSource.
Definition EventSourceWrapper.cpp:48
bool isIndexedEventSource() const noexcept
Definition EventSourceWrapper.cpp:103
std::optional< IndexedEventSource > asIndexedEventSource() const noexcept
Definition EventSourceWrapper.cpp:111
std::optional< OrderSource > asOrderSource() const noexcept
Definition EventSourceWrapper.cpp:117
void * toGraal() const
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition EventSourceWrapper.cpp:72
EventSourceWrapper(const OrderSource &data) noexcept
Constructs a wrapper from OrderSource.
Definition EventSourceWrapper.cpp:52
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition EventSourceWrapper.cpp:56
Concrete implementation of a event for std::string.
Definition EventType.hpp:148
Event type parametrized by a symbol.
Definition EventType.hpp:119
virtual const std::optional< Symbol > & getEventSymbolOpt() const &noexcept=0
Returns the event symbol that identifies this event type in subscription.
std::shared_ptr< EventTypeWithSymbol< Symbol > > Ptr
The alias to a type of shared pointer to the EventTypeWithSymbol's child object.
Definition EventType.hpp:121
virtual void setEventSymbol(const Symbol &eventSymbol) noexcept=0
Changes the event symbol that identifies this event type in subscription.
virtual const Symbol & getEventSymbol() const &noexcept=0
Returns the event symbol that identifies this event type in subscription.
Marks all event types that can be received via dxFeed API.
Definition EventType.hpp:42
std::string toString() const override
Returns a string representation of the current object.
Definition api.cpp:57
std::shared_ptr< EventType > Ptr
The alias to a type of shared pointer to the EventType object.
Definition EventType.hpp:44
virtual void * toGraal() const =0
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
virtual std::int64_t getEventTime() const noexcept
Returns time when an event was created or zero when time is not available.
Definition api.cpp:44
virtual void assign(std::shared_ptr< EventType > event)
Replaces the contents of the event.
Definition api.cpp:53
virtual void setEventTime(std::int64_t eventTime) noexcept
Changes event creation time.
Definition api.cpp:48
This marker interface marks subscription symbol classes (like TimeSeriesSubscriptionSymbol) that atta...
Definition FilteredSubscriptionSymbol.hpp:32
static std::shared_ptr< Builder > newBuilder()
Creates a new instance of HistoryEndpoint::Builder with default configurations.
Definition HistoryEndpoint.cpp:76
std::unique_ptr< HistoryEndpoint > Unique
The alias to a type of unique pointer to the HistoryEndpoint object.
Definition HistoryEndpoint.hpp:61
std::shared_ptr< HistoryEndpoint > Ptr
The alias to a type of shared pointer to the HistoryEndpoint object.
Definition HistoryEndpoint.hpp:58
Compression
The Compression enum represents different compression algorithms that can be applied to data during t...
Definition HistoryEndpoint.hpp:77
Format
The Format enum represents different formats that can be used to handle data.
Definition HistoryEndpoint.hpp:92
std::vector< std::shared_ptr< E > > getTimeSeries(const SymbolWrapper &symbol, std::int64_t from, std::int64_t to)
Retrieves a list of time series events for a specific type of event and symbol within the given time ...
Definition HistoryEndpoint.hpp:202
The part of IndexedEventTxModel that does not depend on the type of events.
Definition IndexedEventTxModel.hpp:48
Represents an indexed collection of up-to-date information about some condition or state of an extern...
Definition IndexedEvent.hpp:46
virtual EventFlagsMask getEventFlagsMask() const noexcept=0
Returns transactional event flags.
static const EventFlag SNAPSHOT_MODE
0x40 - A bitmask to set snapshot mode indicator into the value of eventFlags property.
Definition IndexedEvent.hpp:79
virtual const IndexedEventSource & getSource() const &=0
Returns the source of this event.
virtual std::int64_t getIndex() const noexcept=0
Returns unique per-symbol index of this event.
virtual std::int32_t getEventFlags() const noexcept=0
Returns transactional event flags.
static const EventFlag REMOVE_EVENT
0x02 - A bitmask to get removal indicator from the value of eventFlags property.
Definition IndexedEvent.hpp:75
static const EventFlag SNAPSHOT_SNIP
0x10 - A bitmask to get snapshot snip indicator from the value of eventFlags property.
Definition IndexedEvent.hpp:78
static const EventFlag SNAPSHOT_BEGIN
0x04 - A bitmask to get snapshot begin indicator from the value of eventFlags property.
Definition IndexedEvent.hpp:76
virtual void setIndex(std::int64_t index)=0
Changes unique per-symbol index of this event.
static const EventFlag SNAPSHOT_END
0x08 - A bitmask to get snapshot end indicator from the value of eventFlags property.
Definition IndexedEvent.hpp:77
static const EventFlag TX_PENDING
0x01 - A bitmask to get transaction pending indicator from the value of eventFlags property.
Definition IndexedEvent.hpp:74
std::shared_ptr< IndexedEvent > Ptr
The alias to a type of shared pointer to the IndexedEvent object.
Definition IndexedEvent.hpp:50
virtual void setEventFlags(std::int32_t eventFlags) noexcept=0
Changes transactional event flags.
virtual void setEventFlags(const EventFlagsMask &eventFlags) noexcept=0
Changes transactional event flags.
Thrown to indicate that a method has been passed an illegal or inappropriate argument.
Definition InvalidArgumentException.hpp:23
A wrapper over the interceptable Java exceptions thrown by the dxFeed Native Graal SDK.
Definition JavaException.hpp:26
static void throwIfJavaThreadExceptionExists()
Throws a JavaException if it exists (i.e. intercepted by Graal SDK).
Definition JavaException.cpp:131
JavaException(StringParam message, StringParam className, StringParam stackTrace)
Creates an exception using Java message, className and stack trace.
Definition JavaException.cpp:89
const std::string & getJavaClassName() const &noexcept
Definition JavaException.cpp:101
static JavaException createAndRelease(void *exceptionHandle)
Creates an exception from a native Java exception handle and releases the native representation.
Definition JavaException.cpp:123
static JavaException create(void *exceptionHandle)
Creates an exception using native (GraalVM) Java exception handle.
Definition JavaException.cpp:113
const std::string & getJavaStackTrace() const &noexcept
Definition JavaException.cpp:109
const std::string & getJavaMessage() const &noexcept
Definition JavaException.cpp:105
Represents up-to-date information about some condition or state of an external entity that updates in...
Definition LastingEvent.hpp:33
std::shared_ptr< LastingEvent > Ptr
The alias to a type of shared pointer to the LastingEvent object.
Definition LastingEvent.hpp:35
static bool isActive() noexcept
Helper class to compose and parse symbols for market events.
Definition MarketEventSymbols.hpp:46
static constexpr char EXCHANGES_PATTERN[]
"[0-9A-Za-z]"
Definition MarketEventSymbols.hpp:52
static std::string buildSpreadSymbol(const std::map< std::string, double > &spread)
Builds the canonical spread symbol for the specified spread components.
Definition MarketEventSymbols.cpp:280
static constexpr char SUPPORTED_EXCHANGES[]
All exchange codes that match MarketEventSymbols::EXCHANGES_PATTERN: the digits and the Latin letters...
Definition MarketEventSymbols.hpp:58
Base class for all market events.
Definition MarketEvent.hpp:31
std::shared_ptr< MarketEvent > Ptr
The alias to a type of shared pointer to the MarketEvent object.
Definition MarketEvent.hpp:33
void setEventSymbol(StringParam eventSymbol) override
Changes symbol of this event.
Definition MarketEvent.cpp:105
const std::string & getEventSymbol() const &noexcept override
Returns a symbol of this event.
Definition MarketEvent.cpp:93
std::int64_t getEventTime() const noexcept override
Returns time when an event was created or zero when time is not available.
Definition MarketEvent.cpp:109
const std::optional< std::string > & getEventSymbolOpt() const &noexcept override
Returns a symbol of this event.
Definition MarketEvent.cpp:101
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition MarketEvent.cpp:86
MarketEvent(StringParam eventSymbol)
Protected constructor for concrete implementation classes that initializes eventSymbol property.
Definition MarketEvent.cpp:49
The I/O statistics of a connector since it was created: the cumulative counters of QD's statistics,...
Definition MessageConnectorInfo.hpp:143
std::int64_t writtenRttSumMicros
The sum over the records written of the round-trip time of the connection, in microseconds.
Definition MessageConnectorInfo.hpp:172
std::int64_t readDataLagSumMicros
The sum over the data records read of their lag, in microseconds.
Definition MessageConnectorInfo.hpp:163
std::int64_t readDataRecords
The number of data records read: it grows only when data arrives.
Definition MessageConnectorInfo.hpp:145
std::int64_t writtenDataLagSumMicros
The sum over the data records written of their lag, in microseconds.
Definition MessageConnectorInfo.hpp:166
std::int64_t closedConnectionCount
The number of the closed connections.
Definition MessageConnectorInfo.hpp:178
std::int64_t writtenSubRecords
The number of subscription records written: those a feed sends.
Definition MessageConnectorInfo.hpp:154
std::int64_t readBytes
The number of bytes of the QTP messages read, heartbeats included.
Definition MessageConnectorInfo.hpp:157
std::int64_t readSubRecords
The number of subscription records read: those a publisher receives.
Definition MessageConnectorInfo.hpp:151
std::int64_t activeConnectionCount
The number of the open connections.
Definition MessageConnectorInfo.hpp:175
std::int64_t writtenDataRecords
The number of data records written.
Definition MessageConnectorInfo.hpp:148
std::int64_t readRttSumMicros
The sum over the records read of the round-trip time of the connection, in microseconds.
Definition MessageConnectorInfo.hpp:169
std::int64_t writtenBytes
The number of bytes of the QTP messages written, heartbeats included.
Definition MessageConnectorInfo.hpp:160
The statistics of a connector since it was created.
Definition MessageConnectorInfo.hpp:103
std::int64_t readDataRecords
The number of data records read.
Definition MessageConnectorInfo.hpp:111
std::int64_t activeConnectionCount
The number of the open connections.
Definition MessageConnectorInfo.hpp:117
std::int64_t readBytes
The number of bytes read.
Definition MessageConnectorInfo.hpp:105
std::int64_t closedConnectionCount
The number of the closed connections.
Definition MessageConnectorInfo.hpp:120
std::int64_t writtenDataRecords
The number of data records written.
Definition MessageConnectorInfo.hpp:114
std::int64_t writtenBytes
The number of bytes written.
Definition MessageConnectorInfo.hpp:108
A snapshot of a message connector of an endpoint: a connection to an address (DXEndpoint::getConnecto...
Definition MessageConnectorInfo.hpp:75
std::optional< IoStatistics > ioStatistics
The I/O statistics of the connector, or std::nullopt when the Graal Native SDK library does not suppo...
Definition MessageConnectorInfo.hpp:213
static const char * kindToString(Kind kind) noexcept
Returns the name of a kind, for example CLIENT_SOCKET.
Definition MessageConnectorInfo.cpp:13
Kind kind
The kind of the connector.
Definition MessageConnectorInfo.hpp:186
bool active
true if the connector is started (it connects or reconnects), false if it is stopped.
Definition MessageConnectorInfo.hpp:200
State
The state of a connector.
Definition MessageConnectorInfo.hpp:91
@ DISCONNECTED
Stopped, for example replaced by a connect to another address, or its endpoint disconnected or closed...
Definition MessageConnectorInfo.hpp:99
@ CONNECTING
Started, not connected yet, or reconnecting after a failure or a drop.
Definition MessageConnectorInfo.hpp:93
@ CONNECTED
At least one of its connections is established (a server socket connector: it accepts connections).
Definition MessageConnectorInfo.hpp:96
State state
The state of the connector.
Definition MessageConnectorInfo.hpp:197
Statistics statistics
The statistics of the connector.
Definition MessageConnectorInfo.hpp:210
std::optional< ConnectionError > lastError
The last connection error of the connector, or std::nullopt when it has had none.
Definition MessageConnectorInfo.hpp:216
static const char * stateToString(State state) noexcept
Returns the name of a state, for example CONNECTED.
Definition MessageConnectorInfo.cpp:26
std::int32_t connectionCount
The number of the open connections: those of a client socket connector (more than one for a striped c...
Definition MessageConnectorInfo.hpp:204
Kind
The kind of a connector. A kind that this version of the library does not know reads as OTHER.
Definition MessageConnectorInfo.hpp:77
@ OTHER
Any other connector (a file, a non-blocking or a custom connector), or a kind that this version of th...
Definition MessageConnectorInfo.hpp:86
@ SERVER_SOCKET
A server socket connector (an address :port).
Definition MessageConnectorInfo.hpp:82
@ CLIENT_SOCKET
A client socket connector (an address host:port).
Definition MessageConnectorInfo.hpp:79
std::string address
The address the connector was configured with, for example 127.0.0.1:7300, credentials masked.
Definition MessageConnectorInfo.hpp:190
std::int64_t closedConnectionCount
The number of the connections closed since the connector was created: it grows on each reconnect.
Definition MessageConnectorInfo.hpp:207
std::vector< std::string > currentAddresses
The host:port addresses a client socket connector is connected to now, one per connection (a striped ...
Definition MessageConnectorInfo.hpp:194
std::string name
The name of the connector, as in the log of QD, for example ClientSocket-Distributor.
Definition MessageConnectorInfo.hpp:183
std::string toString() const
Returns a string representation of the connector in one line: the name, the kind, the state,...
Definition MessageConnectorInfo.cpp:39
The listener interface for receiving notifications on the changes of observed subscription.
Definition ObservableSubscriptionChangeListener.hpp:33
void notifySubscriptionClosed(Key)
Delivers a subscription-closed notification from an owning subscription implementation.
Definition ObservableSubscriptionChangeListener.cpp:132
void notifySymbolsAdded(Key, const std::unordered_set< SymbolWrapper > &symbols)
Delivers an added-symbol notification from an owning subscription implementation.
Definition ObservableSubscriptionChangeListener.cpp:122
const JavaObjectHandle< ObservableSubscriptionChangeListener > & getHandle(Key) const
Returns the native listener handle to an owning subscription implementation.
Definition ObservableSubscriptionChangeListener.cpp:116
void notifySymbolsRemoved(Key, const std::unordered_set< SymbolWrapper > &symbols)
Delivers a removed-symbol notification from an owning subscription implementation.
Definition ObservableSubscriptionChangeListener.cpp:127
~ObservableSubscriptionChangeListener() noexcept override
Destroys this listener and invalidates its native callback registration context.
Definition ObservableSubscriptionChangeListener.cpp:75
Observable set of subscription symbols.
Definition ObservableSubscription.hpp:26
virtual std::size_t addChangeListener(std::shared_ptr< ObservableSubscriptionChangeListener > listener)=0
Adds subscription change listener.
virtual bool containsEventType(const EventTypeEnum &eventType)=0
Returns true if this subscription contains the corresponding event type.
virtual void removeChangeListener(std::size_t id)=0
Removes subscription change listener by id.
virtual bool isClosed()=0
virtual std::unordered_set< EventTypeEnum > getEventTypes()=0
Provides on-demand historical tick data replay controls.
Definition OnDemandService.hpp:77
Action enum for the Full Order Book (FOB) Orders.
Definition OrderAction.hpp:25
static const DXFCPP_EXPORT std::span< const std::reference_wrapper< const OrderAction > > ALL
All elements of the enum (constant-initialized).
Definition OrderAction.hpp:34
static const DXFCPP_EXPORT OrderAction EXECUTE
Order is fully executed and removed from the Order Book.
Definition OrderAction.hpp:20
static const DXFCPP_EXPORT OrderAction BUST
Prior Trade/Order Execution bust.
Definition OrderAction.hpp:22
static const DXFCPP_EXPORT OrderAction NEW
New Order is added to Order Book.
Definition OrderAction.hpp:15
static const DXFCPP_EXPORT OrderAction MODIFY
Order is modified without changing its price-time-priority (usually due to partial cancel by the user...
Definition OrderAction.hpp:17
static const DXFCPP_EXPORT OrderAction TRADE
Non-Book Trade - this Trade not refers to any entry in Order Book.
Definition OrderAction.hpp:21
static const DXFCPP_EXPORT OrderAction UNDEFINED
Default enum value for orders that do not support "Full Order Book" and for backward compatibility - ...
Definition OrderAction.hpp:14
static const DXFCPP_EXPORT OrderAction REPLACE
Order is modified, and price-time-priority is not maintained (i.e.
Definition OrderAction.hpp:16
static const DXFCPP_EXPORT OrderAction DELETE
Order is fully canceled and removed from Order Book.
Definition OrderAction.hpp:18
static const DXFCPP_EXPORT OrderAction PARTIAL
Size is changed (usually reduced) due to partial order execution.
Definition OrderAction.hpp:19
The raw description of the request that created a promise of DXFeed.
Definition PromiseContext.hpp:24
A list of event receiving results that will be completed normally or exceptionally in the future.
Definition Promise.hpp:457
static std::shared_ptr< PromiseList > create(void *handle, const std::vector< std::shared_ptr< const PromiseContext > > &contexts={})
Creates the list of promises from the native list.
Definition Promise.hpp:495
Result of an event receiving that will be completed normally or exceptionally in the future.
Definition Promise.hpp:406
Result of an void receiving that will be completed normally or exceptionally in the future.
Definition Promise.hpp:376
Result of a computation that will be completed normally or exceptionally in the future.
Definition Promise.hpp:371
A class that represents a promise-based implementation often used for handling asynchronous operation...
Definition Promises.hpp:46
A helper class needed to construct smart pointers to objects and does not allow explicit construction...
Definition SharedEntity.hpp:80
static auto createShared(Args &&...args)
Creates a smart pointer to an object.
Definition SharedEntity.hpp:95
A runtime axception with stacktrace.
Definition RuntimeException.hpp:27
const std::string & getStackTrace() const &
Returns the stacktrace.
Definition RuntimeException.cpp:94
RuntimeException(StringParam message, StringParam additionalStackTrace="")
Constructs a runtime exception.
Definition RuntimeException.cpp:82
Scope of an order.
Definition Scope.hpp:25
static const DXFCPP_EXPORT Scope REGIONAL
Represents the best bid or the best offer for a given exchange code.
Definition Scope.hpp:14
static const DXFCPP_EXPORT Scope ORDER
Represents individual order on the market.
Definition Scope.hpp:16
static const DXFCPP_EXPORT std::span< const std::reference_wrapper< const Scope > > ALL
All elements of the enum (constant-initialized).
Definition Scope.hpp:29
static const DXFCPP_EXPORT Scope COMPOSITE
Represents the best bid or the best offer for the whole market.
Definition Scope.hpp:13
static const DXFCPP_EXPORT Scope AGGREGATE
Represents aggregate information for a given price level or best bid or the best offer for a given ma...
Definition Scope.hpp:15
static const SessionFilter PRE_MARKET
Accepts any session with type SessionType::PRE_MARKET.
Definition SessionFilter.hpp:183
static const SessionFilter REGULAR
Accepts any session with type SessionType::REGULAR.
Definition SessionFilter.hpp:185
static const SessionFilter NON_TRADING
Accepts non-trading sessions only - those with (Session::isTrading() == false).
Definition SessionFilter.hpp:177
static const SessionFilter ANY
Accepts any session - useful for pure schedule navigation.
Definition SessionFilter.hpp:175
static const SessionFilter TRADING
Accepts trading sessions only - those with (Session::isTrading() == true).
Definition SessionFilter.hpp:176
static const SessionFilter NO_TRADING
Accepts any session with type SessionType::NO_TRADING.
Definition SessionFilter.hpp:180
static const SessionFilter AFTER_MARKET
Accepts any session with type SessionType::AFTER_MARKET.
Definition SessionFilter.hpp:187
bool accept(Session session) const noexcept
Tests whether or not the specified session is an acceptable result.
Definition SessionFilter.hpp:122
std::optional< bool > trading_
Required trading flag, std::nullopt if not relevant.
Definition SessionFilter.hpp:81
std::optional< SessionType > type_
Required type, std::nullopt if not relevant.
Definition SessionFilter.hpp:79
Defines type of session - what kind of trading activity is allowed (if any), what rules are used,...
Definition SessionType.hpp:47
static const SessionType NO_TRADING
Non-trading session type is used to mark periods of time during which trading is not allowed.
Definition SessionType.hpp:168
static const SessionType REGULAR
Regular session type marks regular trading hours session.
Definition SessionType.hpp:170
static const SessionType PRE_MARKET
Pre-market session type marks extended trading session before regular trading hours.
Definition SessionType.hpp:169
bool isTrading() const noexcept
Returns true if trading activity is allowed for this type of session.
Definition CandleSession.cpp:30
static const SessionType AFTER_MARKET
After-market session type marks extended trading session after regular trading hours.
Definition SessionType.hpp:171
A base abstract "shared entity" class. Has some helpers for dynamic polymorphism.
Definition SharedEntity.hpp:25
virtual std::string toString() const
Returns a string representation of the current object.
Definition SharedEntity.hpp:69
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>{nu...
Definition SharedEntity.hpp:60
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>{nu...
Definition SharedEntity.hpp:49
std::shared_ptr< SharedEntity > Ptr
The alias to a type of shared pointer to the SharedEntity object.
Definition SharedEntity.hpp:27
bool is() const noexcept
Checks that the object is of type T: its dynamic type is T or derived from T.
Definition SharedEntity.hpp:38
Side of an order or a trade.
Definition Side.hpp:25
static const DXFCPP_EXPORT std::span< const std::reference_wrapper< const Side > > ALL
All elements of the enum (constant-initialized).
Definition Side.hpp:27
static const DXFCPP_EXPORT Side BUY
Buy side (bid).
Definition Side.hpp:14
static const DXFCPP_EXPORT Side SELL
Sell side (ask or offer).
Definition Side.hpp:15
static const DXFCPP_EXPORT Side UNDEFINED
Side is undefined, unknown or inapplicable.
Definition Side.hpp:13
void remove(std::size_t id)
Removes a listener by the id.
Definition Handler.hpp:309
SimpleHandler(const char *component) noexcept
Creates the new handler.
Definition Handler.hpp:197
void removeAll()
Removes all the listeners.
Definition Handler.hpp:352
SimpleHandler() noexcept=default
Creates the new handler.
void operator-=(std::size_t id)
Removes a listener by the id.
Definition Handler.hpp:381
void operator()(ArgTypes... args) noexcept
Calls the listeners on the current thread and passes the args to them.
Definition Handler.hpp:254
void handle(ArgTypes... args) noexcept
Calls the listeners on the current thread and passes the args to them.
Definition Handler.hpp:229
A thread-safe list of listeners with a given signature.
Definition Handler.hpp:63
Universal functional object that allows searching std::unordered_map for string-like keys.
Definition StringUtils.hpp:23
StringSymbol(std::string_view stringView) noexcept
Constructs StringSymbol from a std::string_view.
Definition StringSymbol.cpp:56
StringSymbol(const char *chars) noexcept
Constructs StringSymbol from a char array.
Definition StringSymbol.cpp:47
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition StringSymbol.cpp:85
std::string toString() const
Returns a string representation of the current object.
Definition StringSymbol.cpp:116
static StringSymbol fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition StringSymbol.cpp:101
void * toGraal() const
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition StringSymbol.cpp:74
Common string constants used across the library.
Definition StringUtils.hpp:39
static constexpr char NUL[]
Textual representation of a null / missing string: "<null>".
Definition StringUtils.hpp:44
static constexpr char EMPTY[]
Empty string constant: "".
Definition StringUtils.hpp:41
void detach(const std::shared_ptr< DXFeed > &feed) const
Detaches the underlying subscription from the given feed.
Definition SubscriptionController.cpp:37
std::int32_t getEventsBatchLimit() const
Returns the maximum number of events in a single notification of the listener.
Definition SubscriptionController.cpp:41
void setAggregationPeriod(std::int64_t aggregationPeriod) const
Sets the aggregation period of the events.
Definition SubscriptionController.cpp:61
std::shared_ptr< SubscriptionController > Ptr
The alias to a type of shared pointer to the SubscriptionController object.
Definition SubscriptionController.hpp:41
void setExecutor(const std::shared_ptr< Executor > &executor) const
Sets the executor that notifies the listener (for example, InPlaceExecutor).
Definition SubscriptionController.hpp:122
TimePeriod getAggregationPeriod() const
Returns the aggregation period of the events: the listener is notified at most once per this period,...
Definition SubscriptionController.cpp:49
void attach(const std::shared_ptr< DXFeed > &feed) const
Attaches the underlying subscription to the given feed.
Definition SubscriptionController.cpp:33
void setEventsBatchLimit(std::int32_t eventsBatchLimit) const
Sets the maximum number of events in a single notification of the listener.
Definition SubscriptionController.cpp:45
void setAggregationPeriod(std::chrono::milliseconds aggregationPeriod) const
Sets the aggregation period of the events.
Definition SubscriptionController.cpp:57
void setExecutor(std::nullptr_t) const
Makes the executor of the endpoint of the feed notify the listener.
Definition SubscriptionController.cpp:65
void setAggregationPeriod(const TimePeriod &aggregationPeriod) const
Sets the aggregation period of the events.
Definition SubscriptionController.cpp:53
std::optional< CandleSymbol > asCandleSymbol() const noexcept
Definition SymbolWrapper.cpp:237
SymbolWrapper(Symbol &&symbol) noexcept
Constructor for any wrapped symbol.
Definition SymbolWrapper.hpp:164
bool isIndexedEventSubscriptionSymbol() const noexcept
Definition SymbolWrapper.cpp:213
std::unique_ptr< void, decltype(&SymbolWrapper::freeGraal)> toGraalUnique() const
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition SymbolWrapper.cpp:173
std::string toString() const
Returns a string representation of the current object.
Definition SymbolWrapper.cpp:177
static SymbolWrapper fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition SymbolWrapper.cpp:129
std::string toStringUnderlying() const
Returns a string representation of the underlying object.
Definition SymbolWrapper.cpp:187
bool isStringSymbol() const noexcept
Definition SymbolWrapper.cpp:195
std::optional< IndexedEventSubscriptionSymbol > asIndexedEventSubscriptionSymbol() const noexcept
Definition SymbolWrapper.cpp:217
bool isWildcardSymbol() const noexcept
Definition SymbolWrapper.cpp:205
SymbolWrapper(const IndexedEventSubscriptionSymbol &indexedEventSubscriptionSymbol) noexcept
Constructor for IndexedEventSubscriptionSymbol.
Definition SymbolWrapper.cpp:66
std::string asStringSymbol() const noexcept
Definition SymbolWrapper.cpp:199
void * toGraal() const
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition SymbolWrapper.cpp:161
SymbolWrapper(const StringSymbol &stringSymbol) noexcept
Constructor for any wrapped string symbol.
Definition SymbolWrapper.cpp:54
std::optional< WildcardSymbol > asWildcardSymbol() const noexcept
Definition SymbolWrapper.cpp:209
SymbolWrapper(const CandleSymbol &candleSymbol) noexcept
Constructor for CandleSymbol.
Definition SymbolWrapper.cpp:82
SymbolWrapper(const WildcardSymbol &wildcardSymbol) noexcept
Constructor for any wrapped wildcard (*) symbol.
Definition SymbolWrapper.cpp:60
bool isTimeSeriesSubscriptionSymbol() const noexcept
Definition SymbolWrapper.cpp:223
SymbolWrapper(const TimeSeriesSubscriptionSymbol &timeSeriesSubscriptionSymbol) noexcept
Constructor for TimeSeriesSubscriptionSymbol.
Definition SymbolWrapper.cpp:74
bool isCandleSymbol() const noexcept
Definition SymbolWrapper.cpp:233
std::optional< TimeSeriesSubscriptionSymbol > asTimeSeriesSubscriptionSymbol() const noexcept
Definition SymbolWrapper.cpp:227
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition SymbolWrapper.cpp:91
const DataType & getData() const noexcept
Definition SymbolWrapper.cpp:243
Type of a time and sale event.
Definition TimeAndSaleType.hpp:25
static const DXFCPP_EXPORT std::span< const std::reference_wrapper< const TimeAndSaleType > > ALL
All elements of the enum (constant-initialized).
Definition TimeAndSaleType.hpp:27
static const DXFCPP_EXPORT TimeAndSaleType CORRECTION
Represents correction time and sale event.
Definition TimeAndSaleType.hpp:14
static const DXFCPP_EXPORT TimeAndSaleType NEW
Represents new time and sale event.
Definition TimeAndSaleType.hpp:13
static const DXFCPP_EXPORT TimeAndSaleType CANCEL
Represents cancel time and sale event.
Definition TimeAndSaleType.hpp:15
Immutable value class for a range of time periods: the minimum and the maximum period in milliseconds...
Definition TimePeriodInfo.hpp:30
constexpr std::int64_t getMax() const noexcept
Returns the maximum period in milliseconds.
Definition TimePeriodInfo.hpp:63
static const TimePeriodInfo EMPTY
The value meaning "known to be zero". It has zero minimum and maximum.
Definition TimePeriodInfo.hpp:17
constexpr bool isUnknown() const noexcept
Definition TimePeriodInfo.hpp:70
std::string toString() const
Returns the info as JSON with the periods in seconds, as Java does: {"min":1.5,"max":2}...
Definition TimePeriodInfo.cpp:103
static const TimePeriodInfo UNKNOWN
The value meaning "not set / unknown". It has negative minimum and maximum.
Definition TimePeriodInfo.hpp:16
constexpr std::int64_t getMin() const noexcept
Returns the minimum period in milliseconds.
Definition TimePeriodInfo.hpp:53
Value class for a period of time with support for ISO8601 duration format.
Definition TimePeriod.hpp:29
static const TimePeriod UNLIMITED
Time-period of "infinity" (time of std::numeric_limits<std::int64_t>::max() or LLONG_MAX).
Definition TimePeriod.hpp:15
static TimePeriod valueOf(std::chrono::milliseconds value)
Returns TimePeriod with value milliseconds.
Definition TimePeriod.cpp:21
std::int64_t getNanos() const
Returns value in nanoseconds.
Definition TimePeriod.cpp:37
static const TimePeriod ZERO
Time-period of zero.
Definition TimePeriod.hpp:14
std::int32_t getSeconds() const
Returns value in seconds.
Definition TimePeriod.cpp:33
std::int64_t getTime() const
Returns value in milliseconds.
Definition TimePeriod.cpp:29
TimePeriod(ConstructionKey, JavaObjectHandle< TimePeriod > &&handle)
Not a part of the API: it lets std::optional<TimePeriod> create the value in place (TimePeriod can no...
Definition TimePeriod.cpp:44
Represents time-series snapshots of some process that is evolving in time or actual events in some ex...
Definition TimeSeriesEvent.hpp:84
std::shared_ptr< TimeSeriesEvent > Ptr
The alias to a type of shared pointer to the TimeSeriesEvent object.
Definition TimeSeriesEvent.hpp:86
const IndexedEventSource & getSource() const &noexcept override
Returns the source identifier for this event, which is always DEFAULT for time-series events.
Definition TimeSeriesEvent.cpp:8
std::int64_t getIndex() const noexcept override
Returns unique per-symbol index of this event.
Definition TimeSeriesEvent.cpp:12
virtual std::int64_t getEventId() const noexcept
Returns unique per-symbol index of this event.
Definition TimeSeriesEvent.cpp:16
virtual std::int64_t getTime() const noexcept=0
Returns timestamp of the event.
Mixin for wrapping Promise method calls for a void.
Definition Promise.hpp:196
void await(std::int32_t timeoutInMilliseconds) const &
Wait for the computation to complete or timeout and return its result or throw an exception in case o...
Definition Promise.hpp:226
void await(const std::chrono::milliseconds &timeoutInMilliseconds) const &
Wait for the computation to complete or timeout and return its result or throw an exception in case o...
Definition Promise.hpp:241
void await() const
Wait for the computation to complete and return its result or throw an exception in case of exception...
Definition Promise.hpp:211
void getResult() const
Returns result of computation.
Definition Promise.hpp:202
static constexpr char RESERVED_PREFIX[]
Symbol prefix that is reserved for wildcard subscriptions.
Definition WildcardSymbol.hpp:33
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition WildcardSymbol.cpp:39
static const WildcardSymbol ALL
Represents [wildcard] subscription to all events of the specific event type.
Definition WildcardSymbol.hpp:13
static const WildcardSymbol & fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition WildcardSymbol.cpp:45
void * toGraal() const noexcept
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition WildcardSymbol.cpp:29
std::string toString() const
Returns string representation of this wildcard subscription symbol.
Definition WildcardSymbol.cpp:53
Whether T is std::shared_ptr<E>, where E is a descendant of LastingEvent (the elements of DXFeed::get...
Definition DXFeed.hpp:39
The simple key-value structure that represents an endpoint's property.
Definition api.h:196
const char * key
The property's key.
Definition api.h:198
const char * value
The property's value.
Definition api.h:200