Class UserServiceXChangeImplementation
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.Base
-
- tech.cassandre.trading.bot.util.base.service.BaseService
-
- tech.cassandre.trading.bot.service.UserServiceXChangeImplementation
-
- All Implemented Interfaces:
UserService
public class UserServiceXChangeImplementation extends BaseService implements UserService
User service - XChange implementation.
-
-
Field Summary
-
Fields inherited from class tech.cassandre.trading.bot.util.base.service.BaseService
bucket
-
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 UserServiceXChangeImplementation(long rate, org.knowm.xchange.service.account.AccountService newXChangeAccountService)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,AccountDTO>
getAccounts()
Retrieve user accounts information from exchange.Map<String,AccountDTO>
getAccountsFromCache()
Retrieve user accounts information from cache.Optional<UserDTO>
getUser()
Retrieve user information from exchange (user, accounts and balances).
-
-
-
Method Detail
-
getUser
public Optional<UserDTO> getUser()
Description copied from interface:UserService
Retrieve user information from exchange (user, accounts and balances).- Specified by:
getUser
in interfaceUserService
- Returns:
- user from exchange
-
getAccounts
public Map<String,AccountDTO> getAccounts()
Description copied from interface:UserService
Retrieve user accounts information from exchange.- Specified by:
getAccounts
in interfaceUserService
- Returns:
- accounts
-
getAccountsFromCache
public final Map<String,AccountDTO> getAccountsFromCache()
Description copied from interface:UserService
Retrieve user accounts information from cache.- Specified by:
getAccountsFromCache
in interfaceUserService
- Returns:
- accounts
-
-