dxFeed C API  6.0.1
dxFeed C API library intended to provide market data access for DX clients
Functions
Common functions

Common API functions. More...

Collaboration diagram for Common functions:

Functions

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_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_free (void *pointer)
 Frees memory allocated in API functions from this module. More...
 
dxf_const_string_t dx_get_error_description (dx_error_code_t code)
 Returns error description by error code. More...
 
dx_error_level_t dx_get_error_level (dx_error_code_t code)
 Returns error level by error code. More...
 

Detailed Description

Common API functions.

Function Documentation

◆ dx_get_error_description()

dxf_const_string_t dx_get_error_description ( dx_error_code_t  code)

Returns error description by error code.

Parameters
[in]codeError code
Returns
Error description string

◆ dx_get_error_level()

dx_error_level_t dx_get_error_level ( dx_error_code_t  code)

Returns error level by error code.

Parameters
[in]codeError code
Returns
Error level

◆ dxf_free()

DXFEED_API ERRORCODE dxf_free ( void *  pointer)

Frees memory allocated in API functions from this module.

Parameters
[in]pointerPointer to memory allocated earlier in some API function from this module

◆ dxf_get_last_error()

DXFEED_API ERRORCODE dxf_get_last_error ( OUT int *  error_code,
OUT dxf_const_string_t error_descr 
)

Retrieves the last error info.

The error is stored on per-thread basis. If the connection termination notifier callback was invoked, then to retrieve the connection's error code call this function right from the callback function. If an error occurred within the error storage subsystem itself, the function will return DXF_FAILURE.

Parameters
[out]error_codeA pointer to the variable where the error code is to be stored
[out]error_descrA pointer to the variable where the human-friendly error description is to be stored; may be NULL if the text representation of error is not required
Returns
DXF_SUCCESS on successful error retrieval or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure; error_code and error_descr are returned as output parameters of this function

◆ dxf_initialize_logger()

DXFEED_API ERRORCODE dxf_initialize_logger ( const char *  file_name,
int  rewrite_file,
int  show_timezone_info,
int  verbose 
)

Initializes the internal logger.

Various actions and events, including the errors, are being logged throughout the library. They may be stored into the file.

Parameters
[in]file_nameA full path to the file where the log is to be stored
[in]rewrite_fileA flag defining the file open mode; if it's nonzero then the log file will be rewritten
[in]show_timezone_infoA flag defining the time display option in the log file; if it's nonzero then the time will be displayed with the timezone suffix
[in]verboseA flag defining the logging mode; if it's nonzero then the verbose logging will be enabled
Returns
DXF_SUCCESS on successful logger initialization or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;

◆ dxf_initialize_logger_v2()

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.

Various actions and events, including the errors, are being logged throughout the library. They may be stored into the file.

Parameters
[in]file_nameA full path to the file where the log is to be stored
[in]rewrite_fileA flag defining the file open mode; if it's nonzero then the log file will be rewritten
[in]show_timezone_infoA flag defining the time display option in the log file; if it's nonzero then the time will be displayed with the timezone suffix
[in]verboseA flag defining the logging mode; if it's nonzero then the verbose logging will be enabled
[in]log_data_transferA flag defining the logging mode; if it's nonzero then the data transfer (portions of received and sent data) logging will be enabled
Returns
DXF_SUCCESS on successful logger initialization or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;

◆ dxf_write_raw_data()

DXFEED_API ERRORCODE dxf_write_raw_data ( dxf_connection_t  connection,
const char *  raw_file_name 
)

Add dumping of incoming traffic into specific file.

Parameters
[in]connectionA handle of a previously created connection which the subscription will be using
[in]raw_file_nameRaw data file name