dxFeed C API  6.0.1
dxFeed C API library intended to provide market data access for DX clients
Typedefs | Functions
Price level books

Price level book functions. More...

Collaboration diagram for Price level books:

Typedefs

typedef void(* dxf_price_level_book_listener_t) (const dxf_price_level_book_data_ptr_t book, void *user_data)
 Price Level listener prototype. More...
 

Functions

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...
 

Detailed Description

Price level book functions.

Typedef Documentation

◆ dxf_price_level_book_listener_t

typedef void(* dxf_price_level_book_listener_t) (const dxf_price_level_book_data_ptr_t book, void *user_data)

Price Level listener prototype.

Parameters
[in]bookPointer to the received price book data. bids and asks are sorted by price, best bid (with largest price) and best ask (with smallest price) are first elements of corresponding arrays.
[in]user_dataPointer to user struct, use NULL by default

Function Documentation

◆ dxf_attach_price_level_book_listener()

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.

This callback will be invoked when price levels change. No error occurs if it's attempted to attach the same listener twice or more.

Parameters
[in]bookA handle of the book to which a listener is to be detached
[in]book_listenerA listener callback function pointer
[in]user_dataData to be passed to the callback function
Returns
DXF_SUCCESS if listener has been successfully attached or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;

◆ dxf_close_price_level_book()

DXFEED_API ERRORCODE dxf_close_price_level_book ( dxf_price_level_book_t  book)

Closes a price level book.

All the data associated with it will be freed.

Parameters
bookA handle of the price level book to close
Returns
DXF_SUCCESS if price level book has been successfully closed or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;

◆ dxf_create_price_level_book()

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.

Parameters
[in]connectionA handle of a previously created connection which the subscription will be using
[in]symbolThe symbol to use
[in]sourcesOrder sources for Order, NULL-terminated list. Each element can be one of following: "NTV", "ntv", "NFX", "ESPD", "XNFI", "ICE", "ISE", "DEA", "DEX", "BYX", "BZX", "BATE", "CHIX", "CEUX", "BXTR", "IST", "BI20", "ABE", "FAIR", "GLBX", "glbx", "ERIS", "XEUR", "xeur", "CFE", "C2OX", "SMFE"
[out]bookA handle of the created price level book
Returns
DXF_SUCCESS if price level book has been successfully created or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure; price level book itself is returned via out parameter

◆ dxf_detach_price_level_book_listener()

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.

No error occurs if it's attempted to detach a listener which wasn't previously attached.

Parameters
[in]bookA handle of the book to which a listener is to be detached
[in]book_listenerA listener callback function pointer
Returns
DXF_SUCCESS if listener has been successfully detached or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;