Interface PositionService

  • All Known Implementing Classes:
    PositionServiceImplementation

    public interface PositionService
    Service allowing to create and retrieve positions.
    • Method Detail

      • getPositions

        Set<PositionDTO> getPositions()
        Get positions.
        Returns:
        position list
      • getPositionById

        Optional<PositionDTO> getPositionById​(long id)
        Get position by id.
        Parameters:
        id - id
        Returns:
        position
      • tickerUpdate

        void tickerUpdate​(TickerDTO ticker)
        Method called by streams at every ticker update.
        Parameters:
        ticker - ticker
      • tradeUpdate

        void tradeUpdate​(TradeDTO trade)
        Method called by streams on every trade update.
        Parameters:
        trade - trade
      • restorePosition

        void restorePosition​(PositionDTO position)
        Restore position.
        Parameters:
        position - position