| | |
| | | return CommonUtils.amountDotFormat(this.symbol, 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 getStopLossPrice() { |
| | | return CommonUtils.amountDotFormat(this.symbol, stopLossPrice); |
| | | } |
| | | |
| | | public String getStopProfitPrice() { |
| | | return CommonUtils.amountDotFormat(this.symbol, stopProfitPrice); |
| | | } |
| | | |
| | | public String getBondAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, bondAmount); |
| | | return bondAmount == null ? "" : bondAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getForceClosingPrice() { |