dxFeed Graal Native SDK 3.9.0
Loading...
Searching...
No Matches
dxfg_events.h File Reference

dxFeed Graal Native SDK Events functions and types declarations More...

#include <stdint.h>
#include "dxfg_common.h"
#include "dxfg_javac.h"

Go to the source code of this file.

Data Structures

struct  dxfg_indexed_event_source_t
struct  dxfg_indexed_event_source_list
struct  dxfg_symbol_t
struct  dxfg_string_symbol_t
struct  dxfg_wildcard_symbol_t
struct  dxfg_candle_symbol_t
struct  dxfg_indexed_event_subscription_symbol_t
struct  dxfg_time_series_subscription_symbol_t
struct  dxfg_symbol_list
struct  dxfg_event_type_t
struct  dxfg_market_event_t
struct  dxfg_quote_t
struct  dxfg_profile_t
struct  dxfg_summary_t
struct  dxfg_greeks_t
struct  dxfg_candle_t
struct  dxfg_daily_candle_t
struct  dxfg_underlying_t
struct  dxfg_theo_price_t
struct  dxfg_trade_base_t
struct  dxfg_trade_t
struct  dxfg_trade_eth_t
struct  dxfg_configuration_t
struct  dxfg_message_t
struct  dxfg_time_and_sale_t
struct  dxfg_option_sale_t
struct  dxfg_market_maker_t
struct  dxfg_order_base_t
struct  dxfg_order_t
struct  dxfg_analytic_order_t
struct  dxfg_otc_markets_order_t
struct  dxfg_spread_order_t
struct  dxfg_series_t
struct  dxfg_text_message_t
struct  dxfg_text_configuration_t
struct  dxfg_nuam_order_t
 https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamOrder.html More...
struct  dxfg_nuam_time_and_sale_t
 https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamTimeAndSale.html More...
struct  dxfg_nuam_trade_t
 https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamTrade.html More...
struct  dxfg_order_imbalance_t
 https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/market/OrderImbalance.html More...
struct  dxfg_event_type_list
struct  dxfg_event_clazz_list_t
struct  dxfg_observable_subscription_change_listener_t

Typedefs

typedef enum dxfg_indexed_event_source_type_t dxfg_indexed_event_source_type_t
typedef struct dxfg_indexed_event_source_t dxfg_indexed_event_source_t
typedef struct dxfg_indexed_event_source_list dxfg_indexed_event_source_list
typedef enum dxfg_symbol_type_t dxfg_symbol_type_t
typedef struct dxfg_symbol_t dxfg_symbol_t
typedef struct dxfg_string_symbol_t dxfg_string_symbol_t
typedef struct dxfg_wildcard_symbol_t dxfg_wildcard_symbol_t
typedef struct dxfg_candle_symbol_t dxfg_candle_symbol_t
typedef struct dxfg_indexed_event_subscription_symbol_t dxfg_indexed_event_subscription_symbol_t
typedef struct dxfg_time_series_subscription_symbol_t dxfg_time_series_subscription_symbol_t
typedef struct dxfg_symbol_list dxfg_symbol_list
typedef enum dxfg_event_clazz_t dxfg_event_clazz_t
typedef struct dxfg_event_type_t dxfg_event_type_t
typedef struct dxfg_market_event_t dxfg_market_event_t
typedef struct dxfg_quote_t dxfg_quote_t
typedef struct dxfg_profile_t dxfg_profile_t
typedef struct dxfg_summary_t dxfg_summary_t
typedef struct dxfg_greeks_t dxfg_greeks_t
typedef struct dxfg_candle_t dxfg_candle_t
typedef struct dxfg_daily_candle_t dxfg_daily_candle_t
typedef struct dxfg_underlying_t dxfg_underlying_t
typedef struct dxfg_theo_price_t dxfg_theo_price_t
typedef struct dxfg_trade_base_t dxfg_trade_base_t
typedef struct dxfg_trade_t dxfg_trade_t
typedef struct dxfg_trade_eth_t dxfg_trade_eth_t
typedef struct dxfg_configuration_t dxfg_configuration_t
typedef struct dxfg_message_t dxfg_message_t
typedef struct dxfg_time_and_sale_t dxfg_time_and_sale_t
typedef struct dxfg_option_sale_t dxfg_option_sale_t
typedef struct dxfg_market_maker_t dxfg_market_maker_t
typedef struct dxfg_order_base_t dxfg_order_base_t
typedef struct dxfg_order_t dxfg_order_t
typedef struct dxfg_analytic_order_t dxfg_analytic_order_t
typedef struct dxfg_otc_markets_order_t dxfg_otc_markets_order_t
typedef struct dxfg_spread_order_t dxfg_spread_order_t
typedef struct dxfg_series_t dxfg_series_t
typedef struct dxfg_text_message_t dxfg_text_message_t
typedef struct dxfg_text_configuration_t dxfg_text_configuration_t
typedef struct dxfg_nuam_order_t dxfg_nuam_order_t
 https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamOrder.html
typedef struct dxfg_nuam_time_and_sale_t dxfg_nuam_time_and_sale_t
 https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamTimeAndSale.html
typedef struct dxfg_nuam_trade_t dxfg_nuam_trade_t
 https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamTrade.html
typedef struct dxfg_order_imbalance_t dxfg_order_imbalance_t
 https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/market/OrderImbalance.html
typedef struct dxfg_event_type_list dxfg_event_type_list
typedef struct dxfg_event_clazz_list_t dxfg_event_clazz_list_t
typedef struct dxfg_observable_subscription_change_listener_t dxfg_observable_subscription_change_listener_t
typedef void(*) dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded(graal_isolatethread_t *thread, dxfg_symbol_list *symbols, void *user_data)
typedef void(*) dxfg_ObservableSubscriptionChangeListener_function_symbolsRemoved(graal_isolatethread_t *thread, dxfg_symbol_list *symbols, void *user_data)
typedef void(*) dxfg_ObservableSubscriptionChangeListener_function_subscriptionClosed(graal_isolatethread_t *thread, void *user_data)

Enumerations

enum  dxfg_indexed_event_source_type_t { INDEXED_EVENT_SOURCE = 0 , ORDER_SOURCE }
enum  dxfg_symbol_type_t {
  STRING = 0 , CANDLE , WILDCARD , INDEXED_EVENT_SUBSCRIPTION ,
  TIME_SERIES_SUBSCRIPTION
}
enum  dxfg_event_clazz_t {
  DXFG_EVENT_QUOTE = 0 , DXFG_EVENT_PROFILE , DXFG_EVENT_SUMMARY , DXFG_EVENT_GREEKS ,
  DXFG_EVENT_CANDLE , DXFG_EVENT_DAILY_CANDLE , DXFG_EVENT_UNDERLYING , DXFG_EVENT_THEO_PRICE ,
  DXFG_EVENT_TRADE , DXFG_EVENT_TRADE_ETH , DXFG_EVENT_CONFIGURATION , DXFG_EVENT_MESSAGE ,
  DXFG_EVENT_TIME_AND_SALE , DXFG_EVENT_ORDER_BASE , DXFG_EVENT_ORDER , DXFG_EVENT_ANALYTIC_ORDER ,
  DXFG_EVENT_OTC_MARKETS_ORDER , DXFG_EVENT_SPREAD_ORDER , DXFG_EVENT_SERIES , DXFG_EVENT_OPTION_SALE ,
  DXFG_EVENT_TEXT_MESSAGE , DXFG_EVENT_MARKET_MAKER , DXFG_EVENT_TEXT_CONFIGURATION , DXFG_EVENT_NUAM_ORDER ,
  DXFG_EVENT_NUAM_TIME_AND_SALE , DXFG_EVENT_NUAM_TRADE , DXFG_EVENT_ORDER_IMBALANCE
}

Functions

