dxFeed C API  6.0.1
dxFeed C API library intended to provide market data access for DX clients
Macros | Typedefs | Functions
DXFeed.h File Reference

dxFeed C API functions declarations More...

#include "DXTypes.h"
#include "EventData.h"
Include dependency graph for DXFeed.h:

Go to the source code of this file.

Macros

#define DXF_SUCCESS   1
 Successful API call. More...
 
#define DXF_FAILURE   0
 Failed API call. More...
 

Typedefs

typedef void(* dxf_conn_termination_notifier_t) (dxf_connection_t connection, void *user_data)
 Connection termination notification callback type. More...
 
typedef void(* dxf_conn_status_notifier_t) (dxf_connection_t connection, dxf_connection_status_t old_status, dxf_connection_status_t new_status, void *user_data)
 connection Status notification callback type More...
 
typedef int(* dxf_socket_thread_creation_notifier_t) (dxf_connection_t connection, void *user_data)
 The low level callback type, required in case some thread-specific initialization must be performed on the client side on the thread creation/destruction. More...
 
typedef void(* dxf_socket_thread_destruction_notifier_t) (dxf_connection_t connection, void *user_data)
 The low level callback type, required in case some thread-specific initialization must be performed on the client side on the thread creation/destruction. More...
 

Functions

DXFEED_API ERRORCODE dxf_create_connection (const char *address, dxf_conn_termination_notifier_t notifier, dxf_conn_status_notifier_t conn_status_notifier, dxf_socket_thread_creation_notifier_t stcn, dxf_socket_thread_destruction_notifier_t stdn, void *user_data, OUT dxf_connection_t *connection)
 Creates connection with the specified parameters. More...
 
DXFEED_API ERRORCODE dxf_create_connection_auth_basic (const char *address, const char *user, const char *password, dxf_conn_termination_notifier_t notifier, dxf_conn_status_notifier_t conn_status_notifier, dxf_socket_thread_creation_notifier_t stcn, dxf_socket_thread_destruction_notifier_t stdn, void *user_data, OUT dxf_connection_t *connection)
 Creates connection with the specified parameters and basic authorization. More...
 
DXFEED_API ERRORCODE dxf_create_connection_auth_bearer (const char *address, const char *token, dxf_conn_termination_notifier_t notifier, dxf_conn_status_notifier_t conn_status_notifier, dxf_socket_thread_creation_notifier_t stcn, dxf_socket_thread_destruction_notifier_t stdn, void *user_data, OUT dxf_connection_t *connection)
 Creates connection with the specified parameters and token authorization. More...
 
DXFEED_API ERRORCODE dxf_create_connection_auth_custom (const char *address, const char *authscheme, const char *authdata, dxf_conn_termination_notifier_t notifier, dxf_conn_status_notifier_t conn_status_notifier, dxf_socket_thread_creation_notifier_t stcn, dxf_socket_thread_destruction_notifier_t stdn, void *user_data, OUT dxf_connection_t *connection)
 Creates connection with the specified parameters and custom described authorization. More...
 
DXFEED_API ERRORCODE dxf_close_connection (dxf_connection_t connection)
 Closes a connection. More...
 
DXFEED_API ERRORCODE dxf_create_subscription (dxf_connection_t connection, int event_types, OUT dxf_subscription_t *subscription)
 Creates a subscription with the specified parameters. More...
 
DXFEED_API ERRORCODE dxf_create_subscription_with_flags (dxf_connection_t connection, int event_types, dx_event_subscr_flag subscr_flags, OUT dxf_subscription_t *subscription)
 Creates a subscription with the specified parameters and the subscription flags. More...
 
DXFEED_API ERRORCODE dxf_create_subscription_timed (dxf_connection_t connection, int event_types, dxf_long_t time, OUT dxf_subscription_t *subscription)
 Creates a timed subscription with the specified parameters. More...
 
DXFEED_API ERRORCODE dxf_create_subscription_timed_with_flags (dxf_connection_t connection, int event_types, dxf_long_t time, dx_event_subscr_flag subscr_flags, OUT dxf_subscription_t *subscription)
 Creates a timed subscription with the specified parameters and the subscription flags. More...
 
DXFEED_API ERRORCODE dxf_close_subscription (dxf_subscription_t subscription)
 Closes a subscription. More...
 
DXFEED_API ERRORCODE dxf_add_symbol (dxf_subscription_t subscription, dxf_const_string_t symbol)
 Adds a single symbol to the subscription. More...
 
DXFEED_API ERRORCODE dxf_add_symbols (dxf_subscription_t subscription, dxf_const_string_t *symbols, int symbol_count)
 Adds several symbols to the subscription. More...
 
