Class OrderDTO.OrderDTOBuilder
java.lang.Object
tech.cassandre.trading.bot.dto.trade.OrderDTO.OrderDTOBuilder
- Enclosing class:
- OrderDTO
-
Method Summary
Modifier and TypeMethodDescriptionamount
(CurrencyAmountDTO amount) Amount to be ordered / amount that was ordered.averagePrice
(CurrencyAmountDTO averagePrice) Weighted average price of the fills in the order.build()
cumulativeAmount
(CurrencyAmountDTO cumulativeAmount) Amount to be ordered / amount that has been matched against order on the order book/filled.currencyPair
(CurrencyPairDTO currencyPair) Currency pair.The leverage to use for margin related to this order.limitPrice
(CurrencyAmountDTO limitPrice) Limit price.marketPrice
(CurrencyAmountDTO marketPrice) Market price - The price Cassandre had when the order was created.An identifier set by the exchange that uniquely identifies the order.status
(OrderStatusDTO status) Order status.strategy
(StrategyDTO strategy) The strategy that created the order.timestamp
(ZonedDateTime timestamp) The timestamp of the order.toString()
trades
(Collection<? extends TradeDTO> trades) type
(OrderTypeDTO type) Order type i.e.Technical id.userReference
(String userReference) An identifier provided by the user on placement that uniquely identifies the order.
-
Method Details
-
uid
Technical id.- Returns:
this
.
-
orderId
An identifier set by the exchange that uniquely identifies the order.- Returns:
this
.
-
type
Order type i.e. bid (buy) or ask (sell).- Returns:
this
.
-
strategy
The strategy that created the order.- Returns:
this
.
-
currencyPair
Currency pair.- Returns:
this
.
-
amount
Amount to be ordered / amount that was ordered.- Returns:
this
.
-
averagePrice
Weighted average price of the fills in the order.- Returns:
this
.
-
limitPrice
Limit price.- Returns:
this
.
-
marketPrice
Market price - The price Cassandre had when the order was created.- Returns:
this
.
-
leverage
The leverage to use for margin related to this order.- Returns:
this
.
-
status
Order status.- Returns:
this
.
-
cumulativeAmount
Amount to be ordered / amount that has been matched against order on the order book/filled.- Returns:
this
.
-
userReference
An identifier provided by the user on placement that uniquely identifies the order.- Returns:
this
.
-
timestamp
The timestamp of the order.- Returns:
this
.
-
trade
-
trades
-
clearTrades
-
build
-
toString
-