| | |
| | | private BigDecimal openingFeeAmount; |
| | | |
| | | public String getOpeningPrice() { |
| | | return openingPrice.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | |
| | | return dotFormat(openingPrice); |
| | | } |
| | | |
| | | private String dotFormat(BigDecimal price) { |
| | | String priceFormat = ""; |
| | | switch (this.symbol) { |
| | | case "BTC/USDT": |
| | | case "ETH/USDT": |
| | | case "LTC/USDT": |
| | | case "BCH/USDT": |
| | | priceFormat = price.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | break; |
| | | case "EOS/USDT": |
| | | case "XRP/USDT": |
| | | case "ETC/USDT": |
| | | priceFormat = price.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | break; |
| | | default: |
| | | priceFormat = price.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | return priceFormat; |
| | | } |
| | | |
| | | public String getBondAmount() { |
| | | return bondAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | return dotFormat(bondAmount); |
| | | } |
| | | |
| | | public String getForceClosingPrice() { |
| | | return forceClosingPrice.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | return dotFormat(forceClosingPrice); |
| | | } |
| | | |
| | | public String getProfitOrLoss() { |