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
User service - XChange implementation of
UserService
.-
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
ACCOUNT_MAPPER, CANDLE_MAPPER, CURRENCY_MAPPER, logger, ORDER_MAPPER, POSITION_MAPPER, STRATEGY_MAPPER, TICKER_MAPPER, TRADE_MAPPER, UTIL_MAPPER
-
Constructor Summary
ConstructorDescriptionUserServiceXChangeImplementation
(long rate, org.knowm.xchange.service.account.AccountService newXChangeAccountService) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve user accounts information from exchange (accounts and balances).final Map<String,
AccountDTO> Retrieve user accounts information from cache - used by GraphQL API.getUser()
Retrieve user information from exchange (user, accounts and balances).
-
Constructor Details
-
UserServiceXChangeImplementation
public UserServiceXChangeImplementation(long rate, org.knowm.xchange.service.account.AccountService newXChangeAccountService) Constructor.- Parameters:
rate
- rate in msnewXChangeAccountService
- xchange account service
-
-
Method Details
-
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
Description copied from interface:UserService
Retrieve user accounts information from exchange (accounts and balances).- Specified by:
getAccounts
in interfaceUserService
- Returns:
- accounts
-
getAccountsFromCache
Description copied from interface:UserService
Retrieve user accounts information from cache - used by GraphQL API.- Specified by:
getAccountsFromCache
in interfaceUserService
- Returns:
- accounts
-