Class MarketServiceXChangeImplementation
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.Base
-
- tech.cassandre.trading.bot.util.base.BaseService
-
- tech.cassandre.trading.bot.service.xchange.MarketServiceXChangeImplementation
-
- All Implemented Interfaces:
MarketService
public class MarketServiceXChangeImplementation extends BaseService implements MarketService
Market service - XChange implementation.
-
-
Constructor Summary
Constructors Constructor Description MarketServiceXChangeImplementation(long rate, org.knowm.xchange.service.marketdata.MarketDataService newMarketDataService)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<CurrencyAmountDTO>
getEstimatedBuyingCost(CurrencyPairDTO currencyPair, BigDecimal amount)
Returns the cost of buying an amount of a currency pair.Optional<TickerDTO>
getTicker(CurrencyPairDTO currencyPair)
Returns a ticker for a currency pair.-
Methods inherited from class tech.cassandre.trading.bot.util.base.BaseService
getBucket, getCurrencyPair, getMapper
-
-
-
-
Method Detail
-
getTicker
public final Optional<TickerDTO> getTicker(CurrencyPairDTO currencyPair)
Description copied from interface:MarketService
Returns a ticker for a currency pair.- Specified by:
getTicker
in interfaceMarketService
- Parameters:
currencyPair
- currency pair- Returns:
- ticker
-
getEstimatedBuyingCost
public final Optional<CurrencyAmountDTO> getEstimatedBuyingCost(CurrencyPairDTO currencyPair, BigDecimal amount)
Description copied from interface:MarketService
Returns the cost of buying an amount of a currency pair.- Specified by:
getEstimatedBuyingCost
in interfaceMarketService
- Parameters:
currencyPair
- currency pairamount
- amount- Returns:
- costs.
-
-