Skip to content

The restrictions when an application can add or remove symbols from a subscription

ttldtor edited this page Jun 21, 2021 · 1 revision

At the moment, these functions cannot be called in the implementations of event handlers (for example, dxf_event_listener_t and dxf_event_listener_v2_t):

  • dxf_add_symbol
  • dxf_add_symbols
  • dxf_add_candle_symbol
  • dxf_remove_candle_symbol
  • dxf_remove_symbol
  • dxf_remove_symbols
  • dxf_set_symbols
  • dxf_clear_symbols

This is due to the fact that it can disrupt the work of other event handlers or subscriptions, as it will be performed in the same thread.
It is advisable to call these functions in another thread (for example, main). Then the execution of these functions will be queued and run safely.

The same applies to other subscription\snapshots\books management functions.