dxfg_symbol_t * dxfg_Symbol_new (graal_isolatethread_t *thread, const char *symbol, dxfg_symbol_type_t symbolType)
int32_t dxfg_Symbol_release (graal_isolatethread_t *thread, dxfg_symbol_t *symbol)
dxfg_event_type_t * dxfg_EventType_new (graal_isolatethread_t *thread, const char *symbolName, dxfg_event_clazz_t clazz)
int32_t dxfg_EventType_release (graal_isolatethread_t *thread, dxfg_event_type_t *eventType)
int32_t dxfg_CList_EventType_release (graal_isolatethread_t *thread, dxfg_event_type_list *eventTypes)
int32_t dxfg_CList_EventClazz_release (graal_isolatethread_t *thread, dxfg_event_clazz_list_t *eventClazzes)
int32_t dxfg_CList_symbol_release (graal_isolatethread_t *thread, dxfg_symbol_list *)
dxfg_indexed_event_source_t * dxfg_IndexedEvent_getSource (graal_isolatethread_t *thread, dxfg_event_type_t *eventType)
dxfg_indexed_event_source_t * dxfg_IndexedEventSource_new (graal_isolatethread_t *thread, const char *source)
int32_t dxfg_IndexedEventSource_new2 (graal_isolatethread_t *thread, int32_t sourceId, DXFG_OUT dxfg_indexed_event_source_t **source)
int32_t dxfg_IndexedEventSource_release (graal_isolatethread_t *thread, dxfg_indexed_event_source_t *source)
int32_t dxfg_CList_IndexedEventSource_release (graal_isolatethread_t *thread, dxfg_indexed_event_source_list *list)
dxfg_observable_subscription_change_listener_t * dxfg_ObservableSubscriptionChangeListener_new (graal_isolatethread_t *thread, dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded function_symbolsAdded, dxfg_ObservableSubscriptionChangeListener_function_symbolsRemoved function_symbolsRemoved, dxfg_ObservableSubscriptionChangeListener_function_subscriptionClosed function_subscriptionClosed, void *user_data)

Detailed Description

dxFeed Graal Native SDK Events functions and types declarations

Typedef Documentation

◆ dxfg_analytic_order_t

typedef struct dxfg_analytic_order_t dxfg_analytic_order_t

◆ dxfg_candle_symbol_t

typedef struct dxfg_candle_symbol_t dxfg_candle_symbol_t

◆ dxfg_candle_t

typedef struct dxfg_candle_t dxfg_candle_t

◆ dxfg_configuration_t

typedef struct dxfg_configuration_t dxfg_configuration_t

Javadoc

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

◆ dxfg_daily_candle_t

typedef struct dxfg_daily_candle_t dxfg_daily_candle_t

◆ dxfg_event_clazz_list_t

typedef struct dxfg_event_clazz_list_t dxfg_event_clazz_list_t

◆ dxfg_event_clazz_t

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.

◆ dxfg_event_type_list

typedef struct dxfg_event_type_list dxfg_event_type_list

◆ dxfg_event_type_t

typedef struct dxfg_event_type_t dxfg_event_type_t

◆ dxfg_greeks_t

typedef struct dxfg_greeks_t dxfg_greeks_t

◆ dxfg_indexed_event_source_list

typedef struct dxfg_indexed_event_source_list dxfg_indexed_event_source_list

◆ dxfg_indexed_event_source_t

typedef struct dxfg_indexed_event_source_t dxfg_indexed_event_source_t

◆ dxfg_indexed_event_source_type_t

◆ dxfg_indexed_event_subscription_symbol_t

typedef struct dxfg_indexed_event_subscription_symbol_t dxfg_indexed_event_subscription_symbol_t

◆ dxfg_market_event_t

typedef struct dxfg_market_event_t dxfg_market_event_t

◆ dxfg_market_maker_t

typedef struct dxfg_market_maker_t dxfg_market_maker_t

◆ dxfg_message_t

