dxFeed Graal Native SDK 3.14.0-rc2
Loading...
Searching...
No Matches
Events (v4)

The v4 functions and type names of dxfg_events.h. Every function returns DXFG_EXECUTE_SUCCESSFULLY or DXFG_EXECUTE_FAIL and writes its result to a DXFG_OUT parameter, see The v4 functions. More...

Typedefs

typedef dxfg_indexed_event_source_type_t dxfg_v4_indexed_event_source_type_t
 The kind of an event source, see dxfg_indexed_event_source_t.
typedef dxfg_indexed_event_source_t dxfg_v4_indexed_event_source_t
 The source of indexed events.
typedef dxfg_indexed_event_source_list dxfg_v4_indexed_event_source_list
 A list of event sources.
typedef dxfg_symbol_type_t dxfg_v4_symbol_type_t
 The kind of a symbol, see dxfg_symbol_t.
typedef dxfg_symbol_t dxfg_v4_symbol_t
 The base structure of every symbol: the first field of all the symbol structures.
typedef dxfg_string_symbol_t dxfg_v4_string_symbol_t
 A string symbol (for example, a ticker).
typedef dxfg_wildcard_symbol_t dxfg_v4_wildcard_symbol_t
 The wildcard symbol: the subscription to all symbols of an event type.
typedef dxfg_candle_symbol_t dxfg_v4_candle_symbol_t
 A candle symbol.
typedef dxfg_indexed_event_subscription_symbol_t dxfg_v4_indexed_event_subscription_symbol_t
 The subscription to the indexed events of one source.
typedef dxfg_time_series_subscription_symbol_t dxfg_v4_time_series_subscription_symbol_t
 The subscription to the time series of events from a time.
typedef dxfg_symbol_list dxfg_v4_symbol_list
 A list of symbols.
typedef dxfg_event_clazz_t dxfg_v4_event_clazz_t
 The class of an event: tells which structure an event (dxfg_event_type_t) is.
typedef dxfg_event_type_t dxfg_v4_event_type_t
 The base structure of every event: the first field of all the event structures.
typedef dxfg_market_event_t dxfg_v4_market_event_t
 The base structure of the market events: the event symbol and the event time.
typedef dxfg_quote_t dxfg_v4_quote_t
 The quote event: a snapshot of the best bid and ask prices and sizes.
typedef dxfg_profile_t dxfg_v4_profile_t
 The profile event: a snapshot of the description of a security instrument.
typedef dxfg_summary_t dxfg_v4_summary_t
 The summary event: a snapshot of the trading session information (highs, lows and so on).
typedef dxfg_greeks_t dxfg_v4_greeks_t
 The Greeks event: a snapshot of the option price, the Black-Scholes volatility and the greeks.
typedef dxfg_candle_t dxfg_v4_candle_t
 The candle event: OHLC prices and other information for a specific period.
typedef dxfg_daily_candle_t dxfg_v4_daily_candle_t
 The daily candle event (deprecated in Java, use dxfg_candle_t): a candle with the same fields.
typedef dxfg_underlying_t dxfg_v4_underlying_t
 The underlying event: a snapshot of the values computed for an option underlying symbol.
typedef dxfg_theo_price_t dxfg_v4_theo_price_t
 The theo price event: a snapshot of the theoretical option price computation.
typedef dxfg_trade_base_t dxfg_v4_trade_base_t
 The common fields of the trade events: dxfg_trade_t and dxfg_trade_eth_t.
typedef dxfg_trade_t dxfg_v4_trade_t
 The trade event: the last trade during the regular trading hours (RTH) and the volume and turnover of the day.
typedef dxfg_trade_eth_t dxfg_v4_trade_eth_t
 The TradeETH event: the last trade during the extended trading hours (ETH) and their volume and turnover.
typedef dxfg_configuration_t dxfg_v4_configuration_t
 The configuration event: an application-specific attachment with a version.
typedef dxfg_message_t dxfg_v4_message_t
 The message event: a notification with an application-specific attachment.
typedef dxfg_time_and_sale_t dxfg_v4_time_and_sale_t
 The time and sale event: a trade or another market event with a price, in a continuous time slice.
typedef dxfg_option_sale_t dxfg_v4_option_sale_t
 The option sale event: a trade or another market event with a price for an option of an underlying.
