Class TradeFlux


public class TradeFlux extends BaseFlux<TradeDTO>
Trade flux - push TradeDTO. Two methods override from super class: - getNewValues(): calling trade service to retrieve trades from exchange (only if orders exists already in database). - saveValues(): saving/updating trades in database. To get a deep understanding of how it works, read the documentation of BaseFlux.
  • Constructor Details

  • Method Details

    • getNewValues

      protected final Set<TradeDTO> getNewValues()
      Description copied from class: BaseFlux
      Implements this method to return all the new values. Those values will be sent to the strategy.
      Overrides:
      getNewValues in class BaseFlux<TradeDTO>
      Returns:
      list of new values
    • saveValues

      protected final Set<TradeDTO> saveValues(Set<TradeDTO> newValues)
      Description copied from class: BaseFlux
      Implements this method to save values coming from flux.
      Overrides:
      saveValues in class BaseFlux<TradeDTO>
      Parameters:
      newValues - new value
      Returns:
      the value saved