typedef struct dxfg_message_t dxfg_message_t

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_nuam_order_t

typedef struct dxfg_nuam_order_t dxfg_nuam_order_t

◆ dxfg_nuam_time_and_sale_t

typedef struct dxfg_nuam_time_and_sale_t dxfg_nuam_time_and_sale_t

◆ dxfg_nuam_trade_t

typedef struct dxfg_nuam_trade_t dxfg_nuam_trade_t

◆ dxfg_observable_subscription_change_listener_t

typedef struct dxfg_observable_subscription_change_listener_t dxfg_observable_subscription_change_listener_t

◆ dxfg_ObservableSubscriptionChangeListener_function_subscriptionClosed

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

◆ dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded

typedef void(*) dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded(graal_isolatethread_t *thread, dxfg_symbol_list *symbols, void *user_data)

◆ dxfg_ObservableSubscriptionChangeListener_function_symbolsRemoved

typedef void(*) dxfg_ObservableSubscriptionChangeListener_function_symbolsRemoved(graal_isolatethread_t *thread, dxfg_symbol_list *symbols, void *user_data)

◆ dxfg_option_sale_t

typedef struct dxfg_option_sale_t dxfg_option_sale_t

◆ dxfg_order_base_t

typedef struct dxfg_order_base_t dxfg_order_base_t

◆ dxfg_order_imbalance_t

typedef struct dxfg_order_imbalance_t dxfg_order_imbalance_t

◆ dxfg_order_t

typedef struct dxfg_order_t dxfg_order_t

◆ dxfg_otc_markets_order_t

typedef struct dxfg_otc_markets_order_t dxfg_otc_markets_order_t

◆ dxfg_profile_t

typedef struct dxfg_profile_t dxfg_profile_t

◆ dxfg_quote_t

typedef struct dxfg_quote_t dxfg_quote_t
 <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;

