Class UserServiceDryModeImplementation
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.Base
-
- tech.cassandre.trading.bot.util.base.service.BaseService
-
- tech.cassandre.trading.bot.service.dry.UserServiceDryModeImplementation
-
- All Implemented Interfaces:
UserService
public class UserServiceDryModeImplementation extends BaseService implements UserService
User service (dry mode implementation).
-
-
Field Summary
-
Fields inherited from class tech.cassandre.trading.bot.util.base.Base
accountMapper, currencyMapper, logger, orderMapper, positionMapper, strategyMapper, tickerMapper, tradeMapper, utilMapper
-
-
Constructor Summary
Constructors Constructor Description UserServiceDryModeImplementation()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToBalance(CurrencyDTO currency, BigDecimal amount)
Update balance of trade account (method call by trade service).Optional<UserDTO>
getUser()
Retrieve user information from exchange (user, accounts and balances).void
setDependencies(GenericCassandreStrategy newStrategy)
Set dependencies.-
Methods inherited from class tech.cassandre.trading.bot.util.base.service.BaseService
getBucket
-
-
-
-
Method Detail
-
setDependencies
public void setDependencies(GenericCassandreStrategy newStrategy)
Set dependencies.- Parameters:
newStrategy
- strategy
-
getUser
public final Optional<UserDTO> getUser()
Description copied from interface:UserService
Retrieve user information from exchange (user, accounts and balances).- Specified by:
getUser
in interfaceUserService
- Returns:
- account from exchange
-
addToBalance
public void addToBalance(CurrencyDTO currency, BigDecimal amount)
Update balance of trade account (method call by trade service).- Parameters:
currency
- currencyamount
- amount
-
-