Table of Contents

Constructor StopLimitOrderRequest

Namespace
WhalesSecret.TradeScriptLib.Entities.Orders
Assembly
WhalesSecret.TradeScriptLib.dll

StopLimitOrderRequest(string?, SymbolPair, OrderSide, decimal, decimal, decimal, TimeInForce)

Creates a new instance of the object.

public StopLimitOrderRequest(string? clientOrderId, SymbolPair symbolPair, OrderSide side, decimal thresholdPrice, decimal price, decimal size, TimeInForce timeInForce = TimeInForce.GoodTillCancel)

Parameters

clientOrderId string

Unique client order ID, or null to let the system generate the ID.

symbolPair SymbolPair

Market on the exchange.

side OrderSide

Specification whether order should buy or sell the asset. Buy stop-limit order is specified using Buy value.

thresholdPrice decimal

When SymbolPair exchange market reaches the price, the stop-limit order becomes Limit order with price set to price.

price decimal

Price for the order once it becomes Limit order.

size decimal

Amount of symbolPair base symbol to buy or sell.

timeInForce TimeInForce

Specifies how long an order is supposed to be active.

Remarks

Suppose you bought 1 BTC @ $14,000 and suppose that Bitcoin is trading at 15,500 USD/BTC at the moment. Now suppose you request to place a new sell stop-limit order on an exchange with the following parameters:

  • thresholdPrice equal to 15,000 USD/BTC, and
  • price is larger than 14,000 USD/BTC.
In this case, it is possible that you may get an error from the exchange because the new order parameters fits TakeProfitLimit rather than StopLimit parameters. The behavior is unfortunately exchange-specific.

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, or
  • price is not strictly positive number, or
  • thresholdPrice is not strictly positive number.