dxFeed Graal CXX API v9.0.0
Loading...
Searching...
No Matches
CandleSymbol.hpp
1// Copyright (c) 2025 Devexperts LLC.
2// SPDX-License-Identifier: MPL-2.0
3
4#pragma once
5
6#include "../../detail/Conf.hpp"
7
8DXFCXX_DISABLE_MSC_WARNINGS_PUSH(4251)
9
10#include "../../detail/StringParam.hpp"
11#include "./CandleAlignment.hpp"
12#include "./CandleDataType.hpp"
13#include "./CandleExchange.hpp"
14#include "./CandlePeriod.hpp"
15#include "./CandlePrice.hpp"
16#include "./CandlePriceLevel.hpp"
17#include "./CandleSession.hpp"
18
19#include <cstdint>
20#include <memory>
21#include <optional>
22#include <string>
23#include <utility>
24#include <variant>
25
26/**
27 * @page candle_symbols Candle symbols
28 *
29 * A Candle event is requested with a candle symbol: a market symbol with attributes that say how to build the
30 * candles. The symbol is a CandleSymbol object or its string, `AAPL{=5m,price=bid}`: the base symbol, an optional
31 * `&` with an exchange code letter and an optional list of `key=value` pairs in curly braces. CandleSymbol::valueOf()
32 * and the `_c` literal parse such a string, the overloads of CandleSymbol::valueOf() with attributes build a symbol
33 * from objects: `CandleSymbol::valueOf("AAPL", CandlePeriod::valueOf(5, CandleType::MINUTE))`.
34 *
35 * <h3>Period</h3>
36 *
37 * The period has an empty key, `{=5m}`: an optional value (1 by default, a fraction and the exponential form are
38 * allowed: `{=0.5h}`, `{=1.5E1m}`) and a type. A symbol without a period gives tick candles (CandlePeriod::TICK).
39 *
40 * | Type | String | Example |
41 * |------------------------------|--------|----------------|
42 * | CandleType::TICK | `t` | `AAPL{=100t}` |
43 * | CandleType::SECOND | `s` | `AAPL{=30s}` |
44 * | CandleType::MINUTE | `m` | `AAPL{=5m}` |
45 * | CandleType::HOUR | `h` | `AAPL{=h}` |
46 * | CandleType::DAY | `d` | `AAPL{=d}` |
47 * | CandleType::WEEK | `w` | `AAPL{=w}` |
48 * | CandleType::MONTH | `mo` | `AAPL{=mo}` |
49 * | CandleType::OPTEXP | `o` | `AAPL{=o}` |
50 * | CandleType::YEAR | `y` | `AAPL{=y}` |
51 * | CandleType::VOLUME | `v` | `AAPL{=1000v}` |
52 * | CandleType::PRICE | `p` | `AAPL{=0.5p}` |
53 * | CandleType::PRICE_MOMENTUM | `pm` | `AAPL{=0.5pm}` |
54 * | CandleType::PRICE_RENKO | `pr` | `AAPL{=0.5pr}` |
55 *
56 * The type strings of the table are the canonical form, CandleSymbol::toString() writes them: a price is `p`. Like
57 * Java, the parser also takes the name of a type or the start of the name in any case (`{=5min}`, `{=day}`). An exact
58 * type string is taken first, and the start of a name is matched against the types in the order of the table, so a
59 * short string in a wrong case gives another type: `M` is a minute (a month is `mo`), `PR` and `Pr` are a price (a
60 * Renko price is `pr`). Both are typical mistakes, see below.
61 *
62 * <h3>Other attributes</h3>
63 *
64 * | Attribute | Key | Values |
65 * |-------------------------------------|---------|------------------------------------------------------------|
66 * | @ref CandlePrice "price" | `price` | `last` (default), `bid`, `ask`, `mark`, `s` (settlement) |
67 * | @ref CandleSession "session" | `tho` | `false` (all sessions, default), `true` (regular hours) |
68 * | @ref CandleAlignment "alignment" | `a` | `m` (at midnight, default), `s` (at the session start) |
69 * | @ref CandlePriceLevel "price level" | `pl` | a number, `NaN` by default |
70 * | @ref CandleDataType "data type" | `dt` | any string, for example `source`, `tho`, `all`, `rth`, `eth` |
71 * | @ref CandleExchange "exchange" | `&X` | after the base symbol, `AAPL&Q{=5m}`; composite by default |
72 *
73 * Examples:
74 *
75 * - `AAPL{=d}`: daily candles.
76 * - `AAPL{=15m,tho=true}`: 15-minute candles of the regular trading hours.
77 * - `AAPL{=h,a=s,tho=true}`: hourly candles that start at the start of the trading session (9:30 am ET), not at 9:00.
78 * - `EUR/USD{=m,price=bid}`: one-minute candles of the bid price.
79 * - `/ES{=d,price=s}`: daily candles of the settlement price.
80 *
81 * <h3>Typical mistakes</h3>
82 *
83 * A wrong candle symbol is valid for the parser and for the feed, so it gives no error, only no candles or other
84 * candles than expected.
85 *
86 * - **No period.** `AAPL` gives tick candles, not daily or minute ones. Write the period: `AAPL{=d}`, `AAPL{=1m}`, or
87 * `AAPL{=t}` when the tick candles are meant.
88 * - **`M` for a month.** `AAPL{=5M}` is 5 minutes, a month is `AAPL{=mo}`.
89 * - **`PR` for a Renko price.** `AAPL{=2PR}` is a price period, a Renko one is `AAPL{=2pr}`.
90 * - **The price of the trades for an instrument without trades.** The default price is `last`, the price of the
91 * trades. Forex and other instruments that are quoted, not traded, need `price=bid`, `price=ask` or `price=mark`.
92 * - **The session.** Without `tho=true` the candles are built from the data of all sessions (the default daily candles
93 * of US equities are special, see CandleSymbol); hourly candles of the regular trading hours that start at the
94 * start of the session need `a=s` too.
95 * - **A symbol passed as a string.** The string of a tick candle symbol has no period:
96 * `CandleSymbol::valueOf("AAPL{=t}").toString()` is `AAPL`. Pass the CandleSymbol object, not its string, where a
97 * symbol is expected.
98 *
99 * How far back the history of the candles goes depends on the period and on the data source: the shorter the period,
100 * the shorter the history.
101 *
102 * <h3>Warnings</h3>
103 *
104 * CandleSymbol::valueOf() of a string and the `_c` literal report a warning for the first three mistakes through
105 * ErrorManager (see @ref error_handling "Error handling"), and the symbol is created as before:
106 *
107 * `[dxfcpp] WARN #1 CandleSymbol (CandleSymbol.cpp:NNN): Candle symbol 'AAPL' has no period and gives tick candles; for
108 * other candles add a period, for example 'AAPL{=1m}' or 'AAPL{=d}', for tick candles write 'AAPL{=t}'`
109 *
110 * A warning is reported once per string, for the first 1000 strings in the process. The symbols of the received
111 * candles, the overloads of CandleSymbol::valueOf() with attributes and a string given to a subscription directly are
112 * not checked.
113 */
114
115/**
116 * \addtogroup dxfcpp_candle
117 * @{
118 */
119
120DXFCPP_BEGIN_NAMESPACE
121
122/**
123 * The common "variant" type for the candle attribute types
124 */
125using CandleSymbolAttributeVariant = std::variant<CandleExchange, CandlePrice, CandleSession, CandlePeriod,
126 CandleAlignment, CandlePriceLevel, CandleDataType>;
127
128/**
129 * Symbol that should be used with DXFeedSubscription class to subscribe for Candle events. `DXFeedSubscription` also
130 * accepts a string representation of the candle symbol for subscription.
131 *
132 * <h3>String representation</h3>
133 *
134 * The string representation of the candle symbol consist of a @ref CandleSymbol::getBaseSymbol() "baseSymbol" followed
135 * by an optional '&' with an @ref CandleSymbol::getExchange() "exchange" code letter and followed by an optional list
136 * of comma-separated key=value pairs in curly braces:
137 *
138 * <p><code>&lt;baseSymbol&gt; [ '&amp;' &lt;exchange&gt; ]
139 * [ '{' &lt;key1&gt;=&lt;value1&gt; [ ',' &lt;key2&gt;=&lt;value2&gt; ] ... '}' ]</code>
140 *
141 * <p>Properties of the candle symbol correspond to the keys in the string representation in the following way:
142 *
143 * <ul>
144 * <li>Empty key corresponds to @ref CandleSymbol::getPeriod() "period" &mdash; aggregation period of this symbol.
145 * The period value is composed of an optional @ref CandlePeriod::getValue() "value" which defaults to 1 when not
146 * specified, followed by a @ref CandlePeriod::getType() "type" string which is defined by one of the CandleType
147 * values and can be abbreviated to first letters. For example, a daily candle of "IBM" base symbol can be
148 * specified as "IBM{=d}" and 15 minute candle on it as "IBM{=15m}". The shortest possible abbreviation for
149 * CandleType::MONTH is "mo", so the monthly candle can be specified as "IBM{=mo}". When a period is not specified,
150 * then the CandlePeriod::TICK aggregation period is assumed as default. Note that tick aggregation may not be
151 * available on the demo system, which is limited to a subset of symbols and aggregation periods.
152 * <li>"price" key corresponds to @ref CandleSymbol::getPrice() "price" &mdash; price type attribute of this symbol.
153 * The CandlePrice defines possible values with CandlePrice::LAST being default.
154 * For legacy backwards-compatibility purposes, most of the price values cannot be abbreviated, so a one-minute
155 * candle of "EUR/USD" bid price shall be specified with "EUR/USD{=m,price=bid}" candle symbol string. However, the
156 * CandlePrice::SETTLEMENT can be abbreviated to "s", so a daily candle on "/ES" futures settlement prices can be
157 * specified with "/ES{=d,price=s}" string.
158 * <li>"tho" key with a value of "true" corresponds to @ref CandleSymbol::getSession() "session" set to
159 * CandleSession::REGULAR which limits the candle to trading hours only, so a 133 tick candles on "GOOG" base symbol
160 * collected over trading hours only can be specified with "GOOG{=133t,tho=true}" string. Note that the default daily
161 * candles for US equities are special for historical reasons and correspond to the way US equity exchange report their
162 * daily summary data. The volume of the US equity default daily candle corresponds to the total daily traded
163 * volume, while open, high, low, and close correspond to the regular trading hours only.
164 * <li>"a" key corresponds to @ref CandleSymbol::getAlignment() "alignment" &mdash; alignment attribute of this symbol.
165 * The CandleAlignment defines possible values with CandleAlignment::MIDNIGHT being default. The alignment values
166 * can be abbreviated to the first letter. So, a 1 hour candle on a symbol "AAPL" that starts at the regular
167 * trading session at 9:30 am ET can be specified with "AAPL{=h,a=s,tho=true}". Contrast that to
168 * the "AAPL{=h,tho=true}" candle that is aligned at midnight and thus starts at 9:00 am.
169 * <li>"pl" key corresponds to @ref CandleSymbol::getPriceLevel() "price level" &mdash; price level attribute of this
170 * symbol. The CandlePriceLevel defines additional axis to split candles within particular price corridor in addition to
171 * CandlePeriod attribute with the default value `NaN`. So a one-minute candles of "AAPL" with price level 0.1
172 * shall be specified with "AAPL{=m,pl=0.1}".
173 * <li>"dt" key corresponds to @ref CandleSymbol::getDataType() "data type" &mdash; data type attribute of this symbol.
174 * The CandleDataType defines which types of data are used to build the candles, with CandleDataType::UNDEFINED
175 * being default. Any string is a valid data type, and its value is case-sensitive, so one-minute candles of
176 * "AAPL" built from the extended trading hours data shall be specified with "AAPL{=m,dt=eth}".
177 * </ul>
178 *
179 * Keys in the candle symbol are case-sensitive, while values (except the data type) are not. The
180 * CandleSymbol::valueOf() method parses any valid string representation into a candle symbol object. The result of the
181 * candle symbol CandleSymbol::toString() method is always normalized: keys are ordered lexicographically, values (except
182 * the data type) are in lower-case and are abbreviated to their shortest possible form.
183 *
184 * The page @ref candle_symbols "Candle symbols" lists the attributes, examples and the typical mistakes.
185 */
187 /// Returns the candle symbol "<null>".
188 static CandleSymbol NUL();
189
190 private:
191 std::string symbol_{};
192 std::string baseSymbol_{};
193 std::optional<CandleExchange> exchange_{};
194 std::optional<CandlePrice> price_{};
195 std::optional<CandleSession> session_{};
196 std::optional<CandlePeriod> period_{};
197 std::optional<CandleAlignment> alignment_{};
198 std::optional<CandlePriceLevel> priceLevel_{};
199 std::optional<CandleDataType> dataType_{};
200
201 static std::string changeAttribute(StringParam symbol, const CandleSymbolAttributeVariant &attribute);
202
203 template <typename AttributeIt>
204 static std::string changeAttributes(StringParam symbol, AttributeIt begin, AttributeIt end) {
205 auto result = std::string(symbol.view());
206
207 for (auto it = begin; it != end; ++it) {
208 result = changeAttribute(result, *it);
209 }
210
211 return result;
212 }
213
214 static std::string normalize(StringParam symbol);
215
216 void initTransientFields(bool force = false);
217
218 explicit CandleSymbol(StringParam symbol);
219
220 CandleSymbol(StringParam symbol, const CandleSymbolAttributeVariant &attribute);
221
222 template <typename CandleSymbolAttributeIt>
223 CandleSymbol(StringParam symbol, CandleSymbolAttributeIt begin, CandleSymbolAttributeIt end)
224 : symbol_{normalize(changeAttributes(symbol, begin, end))} {
225 initTransientFields();
226 }
227
228 public:
229 /**
230 * Returns base market symbol without attributes.
231 *
232 * @return base market symbol without attributes.
233 */
234 const std::string &getBaseSymbol() const & noexcept;
235
236 /**
237 * Returns exchange attribute of this symbol.
238 *
239 * @return exchange attribute of this symbol.
240 */
241 const std::optional<CandleExchange> &getExchange() const & noexcept;
242
243 /**
244 * Returns the price type attribute of this symbol.
245 *
246 * @return price type attribute of this symbol.
247 */
248 const std::optional<CandlePrice> &getPrice() const & noexcept;
249
250 /**
251 * Returns the session attribute of this symbol.
252 *
253 * @return session attribute of this symbol.
254 */
255 const std::optional<CandleSession> &getSession() const & noexcept;
256
257 /**
258 * Returns the aggregation period of this symbol.
259 *
260 * @return aggregation period of this symbol.
261 */
262 const std::optional<CandlePeriod> &getPeriod() const & noexcept;
263
264 /**
265 * Returns alignment attribute of this symbol.
266 *
267 * @return alignment attribute of this symbol.
268 */
269 const std::optional<CandleAlignment> &getAlignment() const & noexcept;
270
271 /**
272 * Returns the price level attribute of this symbol.
273 *
274 * @return price level attribute of this symbol.
275 */
276 const std::optional<CandlePriceLevel> &getPriceLevel() const & noexcept;
277
278 /**
279 * Returns the data type attribute of this symbol.
280 *
281 * @return data type attribute of this symbol.
282 */
283 const std::optional<CandleDataType> &getDataType() const & noexcept;
284
285 /**
286 * Returns string representation of this symbol.
287 * The string representation can be transformed back into a symbol object
288 * using the CandleSymbol::valueOf() method.
289 *
290 * @return string representation of this symbol.
291 */
292 const std::string &toString() const & noexcept;
293
294 bool operator==(const CandleSymbol &candleSymbol) const noexcept;
295
296 bool operator<(const CandleSymbol &candleSymbol) const noexcept;
297
298 CandleSymbol(const CandleSymbol &candleSymbol);
299 CandleSymbol(CandleSymbol &&candleSymbol);
300 CandleSymbol &operator=(const CandleSymbol &candleSymbol);
301 CandleSymbol &operator=(CandleSymbol &&candleSymbol);
302 CandleSymbol() noexcept;
303 virtual ~CandleSymbol() noexcept;
304
305 /**
306 * Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
307 * Fills the dxFeed Graal SDK structure's fields by the data of the current entity (recursively if necessary).
308 * Returns the pointer to the filled structure.
309 *
310 * @return The pointer to the filled dxFeed Graal SDK structure
311 */
312 virtual void *toGraal() const;
313
314 /**
315 * Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
316 *
317 * @param graalNative The pointer to the dxFeed Graal SDK structure.
318 * @throws InvalidArgumentException
319 */
320 static void freeGraal(void *graalNative);
321
322 /**
323 * Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
324 *
325 * @param graalNative The pointer to the dxFeed Graal SDK structure.
326 * @return The object of the current type.
327 * @throws InvalidArgumentException
328 */
329 static CandleSymbol fromGraal(void *graalNative);
330
331 /**
332 * Converts the given string symbol into the candle symbol object.
333 *
334 * A string without a period (it gives tick candles) or with a period of the type `M` or `PR` gets a warning through
335 * ErrorManager, once per string, see @ref candle_symbols "Candle symbols". The symbol is created anyway.
336 *
337 * @param symbol The string symbol.
338 * @return The candle symbol object.
339 * @throws InvalidArgumentException if the string cannot be parsed.
340 */
341 static CandleSymbol valueOf(StringParam symbol);
342
343 /**
344 * Converts the given string symbol into the candle symbol object with the specified attribute set.
345 *
346 * @param symbol The string symbol.
347 * @param attribute The attribute to set.
348 * @return The candle symbol object.
349 */
350 static CandleSymbol valueOf(StringParam symbol, const CandleSymbolAttributeVariant &attribute);
351
352 /**
353 * Converts the given string symbol into the candle symbol object with the specified attribute set (iterators).
354 *
355 * @tparam CandleSymbolAttributeIt The attribute iterator type.
356 * @param symbol The string symbol.
357 * @param begin The beginning of the collection of attributes.
358 * @param end The end of the collection of attributes.
359 * @return
360 */
361 template <typename CandleSymbolAttributeIt>
362 static CandleSymbol valueOf(StringParam symbol, CandleSymbolAttributeIt begin, CandleSymbolAttributeIt end) {
363 return CandleSymbol{symbol, begin, end};
364 }
365
366 /**
367 * Converts the given string symbol into the candle symbol object with the specified attributes set (initializer
368 * list).
369 *
370 * @param symbol The string symbol.
371 * @param attributes More attributes to set.
372 * @return The candle symbol object.
373 */
374 static CandleSymbol valueOf(StringParam symbol, std::initializer_list<CandleSymbolAttributeVariant> attributes);
375
376 /**
377 * Converts the given string symbol into the candle symbol object with the specified attributes set.
378 *
379 * @tparam CandleSymbolAttributesCollection The collection of attributes type.
380 * @param symbol The string symbol.
381 * @param attributes More attributes to set.
382 * @return The candle symbol object.
383 */
384 template <typename CandleSymbolAttributesCollection>
386 { std::begin(attributes) };
387 { std::end(attributes) };
388 }
392};
393
394inline namespace literals {
395
396/**
397 * String literal that helps to construct CandleSymbol from a char array. It checks the string as
398 * CandleSymbol::valueOf() does.
399 *
400 * @param string The char array
401 * @param length Tha char array's length
402 * @return Wrapped string view built on char array
403 */
404DXFCPP_EXPORT CandleSymbol operator""_c(const char *string, size_t length);
405
406} // namespace literals
407
408DXFCPP_END_NAMESPACE
409
410/// @}
411
412template <> struct std::hash<dxfcpp::CandleSymbol> {
413 std::size_t operator()(const dxfcpp::CandleSymbol &candleSymbol) const noexcept {
414 return std::hash<std::string>{}(candleSymbol.toString());
415 }
416};
417
418DXFCXX_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
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
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
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
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
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
std::variant< CandleExchange, CandlePrice, CandleSession, CandlePeriod, CandleAlignment, CandlePriceLevel, CandleDataType > CandleSymbolAttributeVariant
The common "variant" type for the candle attribute types.
Definition CandleSymbol.hpp:125
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
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
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
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
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
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
Base class for all market events.
Definition MarketEvent.hpp:31
Observable set of subscription symbols.
Definition ObservableSubscription.hpp:26
Provides on-demand historical tick data replay controls.
Definition OnDemandService.hpp:77
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
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
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
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
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
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