Constructor TakeProfitLimitOrderRequest
- Namespace
- WhalesSecret.TradeScriptLib.Entities.Orders
- Assembly
- WhalesSecret.TradeScriptLib.dll
TakeProfitLimitOrderRequest(string?, SymbolPair, OrderSide, decimal, decimal, decimal, TimeInForce)
Creates a new instance of the object.
public TakeProfitLimitOrderRequest(string? clientOrderId, SymbolPair symbolPair, OrderSide side, decimal thresholdPrice, decimal price, decimal size, TimeInForce timeInForce = TimeInForce.GoodTillCancel)
Parameters
clientOrderId
stringUnique client order ID, or
null
to let the system generate the ID.symbolPair
SymbolPairMarket on the exchange.
side
OrderSideSpecification whether order should buy or sell the asset. Buy take-profit-limit order is specified using Buy value.
thresholdPrice
decimalWhen SymbolPair exchange market reaches the price, the take-profit-limit order becomes Limit order with price set to
price
.price
decimalPrice for the order once it becomes Limit order.
size
decimalAmount of
symbolPair
base symbol to buy or sell.timeInForce
TimeInForceSpecifies how long an order is supposed to be active.
Remarks
Suppose you bought 1 BTC @ $14,000 and suppose that Bitcoin is trading at 13,500 USD/BTC at the moment. Now suppose you request to place a new sell take-profit-limit order on an exchange with the following parameters:
thresholdPrice
equal to 13,000 USD/BTC, andprice
is lower than 14,000 USD/BTC.
You need to consult an exchange API documentation or contact their support to make sure you understand order processing correctly.
Exceptions
- InvalidArgumentException
Thrown if:
size
is not strictly positive number, orprice
is not strictly positive number, orthresholdPrice
is not strictly positive number.