Class UserServiceDryModeImplementation
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.Base
-
- tech.cassandre.trading.bot.util.base.BaseService
-
- tech.cassandre.trading.bot.service.dry.UserServiceDryModeImplementation
-
- All Implemented Interfaces:
UserService
public class UserServiceDryModeImplementation extends BaseService implements UserService
User service in dry mode.
-
-
Field Summary
Fields Modifier and Type Field Description static String
TRADE_ACCOUNT_ID
Trade account ID.static String
USER_ID
User ID.
-
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.List<org.springframework.core.io.Resource>
getFilesToLoad()
Returns the list of files to import.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.BaseService
getBucket, getCurrencyPair, getMapper
-
-
-
-
Field Detail
-
USER_ID
public static final String USER_ID
User ID.- See Also:
- Constant Field Values
-
TRADE_ACCOUNT_ID
public static final String TRADE_ACCOUNT_ID
Trade account ID.- See Also:
- Constant Field Values
-
-
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
-
getFilesToLoad
public List<org.springframework.core.io.Resource> getFilesToLoad()
Returns the list of files to import.- Returns:
- files to import.
-
addToBalance
public void addToBalance(CurrencyDTO currency, BigDecimal amount)
Update balance of trade account.- Parameters:
currency
- currencyamount
- amount
-
-