typedef dxfg_market_maker_t dxfg_v4_market_maker_t
 The market maker event: a snapshot of the aggregated top quotes of a market participant.
typedef dxfg_order_base_t dxfg_v4_order_base_t
 The common fields of the order events: dxfg_order_t, dxfg_spread_order_t and the structures built on them.
typedef dxfg_order_t dxfg_v4_order_t
 The order event: a snapshot of the market depth (an order or a price level) of a symbol.
typedef dxfg_analytic_order_t dxfg_v4_analytic_order_t
 The analytic order event: an order with the iceberg information.
typedef dxfg_otc_markets_order_t dxfg_v4_otc_markets_order_t
 The OTC Markets order event: an order with the OTC Markets specific quote data.
typedef dxfg_spread_order_t dxfg_v4_spread_order_t
 The spread order event: a snapshot of the market depth of the spreads on an underlying symbol.
typedef dxfg_series_t dxfg_v4_series_t
 The series event: a snapshot of the values computed for an option series of an underlying symbol.
typedef dxfg_text_message_t dxfg_v4_text_message_t
 The text message event: a notification with a text.
typedef dxfg_text_configuration_t dxfg_v4_text_configuration_t
 The text configuration event: a text with a version.
typedef dxfg_nuam_order_t dxfg_v4_nuam_order_t
 The Nuam order event: an order with the data of the Nuam Exchange matching engine.
typedef dxfg_nuam_time_and_sale_t dxfg_v4_nuam_time_and_sale_t
 The Nuam time and sale event: a time and sale with the data of the Nuam Exchange.
typedef dxfg_nuam_trade_t dxfg_v4_nuam_trade_t
 The Nuam trade event: a trade with the trade statistics of the Nuam Exchange.
typedef dxfg_order_imbalance_t dxfg_v4_order_imbalance_t
 The order imbalance event: the order book statistics during an auction.
typedef dxfg_event_type_list dxfg_v4_event_type_list
 A list of events.
typedef dxfg_event_clazz_list_t dxfg_v4_event_clazz_list
 A list of event classes.
typedef dxfg_observable_subscription_change_listener_t dxfg_v4_observable_subscription_change_listener_t
 A handle of a Java ObservableSubscriptionChangeListener object; release it with dxfg_JavaObjectHandler_release().
typedef dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsAdded
typedef dxfg_ObservableSubscriptionChangeListener_function_symbolsRemoved dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsRemoved
typedef dxfg_ObservableSubscriptionChangeListener_function_subscriptionClosed dxfg_v4_ObservableSubscriptionChangeListener_function_subscriptionClosed
typedef void(*) dxfg_v4_ObservableSubscriptionChangeListener_function_configurationChanged(graal_isolatethread_t *thread, void *user_data)
 The callback of a subscription change listener: the configuration of the subscription changed.

Functions

int32_t dxfg_v4_Symbol_new (graal_isolatethread_t *thread, const char *symbol, dxfg_v4_symbol_type_t symbolType, DXFG_OUT dxfg_v4_symbol_t **newSymbol)
int32_t dxfg_v4_Symbol_release (graal_isolatethread_t *thread, dxfg_v4_symbol_t *symbol)
int32_t dxfg_v4_EventType_new (graal_isolatethread_t *thread, const char *symbolName, dxfg_v4_event_clazz_t clazz, DXFG_OUT dxfg_v4_event_type_t **event)
int32_t dxfg_v4_EventType_release (graal_isolatethread_t *thread, dxfg_v4_event_type_t *eventType)
int32_t dxfg_v4_event_type_list_release (graal_isolatethread_t *thread, dxfg_v4_event_type_list *eventTypes)
int32_t dxfg_v4_event_clazz_list_release (graal_isolatethread_t *thread, dxfg_v4_event_clazz_list *eventClazzes)
int32_t dxfg_v4_symbol_list_release (graal_isolatethread_t *thread, dxfg_v4_symbol_list *symbols)
int32_t dxfg_v4_IndexedEvent_getSource (graal_isolatethread_t *thread, dxfg_v4_event_type_t *eventType, DXFG_OUT dxfg_v4_indexed_event_source_t **source)
int32_t dxfg_v4_IndexedEventSource_new (graal_isolatethread_t *thread, const char *source, DXFG_OUT dxfg_v4_indexed_event_source_t **newSource)
int32_t dxfg_v4_IndexedEventSource_newWithId (graal_isolatethread_t *thread, int32_t sourceId, DXFG_OUT dxfg_v4_indexed_event_source_t **source)
int32_t dxfg_v4_IndexedEventSource_release (graal_isolatethread_t *thread, dxfg_v4_indexed_event_source_t *source)
int32_t dxfg_v4_indexed_event_source_list_release (graal_isolatethread_t *thread, dxfg_v4_indexed_event_source_list *list)
int32_t dxfg_v4_ObservableSubscriptionChangeListener_new (graal_isolatethread_t *thread, dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsAdded function_symbolsAdded, dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsRemoved function_symbolsRemoved, dxfg_v4_ObservableSubscriptionChangeListener_function_subscriptionClosed function_subscriptionClosed, void *user_data, DXFG_OUT dxfg_v4_observable_subscription_change_listener_t **listener)
int32_t dxfg_v4_ObservableSubscriptionChangeListener_newWithConfigurationChanged (graal_isolatethread_t *thread, dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsAdded function_symbolsAdded, dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsRemoved function_symbolsRemoved, dxfg_v4_ObservableSubscriptionChangeListener_function_subscriptionClosed function_subscriptionClosed, dxfg_v4_ObservableSubscriptionChangeListener_function_configurationChanged function_configurationChanged, void *user_data, DXFG_OUT dxfg_v4_observable_subscription_change_listener_t **listener)
 Creates a listener of the changes of a subscription that is also told about the changes of its configuration.

