Class OrderCreationResultDTO
- java.lang.Object
-
- tech.cassandre.trading.bot.dto.trade.OrderCreationResultDTO
-
-
Constructor Summary
Constructors Constructor Description OrderCreationResultDTO(String newErrorMessage, Exception newException)
Constructor for unsuccessful order creation.OrderCreationResultDTO(OrderDTO newOrder)
Constructor for successful order creation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getErrorMessage()
Error message (filled if order creation failed).Exception
getException()
Exception (filled if order creation failed).OrderDTO
getOrder()
Order (filled if order creation is successful).String
getOrderId()
Order ID (filled if order creation is successful).boolean
isSuccessful()
Indicates if the position creation was successful or not.String
toString()
-
-
-
Constructor Detail
-
OrderCreationResultDTO
public OrderCreationResultDTO(OrderDTO newOrder)
Constructor for successful order creation.- Parameters:
newOrder
- order
-
-
Method Detail
-
getOrderId
public String getOrderId()
Order ID (filled if order creation is successful).
-
getOrder
public OrderDTO getOrder()
Order (filled if order creation is successful).
-
getErrorMessage
public String getErrorMessage()
Error message (filled if order creation failed).
-
getException
public Exception getException()
Exception (filled if order creation failed).
-
isSuccessful
public boolean isSuccessful()
Indicates if the position creation was successful or not.
-
-