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

Regional book functions. More...

Collaboration diagram for Regional books:

Typedefs

typedef void(* dxf_regional_quote_listener_t) (dxf_const_string_t symbol, const dxf_quote_t *quotes, int count, void *user_data)
 Regional quote listener prototype. More...
 

Functions

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

Detailed Description

Regional book functions.

Typedef Documentation

◆ dxf_regional_quote_listener_t

typedef void(* dxf_regional_quote_listener_t) (dxf_const_string_t symbol, const dxf_quote_t *quotes, int count, void *user_data)

Regional quote listener prototype.

Parameters
[in]quotePointer to the received regional quote
[in]user_dataPointer to user struct, use NULL by default

Function Documentation

◆ dxf_attach_regional_book_listener()

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.

This callback will be invoked when price levels created from regional data change.

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_attach_regional_book_listener_v2()

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.

This callback will be invoked when new regional quotes are received.

Parameters
[in]bookA handle of the book to which a listener is to be detached
[in]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_regional_book()

DXFEED_API ERRORCODE dxf_close_regional_book ( dxf_regional_book_t  book)

Closes a regional book.

All the data associated with it will be freed.

Parameters
[in]bookA handle of the price level book to close
Returns
DXF_SUCCESS if regional 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_regional_book()

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.

Regional book is like Price Level Book but uses regional data instead of full depth order book.

Parameters
[in]connectionA handle of a previously created connection which the subscription will be using
[in]symbolThe symbol to use
[out]bookA handle of the created regional book
Returns
DXF_SUCCESS if regional 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; regional book itself is returned via out parameter

◆ dxf_detach_regional_book_listener()

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.

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

Parameters
bookA handle of the book to which a listener is to be detached
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;

◆ dxf_detach_regional_book_listener_v2()

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.

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]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;