Detailed Description

The v4 functions and type names of dxfg_events.h. Every function returns DXFG_EXECUTE_SUCCESSFULLY or DXFG_EXECUTE_FAIL and writes its result to a DXFG_OUT parameter, see The v4 functions.

Typedef Documentation

◆ dxfg_v4_analytic_order_t

The analytic order event: an order with the iceberg information.

It is an indexed event, its clazz is DXFG_EVENT_ANALYTIC_ORDER.

Javadoc

◆ dxfg_v4_candle_symbol_t

◆ dxfg_v4_candle_t

The candle event: OHLC prices and other information for a specific period.

It is a lasting event and a time series event, its clazz is DXFG_EVENT_CANDLE.

Javadoc

◆ dxfg_v4_configuration_t

The configuration event: an application-specific attachment with a version.

It is a lasting event, its clazz is DXFG_EVENT_CONFIGURATION.

Javadoc

The attachment is handled as in dxfg_message_t. For a string payload prefer dxfg_text_configuration_t.

◆ dxfg_v4_daily_candle_t

The daily candle event (deprecated in Java, use dxfg_candle_t): a candle with the same fields.

Its clazz is DXFG_EVENT_DAILY_CANDLE.

Javadoc

◆ dxfg_v4_event_clazz_list

A list of event classes.

The list returned by the SDK is released with dxfg_CList_EventClazz_release().

◆ dxfg_v4_event_clazz_t

The class of an event: tells which structure an event (dxfg_event_type_t) is.

In the Java implementation, all events are lined up in a hierarchy from the underlying EventType interface. In the C implementation, we specify the type in the event in a separate field because we cannot get it from the class name.

The comment of every value names the Java event class and its kind: a lasting event (LastingEvent: only the latest event of a symbol is kept), an indexed event (IndexedEvent: events of a symbol are told apart by an index and a source) or a time series event (TimeSeriesEvent: an indexed event with a time). The kind of the base class is inherited by its subclasses. The structure of a value is named by the value (DXFG_EVENT_QUOTE: dxfg_quote_t).

◆ dxfg_v4_event_type_list

A list of events.

The list returned by the SDK (or passed by the SDK to a listener) is released with dxfg_CList_EventType_release().

◆ dxfg_v4_event_type_t

The base structure of every event: the first field of all the event structures.

clazz tells which event structure the pointer really points to (for example, DXFG_EVENT_QUOTE: dxfg_quote_t); cast the pointer to that structure to read the other fields.

Who creates and releases an event:

  • dxfg_EventType_new() creates an event that the caller owns; all its fields besides clazz and the symbol are zero (not NaN).
  • The SDK creates the events that it passes to a listener or returns as a result. An event passed to a listener belongs to the SDK: it is freed after the listener returns, copy what you need to keep. The events returned as a result belong to the caller.
  • An event of either origin, and a list of events, is released with dxfg_EventType_release() and dxfg_CList_EventType_release(): that frees the structure together with all its strings (the const char * fields, such as the event symbol).

