Class OrderCreationResultDTO
java.lang.Object
tech.cassandre.trading.bot.dto.trade.OrderCreationResultDTO
Order creation result for
OrderDTO
.
If successful (isSuccessful() == true), you can get the order with getOrder().
if not successful (isSuccessful() == false), you can get:
- The error message with getErrorMessage().
- The exception causing the error with getException().-
Constructor Summary
ConstructorDescriptionOrderCreationResultDTO
(String newErrorMessage, Exception newException) Constructor for unsuccessful order creation.OrderCreationResultDTO
(OrderDTO newOrder) Constructor for successful order creation. -
Method Summary
-
Constructor Details
-
OrderCreationResultDTO
Constructor for successful order creation.- Parameters:
newOrder
- order
-
OrderCreationResultDTO
Constructor for unsuccessful order creation.- Parameters:
newErrorMessage
- error messagenewException
- exception
-
-
Method Details
-
isSuccessful
public boolean isSuccessful()Getter successful.- Returns:
- successful
-
getOrderId
Returns order id.- Returns:
- id
-
toString
-
getOrder
Order (filled if order creation is successful). -
getErrorMessage
Error message (filled if order creation failed). -
getException
Exception (filled if order creation failed).
-