dxFeed C API
6.0.1
dxFeed C API library intended to provide market data access for DX clients
|
Snapshot functions. More...
![]() |
Typedefs | |
typedef void(* | dxf_snapshot_listener_t) (const dxf_snapshot_data_ptr_t snapshot_data, void *user_data) |
Snapshot listener prototype. More... | |
Functions | |
DXFEED_API ERRORCODE | dxf_create_snapshot (dxf_connection_t connection, dx_event_id_t event_id, dxf_const_string_t symbol, const char *source, dxf_long_t time, OUT dxf_snapshot_t *snapshot) |
Creates snapshot with the specified parameters. More... | |
DXFEED_API ERRORCODE | dxf_create_order_snapshot (dxf_connection_t connection, dxf_const_string_t symbol, const char *source, dxf_long_t time, OUT dxf_snapshot_t *snapshot) |
Creates Order snapshot with the specified parameters. More... | |
DXFEED_API ERRORCODE | dxf_create_candle_snapshot (dxf_connection_t connection, dxf_candle_attributes_t candle_attributes, dxf_long_t time, OUT dxf_snapshot_t *snapshot) |
Creates Candle snapshot with the specified parameters. More... | |
DXFEED_API ERRORCODE | dxf_close_snapshot (dxf_snapshot_t snapshot) |
Closes a snapshot. More... | |
DXFEED_API ERRORCODE | dxf_attach_snapshot_listener (dxf_snapshot_t snapshot, dxf_snapshot_listener_t snapshot_listener, void *user_data) |
Attaches a listener callback to the snapshot. More... | |
DXFEED_API ERRORCODE | dxf_detach_snapshot_listener (dxf_snapshot_t snapshot, dxf_snapshot_listener_t snapshot_listener) |
Detaches a listener from the snapshot. More... | |
DXFEED_API ERRORCODE | dxf_attach_snapshot_inc_listener (dxf_snapshot_t snapshot, dxf_snapshot_inc_listener_t snapshot_listener, void *user_data) |
Attaches an incremental listener callback to the snapshot. More... | |
DXFEED_API ERRORCODE | dxf_detach_snapshot_inc_listener (dxf_snapshot_t snapshot, dxf_snapshot_inc_listener_t snapshot_listener) |
Detaches a listener from the snapshot. More... | |
DXFEED_API ERRORCODE | dxf_get_snapshot_symbol (dxf_snapshot_t snapshot, OUT dxf_string_t *symbol) |
Retrieves the symbol currently added to the snapshot subscription. More... | |
Snapshot functions.
typedef void(* dxf_snapshot_listener_t) (const dxf_snapshot_data_ptr_t snapshot_data, void *user_data) |
Snapshot listener prototype.
[in] | snapshot_data | Pointer to the received snapshot data |
[in] | user_data | Pointer to user struct, use NULL by default |
DXFEED_API ERRORCODE dxf_attach_snapshot_inc_listener | ( | dxf_snapshot_t | snapshot, |
dxf_snapshot_inc_listener_t | snapshot_listener, | ||
void * | user_data | ||
) |
Attaches an incremental listener callback to the snapshot.
This callback will be invoked when the new snapshot arrives or existing updates. No error occurs if it's attempted to attach the same listener twice or more.
[in] | snapshot | A handle of the snapshot to which a listener is to be attached |
[in] | snapshot_listener | A listener callback function pointer |
[in] | user_data | Data to be passed to the callback function |
DXFEED_API ERRORCODE dxf_attach_snapshot_listener | ( | dxf_snapshot_t | snapshot, |
dxf_snapshot_listener_t | snapshot_listener, | ||
void * | user_data | ||
) |
Attaches a listener callback to the snapshot.
This callback will be invoked when the new snapshot arrives or existing updates. No error occurs if it's attempted to attach the same listener twice or more.
[in] | snapshot | A handle of the snapshot to which a listener is to be attached |
[in] | snapshot_listener | A listener callback function pointer |
[in] | user_data | Data to be passed to the callback function |
DXFEED_API ERRORCODE dxf_close_snapshot | ( | dxf_snapshot_t | snapshot | ) |
Closes a snapshot.
All the data associated with it will be freed.
[in] | snapshot | A handle of the snapshot to close |
DXFEED_API ERRORCODE dxf_create_candle_snapshot | ( | dxf_connection_t | connection, |
dxf_candle_attributes_t | candle_attributes, | ||
dxf_long_t | time, | ||
OUT dxf_snapshot_t * | snapshot | ||
) |
Creates Candle snapshot with the specified parameters.
[in] | connection | A handle of a previously created connection which the subscription will be using |
[in] | candle_attributes | Object specified symbol attributes of candle |
[in] | time | Time in the past (unix time in milliseconds) |
[out] | snapshot | A handle of the created snapshot |
DXFEED_API ERRORCODE dxf_create_order_snapshot | ( | dxf_connection_t | connection, |
dxf_const_string_t | symbol, | ||
const char * | source, | ||
dxf_long_t | time, | ||
OUT dxf_snapshot_t * | snapshot | ||
) |
Creates Order snapshot with the specified parameters.
If source is NULL string subscription on Order event will be performed. You can specify order source for Order event by passing suffix: "BYX", "BZX", "DEA", "DEX", "ISE", "IST", "NTV" etc. If source is equal to "AGGREGATE_BID" or "AGGREGATE_ASK" subscription on MarketMaker event will be performed.
[in] | connection | A handle of a previously created connection which the subscription will be using |
[in] | symbol | The symbol to add |
[in] | source | Order source for Order, which 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". For MarketMaker subscription use "AGGREGATE_BID" or "AGGREGATE_ASK" keyword. |
[in] | time | Time in the past (unix time in milliseconds) |
[out] | snapshot | A handle of the created snapshot |
DXFEED_API ERRORCODE dxf_create_snapshot | ( | dxf_connection_t | connection, |
dx_event_id_t | event_id, | ||
dxf_const_string_t | symbol, | ||
const char * | source, | ||
dxf_long_t | time, | ||
OUT dxf_snapshot_t * | snapshot | ||
) |
Creates snapshot with the specified parameters.
For Order or Candle events (dx_eid_order or dx_eid_candle) please use short form of this function: dxf_create_order_snapshot or dxf_create_candle_snapshot respectively.
For order events (event_id is 'dx_eid_order') If source is NULL string subscription on Order event will be performed. You can specify order source for Order event by passing suffix: "BYX", "BZX", "DEA", "DEX", "ISE", "IST", "NTV" etc. If source is equal to "AGGREGATE_BID" or "AGGREGATE_ASK" subscription on MarketMaker event will be performed. For other events source parameter does not matter.
[in] | connection | A handle of a previously created connection which the subscription will be using |
[in] | event_id | Single event id. Next events is supported: dxf_eid_order, dxf_eid_candle, dx_eid_spread_order, dx_eid_time_and_sale, dx_eid_greeks, dx_eid_series. |
[in] | symbol | The symbol to add. |
[in] | source | Order source for Order, which 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". For MarketMaker subscription use "AGGREGATE_BID" or "AGGREGATE_ASK" keyword. |
[in] | time | Time in the past (unix time in milliseconds). |
[out] | snapshot | A handle of the created snapshot |
DXFEED_API ERRORCODE dxf_detach_snapshot_inc_listener | ( | dxf_snapshot_t | snapshot, |
dxf_snapshot_inc_listener_t | snapshot_listener | ||
) |
Detaches a listener from the snapshot.
No error occurs if it's attempted to detach a listener which wasn't previously attached.
[in] | snapshot | A handle of the snapshot to which a listener is to be detached |
[in] | snapshot_listener | A listener callback function pointer |
DXFEED_API ERRORCODE dxf_detach_snapshot_listener | ( | dxf_snapshot_t | snapshot, |
dxf_snapshot_listener_t | snapshot_listener | ||
) |
Detaches a listener from the snapshot.
No error occurs if it's attempted to detach a listener which wasn't previously attached.
[in] | snapshot | A handle of the snapshot to which a listener is to be detached |
[in] | snapshot_listener | A listener callback function pointer |
DXFEED_API ERRORCODE dxf_get_snapshot_symbol | ( | dxf_snapshot_t | snapshot, |
OUT dxf_string_t * | symbol | ||
) |
Retrieves the symbol currently added to the snapshot subscription.
The memory for the resulting symbol is allocated internally, so no actions to free it are required.
[in] | snapshot | A handle of the snapshot to which a listener is to be detached |
[out] | symbol | A pointer to the string object to which the symbol is to be stored |