Javadoc

◆ dxfg_v4_greeks_t

The Greeks event: a snapshot of the option price, the Black-Scholes volatility and the greeks.

It is a lasting event and a time series event, its clazz is DXFG_EVENT_GREEKS.

Javadoc

◆ dxfg_v4_indexed_event_source_list

A list of event sources.

The list returned by the SDK is released with dxfg_CList_IndexedEventSource_release().

◆ dxfg_v4_indexed_event_source_t

The source of indexed events.

Create it with dxfg_IndexedEventSource_new() or dxfg_IndexedEventSource_new2(), release it with dxfg_IndexedEventSource_release(). The sources that the SDK returns (for example, by dxfg_IndexedEvent_getSource()) are released the same way.

Javadoc

◆ dxfg_v4_indexed_event_source_type_t

◆ dxfg_v4_indexed_event_subscription_symbol_t

The subscription to the indexed events of one source.

Javadoc

◆ dxfg_v4_market_event_t

The base structure of the market events: the event symbol and the event time.

Javadoc

◆ dxfg_v4_market_maker_t

The market maker event: a snapshot of the aggregated top quotes of a market participant.

It is an indexed event, its clazz is DXFG_EVENT_MARKET_MAKER.

Javadoc

◆ dxfg_v4_message_t

The message event: a notification with an application-specific attachment.

It is neither a lasting nor an indexed event: messages are never conflated, its clazz is DXFG_EVENT_MESSAGE.

Javadoc

The attachment (the same for dxfg_configuration_t) is a UTF-8 null-terminated string (const char *, declared as void *) or NULL when there is no attachment:

  • Java -> C: a String attachment is passed as is, the other objects are passed as their string representation (toString()), no attachment is NULL. An attachment that Java cannot deserialize (e.g. its class is not registered for the native image) is NULL too, the SDK logs a warning then.
  • C -> Java: the attachment becomes a String, NULL is no attachment.

So a non-string attachment loses its type when it passes through C: if the event is published back (or forwarded to another endpoint), the Java receivers get the string instead of the original object.

The C API does not support arbitrary Java attachments: C can neither create nor read them. For a string payload prefer dxfg_text_message_t and dxfg_text_configuration_t (TextMessage, TextConfiguration): their text is a plain string that passes both ways without loss.

Memory:

  • The events that the SDK gives to the caller (to a listener, from dxfg_DXFeed_getLastEvent(), a promise, etc.) own their strings: the SDK frees them with the event (after the listener returns, or with dxfg_EventType_release() and dxfg_CList_EventType_release()). Copy the attachment to keep it longer.
  • The events that the caller allocates itself and passes to the SDK (dxfg_DXPublisher_publishEvents(), etc.) are only read: the SDK copies the attachment during the call, the caller allocates and frees it.
  • dxfg_EventType_release() of an event created by dxfg_EventType_new() frees its strings with the SDK's allocator. If the caller sets the attachment of such an event to its own string, it resets the attachment to NULL before the release and frees the string itself (the allocators of the caller and of the SDK may differ, e.g. on Windows).

◆ dxfg_v4_nuam_order_t

The Nuam order event: an order with the data of the Nuam Exchange matching engine.

It is an indexed event, its clazz is DXFG_EVENT_NUAM_ORDER.

https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamOrder.html

Experimental
It may change or be removed in a minor release, see The v4 functions.

◆ dxfg_v4_nuam_time_and_sale_t

The Nuam time and sale event: a time and sale with the data of the Nuam Exchange.

It is a time series event, its clazz is DXFG_EVENT_NUAM_TIME_AND_SALE.

https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamTimeAndSale.html

Experimental
It may change or be removed in a minor release, see The v4 functions.

◆ dxfg_v4_nuam_trade_t

The Nuam trade event: a trade with the trade statistics of the Nuam Exchange.

It is a lasting event, its clazz is DXFG_EVENT_NUAM_TRADE.

https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamTrade.html

Experimental
It may change or be removed in a minor release, see The v4 functions.

◆ dxfg_v4_observable_subscription_change_listener_t

A handle of a Java ObservableSubscriptionChangeListener object; release it with dxfg_JavaObjectHandler_release().

Javadoc

