dxFeed API contains particular subtype of events called indexed events. Any event of this subtype (for example, Candle, Order, TimeAndSale, etc.) may contain EventFlags field.
Here are a few samples on REMOVE_EVENT flag processing:
- Candle event with REMOVE_EVENT flag shall be considered as a notification that candle with the current index was removed for some reason (for example, all events constituting this candle were cancelled). It means that candle with this index shall be removed from all internal data structures because it does not exist anymore.
- Series event with REMOVE_EVENT flag shall be considered as a notification that event with this index was removed (e.g. data is not available for this particular index) and shall be removed from all internal data structures.
- Order event with REMOVE_EVENT flag shall be processed the same way as live events above. There is a particular case – order event with zero (0) index. For example:
=Order#NTV EventSymbol Index Time Sequence Price Size Flags MarketMaker Order#NTV AAPL 0 0 0 NaN NaN 0 \NULL EventFlags=REMOVE_EVENT,SNAPSHOT_END
This event is an example of a system event that closes historical data snapshot and shall be processed the same way as other events with REMOVE_EVENT flag – removed from all internal data structures.
- TimeAndSale event with REMOVE_EVENT flag shall follow the same logic as above. Moreover, system events marked with REMOVE_EVENT flag and NaN price and size may be received and shall be processed likewise.
Please refer to dxFeed Help Desk if you have any questions or concerns.