DXFEED_API ERRORCODE dxf_add_candle_symbol (dxf_subscription_t subscription, dxf_candle_attributes_t candle_attributes)
 Adds a candle symbol to the subscription. More...
 
DXFEED_API ERRORCODE dxf_remove_candle_symbol (dxf_subscription_t subscription, dxf_candle_attributes_t candle_attributes)
 Remove a candle symbol from the subscription. More...
 
DXFEED_API ERRORCODE dxf_remove_symbol (dxf_subscription_t subscription, dxf_const_string_t symbol)
 Removes a single symbol from the subscription. More...
 
DXFEED_API ERRORCODE dxf_remove_symbols (dxf_subscription_t subscription, dxf_const_string_t *symbols, int symbol_count)
 Removes several symbols from the subscription. More...
 
DXFEED_API ERRORCODE dxf_get_symbols (dxf_subscription_t subscription, OUT dxf_const_string_t **symbols, OUT int *symbol_count)
 Retrieves the list of symbols currently added to the subscription. More...
 
DXFEED_API ERRORCODE dxf_set_symbols (dxf_subscription_t subscription, dxf_const_string_t *symbols, int symbol_count)
 Sets the symbols for the subscription. More...
 
DXFEED_API ERRORCODE dxf_clear_symbols (dxf_subscription_t subscription)
 Removes all the symbols from the subscription. More...
 
DXFEED_API ERRORCODE dxf_attach_event_listener (dxf_subscription_t subscription, dxf_event_listener_t event_listener, void *user_data)
 Attaches a listener callback to the subscription. More...
 
DXFEED_API ERRORCODE dxf_detach_event_listener (dxf_subscription_t subscription, dxf_event_listener_t event_listener)
 Detaches a listener from the subscription. More...
 
DXFEED_API ERRORCODE dxf_attach_event_listener_v2 (dxf_subscription_t subscription, dxf_event_listener_v2_t event_listener, void *user_data)
 Attaches a extended listener callback to the subscription. More...
 
DXFEED_API ERRORCODE dxf_detach_event_listener_v2 (dxf_subscription_t subscription, dxf_event_listener_v2_t event_listener)
 Detaches a extended listener from the subscription. More...
 
DXFEED_API ERRORCODE dxf_get_subscription_event_types (dxf_subscription_t subscription, OUT int *event_types)
 Retrieves the subscription event types. More...
 
DXFEED_API ERRORCODE dxf_get_last_event (dxf_connection_t connection, int event_type, dxf_const_string_t symbol, OUT dxf_event_data_t *event_data)
 Retrieves the last event data of the specified symbol and type for the connection. More...
 
DXFEED_API ERRORCODE dxf_get_last_error (OUT int *error_code, OUT dxf_const_string_t *error_descr)
 Retrieves the last error info. More...
 
DXFEED_API ERRORCODE dxf_initialize_logger (const char *file_name, int rewrite_file, int show_timezone_info, int verbose)
 Initializes the internal logger. More...
 
DXFEED_API ERRORCODE dxf_initialize_logger_v2 (const char *file_name, int rewrite_file, int show_timezone_info, int verbose, int log_data_transfer)
 Initializes the internal logger with data transfer logging. More...
 
DXFEED_API ERRORCODE dxf_set_order_source (dxf_subscription_t subscription, const char *source)
 Clear current sources and add new one to subscription. More...
 
DXFEED_API ERRORCODE dxf_add_order_source (dxf_subscription_t subscription, const char *source)
 Add a new source to subscription. More...
 
DXFEED_API ERRORCODE dxf_create_candle_symbol_attributes (dxf_const_string_t base_symbol, dxf_char_t exchange_code, dxf_double_t period_value, dxf_candle_type_period_attribute_t period_type, dxf_candle_price_attribute_t price, dxf_candle_session_attribute_t session, dxf_candle_alignment_attribute_t alignment, dxf_double_t price_level, OUT dxf_candle_attributes_t *candle_attributes)
 API that allows user to create candle symbol attributes. More...
 
DXFEED_API ERRORCODE dxf_delete_candle_symbol_attributes (dxf_candle_attributes_t candle_attributes)
 Free memory allocated by dxf_initialize_candle_symbol_attributes(...) function. More...
 
DXFEED_API ERRORCODE dxf_create_snapshot (dxf_connection_t connection, dx_event_id_t event_id, dxf_const_string_t symbol, const char *source, dxf_long_t time, OUT dxf_snapshot_t *snapshot)
 Creates snapshot with the specified parameters. More...
 
DXFEED_API ERRORCODE dxf_create_order_snapshot (dxf_connection_t connection, dxf_const_string_t symbol, const char *source, dxf_long_t time, OUT dxf_snapshot_t *snapshot)
 Creates Order snapshot with the specified parameters. More...
 
