Class PositionCreationResultDTO
java.lang.Object
tech.cassandre.trading.bot.dto.position.PositionCreationResultDTO
Position creation result for
PositionDTO
.
If successful (isSuccessful() == true), you can get the position with getPosition().
if not successful (isSuccessful() == false), you can get:
- The error message with getErrorMessage().
- The exception causing the error with getException().-
Constructor Summary
ConstructorDescriptionPositionCreationResultDTO
(String newErrorMessage, Exception newException) Constructor for unsuccessful position creation.PositionCreationResultDTO
(PositionDTO newPosition) Constructor for successful position creation. -
Method Summary
Modifier and TypeMethodDescriptionError message (filled if position creation failed).Exception (filled if position creation failed).Position (filled if position is successful).boolean
Getter successful.toString()
-
Constructor Details
-
PositionCreationResultDTO
Constructor for successful position creation.- Parameters:
newPosition
- position
-
PositionCreationResultDTO
Constructor for unsuccessful position creation.- Parameters:
newErrorMessage
- error messagenewException
- exception
-
-
Method Details
-
isSuccessful
public boolean isSuccessful()Getter successful.- Returns:
- successful
-
toString
-
getPosition
Position (filled if position is successful). -
getErrorMessage
Error message (filled if position creation failed). -
getException
Exception (filled if position creation failed).
-