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

Symbol-related functions. More...

Collaboration diagram for Symbols:

Functions

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

Detailed Description

Symbol-related functions.

Function Documentation

◆ dxf_add_candle_symbol()

DXFEED_API ERRORCODE dxf_add_candle_symbol ( dxf_subscription_t  subscription,
dxf_candle_attributes_t  candle_attributes 
)

Adds a candle symbol to the subscription.

Parameters
subscriptionA handle of the subscription to which a symbol is added
candle_attributesPointer to the candle struct
Returns
DXF_SUCCESS on successful symbol addition or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;

◆ dxf_add_symbol()

DXFEED_API ERRORCODE dxf_add_symbol ( dxf_subscription_t  subscription,
dxf_const_string_t  symbol 
)

Adds a single symbol to the subscription.

A wildcard symbol "*" will replace all symbols: there will be an unsubscription from messages on all current symbols and a subscription to "*". The subscription type will be changed to dx_st_stream. If there is already a subscription to "*", then nothing will happen

Parameters
[in]subscriptionA handle of the subscription to which a symbol is added
[in]symbolThe symbol to add
Returns
DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error

◆ dxf_add_symbols()

DXFEED_API ERRORCODE dxf_add_symbols ( dxf_subscription_t  subscription,
dxf_const_string_t symbols,
int  symbol_count 
)

Adds several symbols to the subscription.

No error occurs if the symbol is attempted to add for the second time. Empty symbols will be ignored. First met the "*" symbol (wildcard) will overwrite all other symbols: there will be an unsubscription from messages on all current symbols and a subscription to "*". The subscription type will be changed to dx_st_stream. If there is already a subscription to "*", then nothing will happen.

Parameters
[in]subscriptionA handle of the subscription to which the symbols are added
[in]symbolsThe symbols to add
[in]symbol_countA number of symbols
Returns
DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error

◆ dxf_clear_symbols()

DXFEED_API ERRORCODE dxf_clear_symbols ( dxf_subscription_t  subscription)

Removes all the symbols from the subscription.

Parameters
[in]subscriptionA handle of the subscription whose symbols are to be cleared
Returns
DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error

◆ dxf_get_symbols()

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.

The memory for the resulting list is allocated internally, so no actions to free it are required. The symbol name buffer is guaranteed to be valid until either the subscription symbol list is changed or a new call of this function is performed.

Parameters
[in]subscriptionA handle of the subscriptions whose symbols are to retrieve
[out]symbolsA pointer to the string array object to which the symbol list is to be stored
[out]symbol_countA pointer to the variable to which the symbol count is to be stored
Returns
DXF_SUCCESS on successful symbols retrieval or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;

◆ dxf_remove_candle_symbol()

DXFEED_API ERRORCODE dxf_remove_candle_symbol ( dxf_subscription_t  subscription,
dxf_candle_attributes_t  candle_attributes 
)

Remove a candle symbol from the subscription.

Parameters
[in]subscriptiona handle of the subscription from symbol will be removed
[in]candle_attributespointer to the candle structure
Returns
DXF_SUCCESS on successful symbol removal or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;

◆ dxf_remove_symbol()

DXFEED_API ERRORCODE dxf_remove_symbol ( dxf_subscription_t  subscription,
dxf_const_string_t  symbol 
)

Removes a single symbol from the subscription.

A wildcard symbol "*" will remove all symbols: there will be an unsubscription from messages on all current symbols. If there is already a subscription to "*" and the symbol to remove is not a "*", then nothing will happen.

Parameters
[in]subscriptionA handle of the subscription from which a symbol is removed
[in]symbolThe symbol to remove
Returns
DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error

◆ dxf_remove_symbols()

DXFEED_API ERRORCODE dxf_remove_symbols ( dxf_subscription_t  subscription,
dxf_const_string_t symbols,
int  symbol_count 
)

Removes several symbols from the subscription.

No error occurs if it's attempted to remove symbols that weren't added beforehand. First met the "*" symbol (wildcard) will remove all symbols: there will be an unsubscription from messages on all current symbols. If there is already a subscription to "*" and the symbols to remove are not contain a "*", then nothing will happen.

Parameters
[in]subscriptionA handle of the subscription from which symbols are removed
[in]symbolsThe symbols to remove
[in]symbol_countA number of symbols
Returns
DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error

◆ dxf_set_symbols()

DXFEED_API ERRORCODE dxf_set_symbols ( dxf_subscription_t  subscription,
dxf_const_string_t symbols,
int  symbol_count 
)

Sets the symbols for the subscription.

The difference between this function and dxf_add_symbols is that all the previously added symbols that do not belong to the symbol list passed to this function will be removed.

Parameters
[in]subscriptionA handle of the subscription whose symbols are to be set
[in]symbolsThe symbol list to set
[in]symbol_countThe symbol count
Returns
DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error