Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<!-- Core -->
<spring.version>3.3.5</spring.version>
<reactor.version>Dysprosium-SR25</reactor.version>
<xchange.version>5.0.13</xchange.version>
<xchange.version>5.2.2</xchange.version>
<bucket4j.version>8.0.1</bucket4j.version>
<liquibase.version>4.29.1</liquibase.version>
<opencsv.version>5.9</opencsv.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tech.cassandre.trading.bot.batch;

import info.bitrich.xchangestream.core.StreamingExchange;
import io.reactivex.disposables.Disposable;
import io.reactivex.rxjava3.disposables.Disposable;
import org.knowm.xchange.currency.CurrencyPair;
import org.knowm.xchange.dto.marketdata.Ticker;
import org.springframework.context.ApplicationContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public CurrencyPairDTO(final String currencyPair) {
* @param currencyPair currency pair
*/
public CurrencyPairDTO(final CurrencyPair currencyPair) {
this(currencyPair.base.toString(), currencyPair.counter.toString());
this(currencyPair.getBase().toString(), currencyPair.getCounter().toString());
}

/**
Expand Down Expand Up @@ -108,8 +108,8 @@ public CurrencyPairDTO(final CurrencyDTO newBaseCurrency, final CurrencyDTO newQ
*/
public CurrencyPairDTO(final Instrument instrument) {
final CurrencyPair cp = (CurrencyPair) instrument;
this.baseCurrency = new CurrencyDTO(cp.base.getCurrencyCode());
this.quoteCurrency = new CurrencyDTO(cp.counter.getCurrencyCode());
this.baseCurrency = new CurrencyDTO(cp.getBase().getCurrencyCode());
this.quoteCurrency = new CurrencyDTO(cp.getCounter().getCurrencyCode());
this.baseCurrencyPrecision = DEFAULT_CURRENCY_PRECISION;
this.quoteCurrencyPrecision = DEFAULT_CURRENCY_PRECISION;
}
Expand All @@ -122,8 +122,8 @@ public CurrencyPairDTO(final Instrument instrument) {
*/
public CurrencyPairDTO(final Instrument instrument, final int newBaseCurrencyPrecision, final int newQuoteCurrencyPrecision) {
final CurrencyPair cp = (CurrencyPair) instrument;
this.baseCurrency = new CurrencyDTO(cp.base.getCurrencyCode());
this.quoteCurrency = new CurrencyDTO(cp.counter.getCurrencyCode());
this.baseCurrency = new CurrencyDTO(cp.getBase().getCurrencyCode());
this.quoteCurrency = new CurrencyDTO(cp.getCounter().getCurrencyCode());
this.baseCurrencyPrecision = newBaseCurrencyPrecision;
this.quoteCurrencyPrecision = newQuoteCurrencyPrecision;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class ExchangeServiceXChangeImplementation extends BaseService implements
public Set<CurrencyPairDTO> getAvailableCurrencyPairs() {
logger.debug("Retrieving available currency pairs");
return exchange.getExchangeMetaData()
.getCurrencyPairs()
.getInstruments()
.keySet()
.stream()
.peek(cp -> logger.debug(" - {} available", cp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface AccountMapper {
UserDTO mapToUserDTO(AccountInfo source);

@Mapping(source = "id", target = "accountId")
@Mapping(target = "feature", ignore = true)
@Mapping(target = "features", ignore = true)
@Mapping(target = "balances", source = "balances")
@Mapping(target = "balance", ignore = true)
AccountDTO mapToWalletDTO(Wallet source);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ default String mapToCurrencyPairString(CurrencyPairDTO source) {

default CurrencyPairDTO mapToCurrencyPairDTO(Instrument source) {
final CurrencyPair cp = (CurrencyPair) source;
CurrencyDTO base = new CurrencyDTO(cp.base.getCurrencyCode());
CurrencyDTO quote = new CurrencyDTO(cp.counter.getCurrencyCode());
CurrencyDTO base = new CurrencyDTO(cp.getBase().getCurrencyCode());
CurrencyDTO quote = new CurrencyDTO(cp.getCounter().getCurrencyCode());
return new CurrencyPairDTO(base, quote);
}

Expand Down