public class Order extends BaseObject
Constructor and Description |
---|
Order(long id,
String side,
String ordType,
BigDecimal price,
BigDecimal avgPrice,
String state,
String market,
Date createdAt,
BigDecimal volume,
BigDecimal remainingVolume,
BigDecimal executedVolume,
Integer tradesCount) |
Modifier and Type | Method and Description |
---|---|
BigDecimal |
getAvgPrice() |
Date |
getCreatedAt() |
BigDecimal |
getExecutedVolume() |
long |
getId() |
String |
getMarket() |
String |
getOrdType() |
BigDecimal |
getPrice() |
BigDecimal |
getRemainingVolume() |
String |
getSide() |
String |
getState() |
Integer |
getTradesCount() |
BigDecimal |
getVolume() |
toString
public Order(long id, String side, String ordType, BigDecimal price, BigDecimal avgPrice, String state, String market, Date createdAt, BigDecimal volume, BigDecimal remainingVolume, BigDecimal executedVolume, Integer tradesCount)
id
- unique order ID.side
- Buy/Sell.ordType
- the order type.price
- order price.avgPrice
- average execution price.state
- wait, done or cancel.
'wait' represents the order is active, it may be a new order or partial complete order;
'done' means the order has been fulfilled completely;
'cancel' means the order has been cancelled.market
- which market the order belongs to.createdAt
- order created time.volume
- volume to buy/sell.remainingVolume
- remaining volume is always less than or equal to volume.executedVolume
- volume = remaingVolume + executedVolume.tradesCount
- the number of executions.public long getId()
public String getSide()
public String getOrdType()
public BigDecimal getPrice()
public BigDecimal getAvgPrice()
public String getState()
public String getMarket()
public Date getCreatedAt()
public BigDecimal getVolume()
public BigDecimal getRemainingVolume()
public BigDecimal getExecutedVolume()
public Integer getTradesCount()
Copyright © 2015. All rights reserved.