Class GainDTO
java.lang.Object
tech.cassandre.trading.bot.dto.util.GainDTO
Gain.
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GainDTO.GainDTOBuilder
builder()
boolean
Gain made (amount).Closing order fees (list coming from trade fees).getFees()
Returns the fees from opening and closing orders.Returns the sum of fees from opening and closing orders by currency.Opening order fees (list coming from trade fees).double
Gain made (percentage).int
hashCode()
boolean
isInferiorTo
(@NonNull GainDTO other) Returns true if the current gain is inferior to the gain passed as a parameter.boolean
isSuperiorTo
(@NonNull GainDTO other) Returns true if the current gain is superior to the gain passed as a parameter.toString()
-
Field Details
-
ZERO
Zero gain constant.
-
-
Method Details
-
getFees
Returns the fees from opening and closing orders.- Returns:
- fees from opening and closing orders
-
getFeesByCurrency
Returns the sum of fees from opening and closing orders by currency.- Returns:
- fees
-
isInferiorTo
Returns true if the current gain is inferior to the gain passed as a parameter.- Parameters:
other
- other gain- Returns:
- true if this gain is inferior to the gain passed as a parameter
-
isSuperiorTo
Returns true if the current gain is superior to the gain passed as a parameter.- Parameters:
other
- other gain- Returns:
- true if this gain is superior to the gain passed as a parameter
-
equals
-
hashCode
public int hashCode() -
toString
-
builder
-
getPercentage
public double getPercentage()Gain made (percentage). -
getAmount
Gain made (amount). -
getOpeningOrderFees
Opening order fees (list coming from trade fees). -
getClosingOrderFees
Closing order fees (list coming from trade fees).
-