Modifier and Type | Class and Description |
---|---|
static class |
Trade.Builder |
Modifier and Type | Field and Description |
---|---|
protected CurrencyPair |
currencyPair
The currency pair
|
protected String |
id
The trade id
|
protected BigDecimal |
price
The price
|
protected Date |
timestamp
The timestamp of the trade according to the exchange's server, null if not provided
|
protected BigDecimal |
tradableAmount
Amount that was traded
|
protected Order.OrderType |
type
Did this trade result from the execution of a bid or a ask?
|
Constructor and Description |
---|
Trade(Order.OrderType type,
BigDecimal tradableAmount,
CurrencyPair currencyPair,
BigDecimal price,
Date timestamp,
String id)
This constructor is called to create a public Trade object in
PollingMarketDataService.getTrades(com.xeiam.xchange.currency.CurrencyPair, Object...)
implementations) since it's missing the orderId and fee parameters. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
CurrencyPair |
getCurrencyPair() |
String |
getId() |
BigDecimal |
getPrice() |
Date |
getTimestamp() |
BigDecimal |
getTradableAmount() |
Order.OrderType |
getType() |
int |
hashCode() |
String |
toString() |
protected final Order.OrderType type
protected final BigDecimal tradableAmount
protected final CurrencyPair currencyPair
protected final BigDecimal price
protected final Date timestamp
protected final String id
public Trade(Order.OrderType type, BigDecimal tradableAmount, CurrencyPair currencyPair, BigDecimal price, Date timestamp, String id)
PollingMarketDataService.getTrades(com.xeiam.xchange.currency.CurrencyPair, Object...)
implementations) since it's missing the orderId and fee parameters.type
- The trade type (BID side or ASK side)tradableAmount
- The depth of this tradetradableIdentifier
- The exchange identifier (e.g. "BTC/USD")transactionCurrency
- The transaction currency (e.g. USD in BTC/USD)price
- The price (either the bid or the ask)timestamp
- The timestamp of the trade according to the exchange's server, null if not providedid
- The id of the tradepublic Order.OrderType getType()
public BigDecimal getTradableAmount()
public CurrencyPair getCurrencyPair()
public BigDecimal getPrice()
public Date getTimestamp()
public String getId()
Copyright © 2012–2018 Xeiam, LLC. All rights reserved.