◆ dxfg_v4_ObservableSubscriptionChangeListener_function_configurationChanged

typedef void(*) dxfg_v4_ObservableSubscriptionChangeListener_function_configurationChanged(graal_isolatethread_t *thread, void *user_data)

The callback of a subscription change listener: the configuration of the subscription changed.

The configuration is the non-functional settings of the subscription, such as its aggregation period: for example, dxfg_v4_DXFeedSubscription_setAggregationPeriod() with a value other than the current one calls it, the same value does not. It is called by the thread that changed the configuration, before that function returns, while the SDK holds the lock of the subscription.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]user_dataThe user data passed to dxfg_v4_ObservableSubscriptionChangeListener_newWithConfigurationChanged().
Since
3.13.0

◆ dxfg_v4_ObservableSubscriptionChangeListener_function_subscriptionClosed

The callback of a subscription change listener: the subscription was closed, or the listener was removed from it.

It is called in the same way as dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]user_dataThe user data passed to dxfg_ObservableSubscriptionChangeListener_new().

◆ dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsAdded

The callback of a subscription change listener: symbols were added to the subscription.

It is called by the SDK after the symbols are added to the subscription of the Java side, on a Java thread (not necessarily the thread that registered the listener), while the SDK holds the lock of the subscription: the notifications of one subscription do not run at the same time. The symbols are decorated depending on the subscription: for a time series subscription they are dxfg_time_series_subscription_symbol_t.

The list belongs to the SDK and is freed after the function returns: do not release it, copy the symbols that you need to keep.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]symbolsThe added symbols.
[in]user_dataThe user data passed to dxfg_ObservableSubscriptionChangeListener_new().

◆ dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsRemoved

The callback of a subscription change listener: symbols were removed from the subscription.

It is called in the same way as dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded, after the symbols are removed from the subscription.

The list belongs to the SDK and is freed after the function returns: do not release it, copy the symbols that you need to keep.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]symbolsThe removed symbols.
[in]user_dataThe user data passed to dxfg_ObservableSubscriptionChangeListener_new().

◆ dxfg_v4_option_sale_t

The option sale event: a trade or another market event with a price for an option of an underlying.

It is an indexed event with the default source, its clazz is DXFG_EVENT_OPTION_SALE.

Javadoc

◆ dxfg_v4_order_base_t

The common fields of the order events: dxfg_order_t, dxfg_spread_order_t and the structures built on them.

It is an indexed event: a snapshot of the market depth of a symbol. Its clazz is DXFG_EVENT_ORDER_BASE.

Javadoc

◆ dxfg_v4_order_imbalance_t

The order imbalance event: the order book statistics during an auction.

It is a market event (neither lasting nor indexed), its clazz is DXFG_EVENT_ORDER_IMBALANCE.

https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/market/OrderImbalance.html

Experimental
It may change or be removed in a minor release, see The v4 functions.

◆ dxfg_v4_order_t

The order event: a snapshot of the market depth (an order or a price level) of a symbol.

It is an indexed event, its clazz is DXFG_EVENT_ORDER.

Javadoc

◆ dxfg_v4_otc_markets_order_t

The OTC Markets order event: an order with the OTC Markets specific quote data.

It is an indexed event, its clazz is DXFG_EVENT_OTC_MARKETS_ORDER. The original OTC quote is presented as two events: the bid and the ask side.

Javadoc

◆ dxfg_v4_profile_t

The profile event: a snapshot of the description of a security instrument.

It is a lasting event, its clazz is DXFG_EVENT_PROFILE.

Javadoc

◆ dxfg_v4_quote_t

The quote event: a snapshot of the best bid and ask prices and sizes.

 <a href="https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/LastingEvent.html">Javadoc</a>
&zwj;/

typedef struct dxfg_lasting_event_t { } dxfg_lasting_event_t;

