Class TradeDTO.TradeDTOBuilder
- java.lang.Object
-
- tech.cassandre.trading.bot.dto.trade.TradeDTO.TradeDTOBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TradeDTO.TradeDTOBuilder
amount(CurrencyAmountDTO amount)
Amount of the trade.TradeDTO
build()
TradeDTO.TradeDTOBuilder
currencyPair(CurrencyPairDTO currencyPair)
Currency pair.TradeDTO.TradeDTOBuilder
fee(CurrencyAmountDTO fee)
The fee that was charged by the exchange for this order.TradeDTO.TradeDTOBuilder
id(Long id)
Technical id.TradeDTO.TradeDTOBuilder
order(Order order)
The order responsible for this trade.TradeDTO.TradeDTOBuilder
orderId(String orderId)
The order id of the order responsible for this trade.TradeDTO.TradeDTOBuilder
price(CurrencyAmountDTO price)
The price.TradeDTO.TradeDTOBuilder
timestamp(ZonedDateTime timestamp)
The timestamp of the trade.String
toString()
TradeDTO.TradeDTOBuilder
tradeId(String tradeId)
An identifier set by the exchange that uniquely identifies the trade.TradeDTO.TradeDTOBuilder
type(OrderTypeDTO type)
Order type i.e.TradeDTO.TradeDTOBuilder
userReference(String userReference)
An identifier provided by the user on placement that uniquely identifies the order.
-
-
-
Method Detail
-
id
public TradeDTO.TradeDTOBuilder id(Long id)
Technical id.- Returns:
this
.
-
tradeId
public TradeDTO.TradeDTOBuilder tradeId(String tradeId)
An identifier set by the exchange that uniquely identifies the trade.- Returns:
this
.
-
type
public TradeDTO.TradeDTOBuilder type(OrderTypeDTO type)
Order type i.e. bid (buy) or ask (sell).- Returns:
this
.
-
orderId
public TradeDTO.TradeDTOBuilder orderId(String orderId)
The order id of the order responsible for this trade.- Returns:
this
.
-
order
public TradeDTO.TradeDTOBuilder order(Order order)
The order responsible for this trade.- Returns:
this
.
-
currencyPair
public TradeDTO.TradeDTOBuilder currencyPair(CurrencyPairDTO currencyPair)
Currency pair.- Returns:
this
.
-
amount
public TradeDTO.TradeDTOBuilder amount(CurrencyAmountDTO amount)
Amount of the trade.- Returns:
this
.
-
price
public TradeDTO.TradeDTOBuilder price(CurrencyAmountDTO price)
The price.- Returns:
this
.
-
fee
public TradeDTO.TradeDTOBuilder fee(CurrencyAmountDTO fee)
The fee that was charged by the exchange for this order.- Returns:
this
.
-
userReference
public TradeDTO.TradeDTOBuilder userReference(String userReference)
An identifier provided by the user on placement that uniquely identifies the order.- Returns:
this
.
-
timestamp
public TradeDTO.TradeDTOBuilder timestamp(ZonedDateTime timestamp)
The timestamp of the trade.- Returns:
this
.
-
build
public TradeDTO build()
-
-