dxFeed C API
6.0.1
dxFeed C API library intended to provide market data access for DX clients
|
Price level book functions. More...
![]() |
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... | |
Price level book functions.
typedef void(* dxf_price_level_book_listener_t) (const dxf_price_level_book_data_ptr_t book, void *user_data) |
Price Level listener prototype.
[in] | book | Pointer 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_data | Pointer to user struct, use NULL by default |
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.
[in] | book | A handle of the book to which a listener is to be detached |
[in] | book_listener | A listener callback function pointer |
[in] | user_data | Data to be passed to the callback function |
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.
book | A handle of the price level book to close |
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.
[in] | connection | A handle of a previously created connection which the subscription will be using |
[in] | symbol | The symbol to use |
[in] | sources | Order 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] | book | A handle of the created price level book |
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.
[in] | book | A handle of the book to which a listener is to be detached |
[in] | book_listener | A listener callback function pointer |