| | |
| | | package com.xcong.excoin.modules.contract.parameter.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.xcong.excoin.utils.CommonUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | @ApiModelProperty(value = "仓位类型 1-逐仓 2-全仓") |
| | | private Integer positionType; |
| | | |
| | | @ApiModelProperty(value = "维持保证金") |
| | | private BigDecimal holdBond; |
| | | |
| | | @ApiModelProperty(value = "手续费") |
| | | private BigDecimal openingFeeAmount; |
| | | |
| | | public String getOpeningPrice() { |
| | | return openingPrice.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | |
| | | return CommonUtils.amountDotFormat(this.symbol, openingPrice); |
| | | } |
| | | |
| | | public String getStopLossPrice() { |
| | | return CommonUtils.amountDotFormat(this.symbol, stopLossPrice); |
| | | } |
| | | |
| | | public String getStopProfitPrice() { |
| | | return CommonUtils.amountDotFormat(this.symbol, stopProfitPrice); |
| | | } |
| | | |
| | | public String getBondAmount() { |
| | | return bondAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | return bondAmount == null ? "" : bondAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getForceClosingPrice() { |
| | | return forceClosingPrice.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | return CommonUtils.amountDotFormat(this.symbol, forceClosingPrice); |
| | | } |
| | | |
| | | public String getProfitOrLoss() { |
| | | return profitOrLoss.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | return profitOrLoss.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public BigDecimal getCanAddMaxBond() { |