| | |
| | | package com.xcong.excoin.modules.contract.parameter.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | @ApiModelProperty("开仓手续费") |
| | | private BigDecimal openingFeeAmount; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty("开仓时间") |
| | | private Date openingTime; |
| | | |
| | | @ApiModelProperty("保证金") |
| | | private BigDecimal bondAmount; |
| | | |
| | |
| | | |
| | | @ApiModelProperty("止盈价") |
| | | private BigDecimal stopProfitPrice; |
| | | |
| | | @ApiModelProperty("倍率杠杆") |
| | | private int leverRatio; |
| | | |
| | | public String getOpeningPrice() { |
| | | return openingPrice == null ? "" : openingPrice.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getOpeningFeeAmount() { |
| | | return openingFeeAmount == null ? "" : openingFeeAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getBondAmount() { |
| | | return bondAmount == null ? "" : bondAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getHoldAmount() { |
| | | return holdAmount == null ? "" : holdAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getForceClosingPrice() { |
| | | return forceClosingPrice == null ? "" : forceClosingPrice.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public void setOpeningFeeAmount(BigDecimal openingFeeAmount, BigDecimal feeSpread) { |
| | | this.openingFeeAmount = openingFeeAmount == null ? openingFeeAmount : openingFeeAmount.multiply(feeSpread).setScale(8, BigDecimal.ROUND_DOWN); |
| | | } |
| | | } |