Class Order
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.domain.BaseDomain
-
- tech.cassandre.trading.bot.domain.Order
-
@Entity public class Order extends BaseDomain
Order.
-
-
Constructor Summary
Constructors Constructor Description Order()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
CurrencyAmount
getAmount()
Amount that was ordered.CurrencyAmount
getAveragePrice()
Weighted Average price of the fills in the order.CurrencyAmount
getCumulativeAmount()
Amount to be ordered / amount that has been matched against order on the order book/filled.String
getCurrencyPair()
Currency pair.Long
getId()
Technical ID.String
getLeverage()
The leverage to use for margin related to this order.CurrencyAmount
getLimitPrice()
Limit price.CurrencyAmount
getMarketPrice()
Market price - The price Cassandre had when the order was created.String
getOrderId()
An identifier set by the exchange that uniquely identifies the order.OrderStatusDTO
getStatus()
Order status.Strategy
getStrategy()
The strategy that created the order.ZonedDateTime
getTimestamp()
The timestamp of the order.Set<Trade>
getTrades()
All trades related to order.OrderTypeDTO
getType()
Order type i.e.String
getUserReference()
An identifier provided by the user on placement that uniquely identifies the order.int
hashCode()
void
setAmount(CurrencyAmount amount)
Amount that was ordered.void
setAveragePrice(CurrencyAmount averagePrice)
Weighted Average price of the fills in the order.void
setCumulativeAmount(CurrencyAmount cumulativeAmount)
Amount to be ordered / amount that has been matched against order on the order book/filled.void
setCurrencyPair(String currencyPair)
Currency pair.void
setId(Long id)
Technical ID.void
setLeverage(String leverage)
The leverage to use for margin related to this order.void
setLimitPrice(CurrencyAmount limitPrice)
Limit price.void
setMarketPrice(CurrencyAmount marketPrice)
Market price - The price Cassandre had when the order was created.void
setOrderId(String orderId)
An identifier set by the exchange that uniquely identifies the order.void
setStatus(OrderStatusDTO status)
Order status.void
setStrategy(Strategy strategy)
The strategy that created the order.void
setTimestamp(ZonedDateTime timestamp)
The timestamp of the order.void
setTrades(Set<Trade> trades)
All trades related to order.void
setType(OrderTypeDTO type)
Order type i.e.void
setUserReference(String userReference)
An identifier provided by the user on placement that uniquely identifies the order.String
toString()
-
Methods inherited from class tech.cassandre.trading.bot.util.base.domain.BaseDomain
getCreatedOn, getUpdatedOn, setCreatedOn, setUpdatedOn
-
-
-
-
Method Detail
-
getId
public Long getId()
Technical ID.
-
getOrderId
public String getOrderId()
An identifier set by the exchange that uniquely identifies the order.
-
getType
public OrderTypeDTO getType()
Order type i.e. bid (buy) or ask (sell).
-
getStrategy
public Strategy getStrategy()
The strategy that created the order.
-
getCurrencyPair
public String getCurrencyPair()
Currency pair.
-
getAmount
public CurrencyAmount getAmount()
Amount that was ordered.
-
getAveragePrice
public CurrencyAmount getAveragePrice()
Weighted Average price of the fills in the order.
-
getLimitPrice
public CurrencyAmount getLimitPrice()
Limit price.
-
getMarketPrice
public CurrencyAmount getMarketPrice()
Market price - The price Cassandre had when the order was created.
-
getLeverage
public String getLeverage()
The leverage to use for margin related to this order.
-
getStatus
public OrderStatusDTO getStatus()
Order status.
-
getCumulativeAmount
public CurrencyAmount getCumulativeAmount()
Amount to be ordered / amount that has been matched against order on the order book/filled.
-
getUserReference
public String getUserReference()
An identifier provided by the user on placement that uniquely identifies the order.
-
getTimestamp
public ZonedDateTime getTimestamp()
The timestamp of the order.
-
setId
public void setId(Long id)
Technical ID.
-
setOrderId
public void setOrderId(String orderId)
An identifier set by the exchange that uniquely identifies the order.
-
setType
public void setType(OrderTypeDTO type)
Order type i.e. bid (buy) or ask (sell).
-
setStrategy
public void setStrategy(Strategy strategy)
The strategy that created the order.
-
setCurrencyPair
public void setCurrencyPair(String currencyPair)
Currency pair.
-
setAmount
public void setAmount(CurrencyAmount amount)
Amount that was ordered.
-
setAveragePrice
public void setAveragePrice(CurrencyAmount averagePrice)
Weighted Average price of the fills in the order.
-
setLimitPrice
public void setLimitPrice(CurrencyAmount limitPrice)
Limit price.
-
setMarketPrice
public void setMarketPrice(CurrencyAmount marketPrice)
Market price - The price Cassandre had when the order was created.
-
setLeverage
public void setLeverage(String leverage)
The leverage to use for margin related to this order.
-
setStatus
public void setStatus(OrderStatusDTO status)
Order status.
-
setCumulativeAmount
public void setCumulativeAmount(CurrencyAmount cumulativeAmount)
Amount to be ordered / amount that has been matched against order on the order book/filled.
-
setUserReference
public void setUserReference(String userReference)
An identifier provided by the user on placement that uniquely identifies the order.
-
setTimestamp
public void setTimestamp(ZonedDateTime timestamp)
The timestamp of the order.
-
toString
public String toString()
- Overrides:
toString
in classBaseDomain
-
-