Class BasicCassandreStrategy
- java.lang.Object
-
- tech.cassandre.trading.bot.strategy.GenericCassandreStrategy
-
- tech.cassandre.trading.bot.strategy.BasicCassandreStrategy
-
- All Implemented Interfaces:
CassandreStrategyInterface
public abstract class BasicCassandreStrategy extends GenericCassandreStrategy
Basic strategy - Cassandre bot will run the first BasicCassandreStrategy implementation found.
-
-
Constructor Summary
Constructors Constructor Description BasicCassandreStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accountUpdate(AccountDTO account)
Method called by streams at every account update.void
onAccountUpdate(AccountDTO account)
Method triggered at every account update.void
onOrderUpdate(OrderDTO order)
Method triggered on every order update.void
onPositionStatusUpdate(PositionDTO position)
Method triggered on every position status update.void
onPositionUpdate(PositionDTO position)
Method triggered on every position update.void
onTickerUpdate(TickerDTO ticker)
Method triggered at every ticker update.void
onTradeUpdate(TradeDTO trade)
Method triggered on every trade update.void
orderUpdate(OrderDTO order)
Method called by streams on every order update.void
positionUpdate(PositionDTO position)
Method called by streams on every position update.void
tickerUpdate(TickerDTO ticker)
Method called by streams at every ticker update.void
tradeUpdate(TradeDTO trade)
Method called by streams on every trade update.-
Methods inherited from class tech.cassandre.trading.bot.strategy.GenericCassandreStrategy
canBuy, canBuy, canBuy, canBuy, canSell, canSell, canSell, canSell, getAccounts, getEstimatedBuyingCost, getLastTicker, getOrders, getPositions, getPositionService, getPreviousPositions, getTradeAccount, getTrades, getTradeService, restorePosition, restoreTrade, setPositionService, setTradeService
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tech.cassandre.trading.bot.strategy.CassandreStrategyInterface
getRequestedCurrencyPairs, getTradeAccount
-
-
-
-
Method Detail
-
accountUpdate
public final void accountUpdate(AccountDTO account)
Description copied from interface:CassandreStrategyInterface
Method called by streams at every account update.- Parameters:
account
- account
-
tickerUpdate
public final void tickerUpdate(TickerDTO ticker)
Description copied from interface:CassandreStrategyInterface
Method called by streams at every ticker update.- Parameters:
ticker
- ticker
-
orderUpdate
public final void orderUpdate(OrderDTO order)
Description copied from interface:CassandreStrategyInterface
Method called by streams on every order update.- Parameters:
order
- order
-
tradeUpdate
public final void tradeUpdate(TradeDTO trade)
Description copied from interface:CassandreStrategyInterface
Method called by streams on every trade update.- Parameters:
trade
- trade
-
positionUpdate
public final void positionUpdate(PositionDTO position)
Description copied from interface:CassandreStrategyInterface
Method called by streams on every position update.- Parameters:
position
- trade
-
onAccountUpdate
public void onAccountUpdate(AccountDTO account)
Description copied from interface:CassandreStrategyInterface
Method triggered at every account update.- Parameters:
account
- account
-
onTickerUpdate
public void onTickerUpdate(TickerDTO ticker)
Description copied from interface:CassandreStrategyInterface
Method triggered at every ticker update.- Parameters:
ticker
- ticker
-
onOrderUpdate
public void onOrderUpdate(OrderDTO order)
Description copied from interface:CassandreStrategyInterface
Method triggered on every order update.- Parameters:
order
- order
-
onTradeUpdate
public void onTradeUpdate(TradeDTO trade)
Description copied from interface:CassandreStrategyInterface
Method triggered on every trade update.- Parameters:
trade
- trade
-
onPositionUpdate
public void onPositionUpdate(PositionDTO position)
Description copied from interface:CassandreStrategyInterface
Method triggered on every position update.- Parameters:
position
- position
-
onPositionStatusUpdate
public void onPositionStatusUpdate(PositionDTO position)
Description copied from interface:CassandreStrategyInterface
Method triggered on every position status update.- Parameters:
position
- position
-
-