/** Javadoc ‍/ typedef struct dxfg_indexed_event_t { // dxfg_indexed_event_source_t source; // int32_t event_flags; // int64_t index; } dxfg_indexed_event_t;

/** Javadoc ‍/ typedef struct dxfg_time_series_event_t { dxfg_indexed_event_t indexed_event; // int64_t time; } dxfg_time_series_event_t;

/**

It is a lasting event, its clazz is DXFG_EVENT_QUOTE.

Javadoc

◆ dxfg_v4_series_t

The series event: a snapshot of the values computed for an option series of an underlying symbol.

It is an indexed event, its clazz is DXFG_EVENT_SERIES.

Javadoc

◆ dxfg_v4_spread_order_t

The spread order event: a snapshot of the market depth of the spreads on an underlying symbol.

It is an indexed event, its clazz is DXFG_EVENT_SPREAD_ORDER.

Javadoc

◆ dxfg_v4_string_symbol_t

A string symbol (for example, a ticker).

◆ dxfg_v4_summary_t

The summary event: a snapshot of the trading session information (highs, lows and so on).

It is a lasting event, its clazz is DXFG_EVENT_SUMMARY.

Javadoc

◆ dxfg_v4_symbol_list

A list of symbols.

The list returned by the SDK (or passed by the SDK to a listener) is released with dxfg_CList_symbol_release().

◆ dxfg_v4_symbol_t

The base structure of every symbol: the first field of all the symbol structures.

type tells which of the structures dxfg_string_symbol_t, dxfg_candle_symbol_t, dxfg_wildcard_symbol_t, dxfg_indexed_event_subscription_symbol_t and dxfg_time_series_subscription_symbol_t the pointer really points to; cast the pointer to it to read the other fields.

A symbol created by dxfg_Symbol_new() or returned by the SDK is released with dxfg_Symbol_release() (a list of symbols with dxfg_CList_symbol_release()): that frees the structure, its strings and the nested symbols and sources.

◆ dxfg_v4_symbol_type_t

The kind of a symbol, see dxfg_symbol_t.

◆ dxfg_v4_text_configuration_t

The text configuration event: a text with a version.

It is a lasting event, its clazz is DXFG_EVENT_TEXT_CONFIGURATION.

Javadoc

◆ dxfg_v4_text_message_t

The text message event: a notification with a text.

It is neither a lasting nor an indexed event: messages are never conflated, its clazz is DXFG_EVENT_TEXT_MESSAGE.

Javadoc

◆ dxfg_v4_theo_price_t

The theo price event: a snapshot of the theoretical option price computation.

It is a lasting event and a time series event, its clazz is DXFG_EVENT_THEO_PRICE.

Javadoc

◆ dxfg_v4_time_and_sale_t

The time and sale event: a trade or another market event with a price, in a continuous time slice.

It is a time series event, its clazz is DXFG_EVENT_TIME_AND_SALE. Its time is the one in index, there is no separate time field.

Javadoc

◆ dxfg_v4_time_series_subscription_symbol_t

The subscription to the time series of events from a time.

The source of such a subscription is always the default one.

Javadoc

◆ dxfg_v4_trade_base_t

The common fields of the trade events: dxfg_trade_t and dxfg_trade_eth_t.

It is a lasting event, the information about the last trade. There is no event class of its own in the C API.

Javadoc

◆ dxfg_v4_trade_eth_t

The TradeETH event: the last trade during the extended trading hours (ETH) and their volume and turnover.

It is a lasting event, its clazz is DXFG_EVENT_TRADE_ETH.

Javadoc

◆ dxfg_v4_trade_t

The trade event: the last trade during the regular trading hours (RTH) and the volume and turnover of the day.

It is a lasting event, its clazz is DXFG_EVENT_TRADE.

Javadoc

◆ dxfg_v4_underlying_t

The underlying event: a snapshot of the values computed for an option underlying symbol.

It is a lasting event and a time series event, its clazz is DXFG_EVENT_UNDERLYING.

Javadoc

◆ dxfg_v4_wildcard_symbol_t

The wildcard symbol: the subscription to all symbols of an event type.

It has no fields besides the base structure.

Javadoc

Function Documentation

◆ dxfg_v4_event_clazz_list_release()

int32_t dxfg_v4_event_clazz_list_release ( graal_isolatethread_t * thread,
dxfg_v4_event_clazz_list * eventClazzes )

Releases a list of event classes: frees the list, its array and every element. Passing NULL does nothing.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]eventClazzesThe list of event classes returned by the SDK.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_event_type_list_release()

int32_t dxfg_v4_event_type_list_release ( graal_isolatethread_t * thread,
dxfg_v4_event_type_list * eventTypes )

Releases a list of events: frees the list, its array and every event of the list together with its strings. Passing NULL does nothing.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]eventTypesThe list of events returned by the SDK.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_EventType_new()

int32_t dxfg_v4_EventType_new ( graal_isolatethread_t * thread,
const char * symbolName,
dxfg_v4_event_clazz_t clazz,
DXFG_OUT dxfg_v4_event_type_t ** event )

Creates an event of the given class for the given symbol.

The event has the given clazz and event symbol (a copy of the string), all the other fields are zero (not NaN and not the defaults of the Java event). Fill the fields, then pass the event to a function that needs it.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]symbolNameThe event symbol: a UTF-8 null-terminated string. For DXFG_EVENT_CANDLE and DXFG_EVENT_DAILY_CANDLE it is the string form of a candle symbol.
[in]clazzThe class of the event to create.
[out]eventThe pointer to the variable that receives the event (release it with dxfg_v4_EventType_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_EventType_release()

int32_t dxfg_v4_EventType_release ( graal_isolatethread_t * thread,
dxfg_v4_event_type_t * eventType )

Releases an event: frees the structure together with all its strings. Passing NULL does nothing.

Use it for the events created by dxfg_v4_EventType_new() and for the events that the SDK returns to the caller as a result. Do not release an event that the SDK passed to a listener: the SDK frees it after the listener returns.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]eventTypeThe event to release.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_indexed_event_source_list_release()

int32_t dxfg_v4_indexed_event_source_list_release ( graal_isolatethread_t * thread,
dxfg_v4_indexed_event_source_list * list )

Releases a list of event sources: frees the list, its array and every source of the list with its name. Passing NULL does nothing.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]listThe list of sources returned by the SDK.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_IndexedEvent_getSource()

int32_t dxfg_v4_IndexedEvent_getSource ( graal_isolatethread_t * thread,
dxfg_v4_event_type_t * eventType,
DXFG_OUT dxfg_v4_indexed_event_source_t ** source )

Returns the source of an indexed event.

It works for the events of DXFG_EVENT_GREEKS, DXFG_EVENT_CANDLE, DXFG_EVENT_DAILY_CANDLE, DXFG_EVENT_TIME_AND_SALE, DXFG_EVENT_UNDERLYING, DXFG_EVENT_THEO_PRICE and DXFG_EVENT_SERIES (the default source) and of DXFG_EVENT_ORDER_BASE, DXFG_EVENT_ORDER, DXFG_EVENT_ANALYTIC_ORDER and DXFG_EVENT_SPREAD_ORDER (the source stored in the index of the order). For the events of any other class the function fails.

Java: IndexedEvent.getSource().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]eventTypeThe event.
[out]sourceThe pointer to the variable that receives the source (release it with dxfg_v4_IndexedEventSource_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_IndexedEventSource_new()

int32_t dxfg_v4_IndexedEventSource_new ( graal_isolatethread_t * thread,
const char * source,
DXFG_OUT dxfg_v4_indexed_event_source_t ** newSource )

Creates an event source by its name.

Java: OrderSource.valueOf(String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sourceThe name of the order source: a UTF-8 null-terminated string, either predefined or at most four alphanumeric characters. If it is NULL, the default source (the identifier 0) is returned instead.
[out]newSourceThe pointer to the variable that receives the source (release it with dxfg_v4_IndexedEventSource_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error (for example, for an invalid name). Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_IndexedEventSource_newWithId()

int32_t dxfg_v4_IndexedEventSource_newWithId ( graal_isolatethread_t * thread,
int32_t sourceId,
DXFG_OUT dxfg_v4_indexed_event_source_t ** source )

Creates an event source by its identifier.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sourceIdThe identifier of the source. If it is 0, the default source is returned, otherwise it is the identifier of an order source (a negative identifier is an error).
[out]sourceThe pointer to the source (release it with dxfg_v4_IndexedEventSource_release()). It is not written on error.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

Java: OrderSource.valueOf(int).

◆ dxfg_v4_IndexedEventSource_release()

int32_t dxfg_v4_IndexedEventSource_release ( graal_isolatethread_t * thread,
dxfg_v4_indexed_event_source_t * source )

Releases an event source: frees the structure and its name. Passing NULL does nothing.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sourceThe source created by dxfg_v4_IndexedEventSource_new(), dxfg_v4_IndexedEventSource_newWithId() or returned by the SDK.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_ObservableSubscriptionChangeListener_new()

Creates a listener of the changes of a subscription.

Add the listener to a subscription (for example, with dxfg_v4_DXFeedSubscription_addChangeListener()). The SDK calls the functions without a check for NULL, so pass all three. Releasing the last handle of the listener with dxfg_v4_JavaObjectHandler_release() (or dxfg_v4_NativeListener_deactivate()) stops the calls: after that none of the functions is called or running, and the user data can be freed.

Java: ObservableSubscriptionChangeListener (symbolsAdded(Set), symbolsRemoved(Set), subscriptionClosed()).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]function_symbolsAddedThe function called when symbols are added to the subscription.
[in]function_symbolsRemovedThe function called when symbols are removed from the subscription.
[in]function_subscriptionClosedThe function called when the subscription is closed or the listener is removed.
[in]user_dataThe user data passed to every function; the SDK does not use or free it.
[out]listenerThe pointer to the variable that receives the listener handle (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_ObservableSubscriptionChangeListener_newWithConfigurationChanged()

int32_t dxfg_v4_ObservableSubscriptionChangeListener_newWithConfigurationChanged ( graal_isolatethread_t * thread,
dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsAdded function_symbolsAdded,
dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsRemoved function_symbolsRemoved,
dxfg_v4_ObservableSubscriptionChangeListener_function_subscriptionClosed function_subscriptionClosed,
dxfg_v4_ObservableSubscriptionChangeListener_function_configurationChanged function_configurationChanged,
void * user_data,
DXFG_OUT dxfg_v4_observable_subscription_change_listener_t ** listener )

Creates a listener of the changes of a subscription that is also told about the changes of its configuration.

It is dxfg_v4_ObservableSubscriptionChangeListener_new() with the fourth callback, function_configurationChanged. Each of the four callbacks may be NULL: the SDK does not call a NULL one. Add the listener to a subscription with dxfg_v4_DXFeedSubscription_addChangeListener(). Releasing the last handle of the listener with dxfg_v4_JavaObjectHandler_release(), or dxfg_v4_NativeListener_deactivate() or dxfg_v4_NativeListener_deactivateAll(), stops the calls: after that none of the functions is called or running (except a call on the deactivating thread itself), and the user data can be freed.

Java: ObservableSubscriptionChangeListener (symbolsAdded(Set), symbolsRemoved(Set), subscriptionClosed(), configurationChanged()).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]function_symbolsAddedThe function called when symbols are added to the subscription, or NULL.
[in]function_symbolsRemovedThe function called when symbols are removed from the subscription, or NULL.
[in]function_subscriptionClosedThe function called when the subscription is closed or the listener is removed, or NULL.
[in]function_configurationChangedThe function called when the configuration of the subscription changes, or NULL.
[in]user_dataThe user data passed to every function; the SDK does not use or free it.
[out]listenerThe pointer to the variable that receives the listener handle (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.
Since
3.13.0

◆ dxfg_v4_symbol_list_release()

int32_t dxfg_v4_symbol_list_release ( graal_isolatethread_t * thread,
dxfg_v4_symbol_list * symbols )

Releases a list of symbols: frees the list, its array and every symbol of the list with its strings and the nested symbols and sources.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]symbolsThe list of symbols returned by the SDK.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_Symbol_new()

int32_t dxfg_v4_Symbol_new ( graal_isolatethread_t * thread,
const char * symbol,
dxfg_v4_symbol_type_t symbolType,
DXFG_OUT dxfg_v4_symbol_t ** newSymbol )

Creates a symbol of the given type.

Only STRING, CANDLE and WILDCARD can be created here: for any other type the function fails. For CANDLE the string is parsed as a candle symbol (an invalid string is an error) and the symbol of the created structure is its normalized string form. For WILDCARD the string is ignored.

Java: CandleSymbol.valueOf(String) for CANDLE, WildcardSymbol.ALL for WILDCARD.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]symbolThe symbol: a UTF-8 null-terminated string.
[in]symbolTypeThe type of the symbol to create.
[out]newSymbolThe pointer to the variable that receives the symbol (release it with dxfg_v4_Symbol_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_Symbol_release()

int32_t dxfg_v4_Symbol_release ( graal_isolatethread_t * thread,
dxfg_v4_symbol_t * symbol )

Releases a symbol: frees the structure, its strings and the nested symbols and sources. Passing NULL does nothing.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]symbolThe symbol created by dxfg_v4_Symbol_new() or returned by the SDK.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.