/** Javadoc

◆ dxfg_series_t

typedef struct dxfg_series_t dxfg_series_t

◆ dxfg_spread_order_t

typedef struct dxfg_spread_order_t dxfg_spread_order_t

◆ dxfg_string_symbol_t

typedef struct dxfg_string_symbol_t dxfg_string_symbol_t

◆ dxfg_summary_t

typedef struct dxfg_summary_t dxfg_summary_t

◆ dxfg_symbol_list

typedef struct dxfg_symbol_list dxfg_symbol_list

◆ dxfg_symbol_t

typedef struct dxfg_symbol_t dxfg_symbol_t

◆ dxfg_symbol_type_t

◆ dxfg_text_configuration_t

typedef struct dxfg_text_configuration_t dxfg_text_configuration_t

◆ dxfg_text_message_t

typedef struct dxfg_text_message_t dxfg_text_message_t

◆ dxfg_theo_price_t

typedef struct dxfg_theo_price_t dxfg_theo_price_t

◆ dxfg_time_and_sale_t

typedef struct dxfg_time_and_sale_t dxfg_time_and_sale_t

◆ dxfg_time_series_subscription_symbol_t

typedef struct dxfg_time_series_subscription_symbol_t dxfg_time_series_subscription_symbol_t

◆ dxfg_trade_base_t

typedef struct dxfg_trade_base_t dxfg_trade_base_t

◆ dxfg_trade_eth_t

typedef struct dxfg_trade_eth_t dxfg_trade_eth_t

◆ dxfg_trade_t

typedef struct dxfg_trade_t dxfg_trade_t

◆ dxfg_underlying_t

typedef struct dxfg_underlying_t dxfg_underlying_t

◆ dxfg_wildcard_symbol_t

typedef struct dxfg_wildcard_symbol_t dxfg_wildcard_symbol_t

Enumeration Type Documentation

◆ dxfg_event_clazz_t

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.

Enumerator
DXFG_EVENT_QUOTE 
DXFG_EVENT_PROFILE 
DXFG_EVENT_SUMMARY 
DXFG_EVENT_GREEKS 
DXFG_EVENT_CANDLE 
DXFG_EVENT_DAILY_CANDLE 
DXFG_EVENT_UNDERLYING 
DXFG_EVENT_THEO_PRICE 
DXFG_EVENT_TRADE 
DXFG_EVENT_TRADE_ETH 
DXFG_EVENT_CONFIGURATION 
DXFG_EVENT_MESSAGE 
DXFG_EVENT_TIME_AND_SALE 
DXFG_EVENT_ORDER_BASE 
DXFG_EVENT_ORDER 
DXFG_EVENT_ANALYTIC_ORDER 
DXFG_EVENT_OTC_MARKETS_ORDER 
DXFG_EVENT_SPREAD_ORDER 
DXFG_EVENT_SERIES 
DXFG_EVENT_OPTION_SALE 
DXFG_EVENT_TEXT_MESSAGE 
DXFG_EVENT_MARKET_MAKER 
DXFG_EVENT_TEXT_CONFIGURATION 
DXFG_EVENT_NUAM_ORDER 
DXFG_EVENT_NUAM_TIME_AND_SALE 
DXFG_EVENT_NUAM_TRADE 
DXFG_EVENT_ORDER_IMBALANCE 

◆ dxfg_indexed_event_source_type_t

Enumerator
INDEXED_EVENT_SOURCE 
ORDER_SOURCE 

◆ dxfg_symbol_type_t

Enumerator
STRING 
CANDLE 
WILDCARD 
INDEXED_EVENT_SUBSCRIPTION 
TIME_SERIES_SUBSCRIPTION 

Function Documentation

◆ dxfg_CList_EventClazz_release()

int32_t dxfg_CList_EventClazz_release ( graal_isolatethread_t * thread,
dxfg_event_clazz_list_t * eventClazzes )

◆ dxfg_CList_EventType_release()

int32_t dxfg_CList_EventType_release ( graal_isolatethread_t * thread,
dxfg_event_type_list * eventTypes )

◆ dxfg_CList_IndexedEventSource_release()

int32_t dxfg_CList_IndexedEventSource_release ( graal_isolatethread_t * thread,
dxfg_indexed_event_source_list * list )

◆ dxfg_CList_symbol_release()

int32_t dxfg_CList_symbol_release ( graal_isolatethread_t * thread,
dxfg_symbol_list *  )

◆ dxfg_EventType_new()

dxfg_event_type_t * dxfg_EventType_new ( graal_isolatethread_t * thread,
const char * symbolName,
dxfg_event_clazz_t clazz )

◆ dxfg_EventType_release()

int32_t dxfg_EventType_release ( graal_isolatethread_t * thread,
dxfg_event_type_t * eventType )

◆ dxfg_IndexedEvent_getSource()

dxfg_indexed_event_source_t * dxfg_IndexedEvent_getSource ( graal_isolatethread_t * thread,
dxfg_event_type_t * eventType )

◆ dxfg_IndexedEventSource_new()

dxfg_indexed_event_source_t * dxfg_IndexedEventSource_new ( graal_isolatethread_t * thread,
const char * source )

◆ dxfg_IndexedEventSource_new2()

int32_t dxfg_IndexedEventSource_new2 ( graal_isolatethread_t * thread,
int32_t sourceId,
DXFG_OUT dxfg_indexed_event_source_t ** source )

◆ dxfg_IndexedEventSource_release()

int32_t dxfg_IndexedEventSource_release ( graal_isolatethread_t * thread,
dxfg_indexed_event_source_t * source )

◆ dxfg_ObservableSubscriptionChangeListener_new()

◆ dxfg_Symbol_new()

dxfg_symbol_t * dxfg_Symbol_new ( graal_isolatethread_t * thread,
const char * symbol,
dxfg_symbol_type_t symbolType )

◆ dxfg_Symbol_release()

int32_t dxfg_Symbol_release ( graal_isolatethread_t * thread,
dxfg_symbol_t * symbol )