This commit is contained in:
parent
bb273c8322
commit
95a4380a93
1 changed files with 1 additions and 2 deletions
|
|
@ -134,10 +134,9 @@ public class OrderCalculationService {
|
|||
private BigDecimal swapPriceCalc(String baseCurrency, BigDecimal s, BigDecimal n, int precision) {
|
||||
Rates rate = imdgQueryService.getRate(baseCurrency, LocalDate.now());
|
||||
BigDecimal p = n.divide(BigDecimal.valueOf(365), MC);
|
||||
log.info("Calculation swap price: {}*{}*{}", s, n, p);
|
||||
log.info("Calculation swap price: {}*{}*{}", rate.getValue(), s, p);
|
||||
return rate.getValue()
|
||||
.multiply(s, MC)
|
||||
.multiply(n, MC)
|
||||
.multiply(p, MC)
|
||||
.setScale(precision, RoundingMode.HALF_UP);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue