Constructor OrderRequest
- Namespace
- WhalesSecret.TradeScriptLib.Entities
- Assembly
- WhalesSecret.TradeScriptLib.dll
OrderRequest(OrderType, string?, SymbolPair, OrderSide, decimal, bool)
Creates a new instance of the object.
protected OrderRequest(OrderType orderType, string? clientOrderId, SymbolPair symbolPair, OrderSide side, decimal size, bool sizeInBaseSymbol = true)
Parameters
orderType
OrderTypeOrder type.
clientOrderId
stringUnique client order ID. See ClientOrderId for details.
symbolPair
SymbolPairMarket on the exchange.
side
OrderSideWhether to buy or sell the base symbol.
size
decimalAmount of
symbolPair
base symbol to buy or sell.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:
clientOrderId
isnull
or it is not a string matching ValidClientOrderIdRegexString, orsize
is not strictly positive number.