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