DXFEED_API ERRORCODE dxf_create_candle_snapshot (dxf_connection_t connection, dxf_candle_attributes_t candle_attributes, dxf_long_t time, OUT dxf_snapshot_t *snapshot)
 Creates Candle snapshot with the specified parameters. More...
 
DXFEED_API ERRORCODE dxf_close_snapshot (dxf_snapshot_t snapshot)
 Closes a snapshot. More...
 
DXFEED_API ERRORCODE dxf_attach_snapshot_listener (dxf_snapshot_t snapshot, dxf_snapshot_listener_t snapshot_listener, void *user_data)
 Attaches a listener callback to the snapshot. More...
 
DXFEED_API ERRORCODE dxf_detach_snapshot_listener (dxf_snapshot_t snapshot, dxf_snapshot_listener_t snapshot_listener)
 Detaches a listener from the snapshot. More...
 
DXFEED_API ERRORCODE dxf_attach_snapshot_inc_listener (dxf_snapshot_t snapshot, dxf_snapshot_inc_listener_t snapshot_listener, void *user_data)
 Attaches an incremental listener callback to the snapshot. More...
 
DXFEED_API ERRORCODE dxf_detach_snapshot_inc_listener (dxf_snapshot_t snapshot, dxf_snapshot_inc_listener_t snapshot_listener)
 Detaches a listener from the snapshot. More...
 
DXFEED_API ERRORCODE dxf_get_snapshot_symbol (dxf_snapshot_t snapshot, OUT dxf_string_t *symbol)
 Retrieves the symbol currently added to the snapshot subscription. More...
 
DXFEED_API ERRORCODE dxf_create_price_level_book (dxf_connection_t connection, dxf_const_string_t symbol, const char **sources, OUT dxf_price_level_book_t *book)
 Creates Price Level book with the specified parameters. More...
 
DXFEED_API ERRORCODE dxf_close_price_level_book (dxf_price_level_book_t book)
 Closes a price level book. More...
 
DXFEED_API ERRORCODE dxf_attach_price_level_book_listener (dxf_price_level_book_t book, dxf_price_level_book_listener_t book_listener, void *user_data)
 Attaches a listener callback to the price level book. More...
 
DXFEED_API ERRORCODE dxf_detach_price_level_book_listener (dxf_price_level_book_t book, dxf_price_level_book_listener_t book_listener)
 Detaches a listener from the snapshot. More...
 
DXFEED_API ERRORCODE dxf_create_regional_book (dxf_connection_t connection, dxf_const_string_t symbol, OUT dxf_regional_book_t *book)
 Creates Regional book with the specified parameters. More...
 
DXFEED_API ERRORCODE dxf_close_regional_book (dxf_regional_book_t book)
 Closes a regional book. More...
 
DXFEED_API ERRORCODE dxf_attach_regional_book_listener (dxf_regional_book_t book, dxf_price_level_book_listener_t book_listener, void *user_data)
 Attaches a listener callback to regional book. More...
 
DXFEED_API ERRORCODE dxf_detach_regional_book_listener (dxf_regional_book_t book, dxf_price_level_book_listener_t book_listener)
 Detaches a listener from the regional book. More...
 
DXFEED_API ERRORCODE dxf_attach_regional_book_listener_v2 (dxf_regional_book_t book, dxf_regional_quote_listener_t listener, void *user_data)
 Attaches a listener callback to regional book. More...
 
DXFEED_API ERRORCODE dxf_detach_regional_book_listener_v2 (dxf_regional_book_t book, dxf_regional_quote_listener_t listener)
 Detaches a listener from the regional book. More...
 
DXFEED_API ERRORCODE dxf_write_raw_data (dxf_connection_t connection, const char *raw_file_name)
 Add dumping of incoming traffic into specific file. More...
 
DXFEED_API ERRORCODE dxf_get_connection_properties_snapshot (dxf_connection_t connection, OUT dxf_property_item_t **properties, OUT int *count)
 Retrieves the array of key-value pairs (properties) for specified connection. More...
 
DXFEED_API ERRORCODE dxf_free_connection_properties_snapshot (dxf_property_item_t *properties, int count)
 Frees memory allocated during dxf_get_connection_properties_snapshot function execution. More...
 
DXFEED_API ERRORCODE dxf_get_current_connected_address (dxf_connection_t connection, OUT char **address)
 Retrieves the null-terminated string with current connected address in format <host>:<port>. More...
 
DXFEED_API ERRORCODE dxf_get_current_connection_status (dxf_connection_t connection, OUT dxf_connection_status_t *status)
 Retrieves the current connection status. More...
 
DXFEED_API ERRORCODE dxf_free (void *pointer)
 Frees memory allocated in API functions from this module. More...
 

Detailed Description

dxFeed C API functions declarations