Constructor MarketOrderRequest
- Namespace
- WhalesSecret.TradeScriptLib.Entities.Orders
- Assembly
- WhalesSecret.TradeScriptLib.dll
MarketOrderRequest(string?, SymbolPair, OrderSide, decimal, bool)
Creates a new instance of the object.
public MarketOrderRequest(string? clientOrderId, SymbolPair symbolPair, OrderSide side, decimal size, bool sizeInBaseSymbol = true)
Parameters
clientOrderId
stringUnique client order ID, or
null
to let the system generate the ID.symbolPair
SymbolPairMarket on the exchange.
side
OrderSideWhether to buy or sell the base symbol.
size
decimalAmount to buy or sell. Size is by default specified in terms of the base symbol unless specified otherwise using
sizeInBaseSymbol
.sizeInBaseSymbol
booltrue
if the size is specified in terms of the base symbol,false
if the order size is specified in terms of the quote symbol.
Exceptions
- InvalidArgumentException
Thrown if
size
is not strictly positive number.