public class MarketOrder extends Order
A market order is a buy or sell order to be executed immediately at current market prices. As long as there are willing sellers and buyers, market orders are filled. Market orders are therefore used when certainty of execution is a priority over price of execution.
Use market orders with caution, and reviewLimitOrder
in case it is more suitable.Modifier and Type | Class and Description |
---|---|
static class |
MarketOrder.Builder |
Order.IOrderFlags, Order.OrderType
Constructor and Description |
---|
MarketOrder(Order.OrderType type,
BigDecimal tradableAmount,
CurrencyPair currencyPair) |
MarketOrder(Order.OrderType type,
BigDecimal tradableAmount,
CurrencyPair currencyPair,
Date timestamp) |
MarketOrder(Order.OrderType type,
BigDecimal tradableAmount,
CurrencyPair currencyPair,
String id,
Date timestamp) |
addOrderFlag, equals, getCurrencyPair, getId, getOrderFlags, getTimestamp, getTradableAmount, getType, hashCode, setOrderFlags, toString
public MarketOrder(Order.OrderType type, BigDecimal tradableAmount, CurrencyPair currencyPair, String id, Date timestamp)
type
- Either BID (buying) or ASK (selling)tradableAmount
- The amount to tradecurrencyPair
- The identifier (e.g. BTC/USD)id
- An id (usually provided by the exchange)timestamp
- the absolute time for this orderpublic MarketOrder(Order.OrderType type, BigDecimal tradableAmount, CurrencyPair currencyPair, Date timestamp)
type
- Either BID (buying) or ASK (selling)tradableAmount
- The amount to tradecurrencyPair
- The identifier (e.g. BTC/USD)timestamp
- the absolute time for this orderpublic MarketOrder(Order.OrderType type, BigDecimal tradableAmount, CurrencyPair currencyPair)
type
- Either BID (buying) or ASK (selling)tradableAmount
- The amount to tradecurrencyPair
- currencyPair The identifier (e.g. BTC/USD)Copyright © 2012–2016 Xeiam, LLC. All rights reserved.