Class Position
- java.lang.Object
-
- tech.cassandre.trading.bot.domain.Position
-
@Entity public class Position extends Object
Position (used to save data between restarts).
-
-
Constructor Summary
Constructors Constructor Description Position()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCloseOrderId()
Getter closeOrderId.BigDecimal
getHighestPrice()
Getter highestPrice.long
getId()
Getter id.BigDecimal
getLowestPrice()
Getter lowestPrice.String
getOpenOrderId()
Getter openOrderId.String
getStatus()
Getter status.Float
getStopGainPercentageRule()
Getter rulesStopGainPercentage.Float
getStopLossPercentageRule()
Getter rulesStopLossPercentage.void
setCloseOrderId(String newCloseOrderId)
Setter closeOrderId.void
setHighestPrice(BigDecimal newHighestPrice)
Setter highestPrice.void
setId(long newId)
Setter id.void
setLowestPrice(BigDecimal newLowestPrice)
Setter lowestPrice.void
setOpenOrderId(String newOpenOrderId)
Setter openOrderId.void
setStatus(String newStatus)
Setter status.void
setStopGainPercentageRule(Float newRulesStopGainPercentage)
Setter rulesStopGainPercentage.void
setStopLossPercentageRule(Float newRulesStopLossPercentage)
Setter rulesStopLossPercentage.
-
-
-
Method Detail
-
getId
public long getId()
Getter id.- Returns:
- id
-
setId
public void setId(long newId)
Setter id.- Parameters:
newId
- the id to set
-
getStatus
public String getStatus()
Getter status.- Returns:
- status
-
setStatus
public void setStatus(String newStatus)
Setter status.- Parameters:
newStatus
- the status to set
-
getStopGainPercentageRule
public Float getStopGainPercentageRule()
Getter rulesStopGainPercentage.- Returns:
- rulesStopGainPercentage
-
setStopGainPercentageRule
public void setStopGainPercentageRule(Float newRulesStopGainPercentage)
Setter rulesStopGainPercentage.- Parameters:
newRulesStopGainPercentage
- the rulesStopGainPercentage to set
-
getStopLossPercentageRule
public Float getStopLossPercentageRule()
Getter rulesStopLossPercentage.- Returns:
- rulesStopLossPercentage
-
setStopLossPercentageRule
public void setStopLossPercentageRule(Float newRulesStopLossPercentage)
Setter rulesStopLossPercentage.- Parameters:
newRulesStopLossPercentage
- the rulesStopLossPercentage to set
-
getOpenOrderId
public String getOpenOrderId()
Getter openOrderId.- Returns:
- openOrderId
-
setOpenOrderId
public void setOpenOrderId(String newOpenOrderId)
Setter openOrderId.- Parameters:
newOpenOrderId
- the openOrderId to set
-
getCloseOrderId
public String getCloseOrderId()
Getter closeOrderId.- Returns:
- closeOrderId
-
setCloseOrderId
public void setCloseOrderId(String newCloseOrderId)
Setter closeOrderId.- Parameters:
newCloseOrderId
- the closeOrderId to set
-
getLowestPrice
public BigDecimal getLowestPrice()
Getter lowestPrice.- Returns:
- lowestPrice
-
setLowestPrice
public void setLowestPrice(BigDecimal newLowestPrice)
Setter lowestPrice.- Parameters:
newLowestPrice
- the lowestPrice to set
-
getHighestPrice
public BigDecimal getHighestPrice()
Getter highestPrice.- Returns:
- highestPrice
-
setHighestPrice
public void setHighestPrice(BigDecimal newHighestPrice)
Setter highestPrice.- Parameters:
newHighestPrice
- the highestPrice to set
-
-