Class OrderRequestBuilder<TOrderRequest>
- Namespace
- WhalesSecret.TradeScriptLib.Utils.Orders
- Assembly
- WhalesSecret.TradeScriptLib.dll
Convenience builder for order requests.
public class OrderRequestBuilder<TOrderRequest> where TOrderRequest : OrderRequest
Type Parameters
TOrderRequest
Type of order request to build.
- Inheritance
-
OrderRequestBuilder<TOrderRequest>
- Inherited Members
- Extension Methods
Remarks
This class is NOT thread-safe.
Constructors
- OrderRequestBuilder(ExchangeInfo)
Creates a new instance of the object.
Methods
- Build()
Builds an order entity from builder parameters.
- ConvertTo<TOtherOrderRequest>()
Converts current order builder to OrderRequestBuilder<TOrderRequest>.
- IsBelowMinSize(decimal)
Using the current state of the builder, checks the input size against the minimum allowed size by the exchange.
- SetClientOrderId(string)
Sets client order ID.
- SetMaker(bool)
Sets flag denoting whether the order is restricted, once placed, to remove liquidity from the exchange market.
- SetPrice(decimal)
Sets limit price.
- SetRequiredParameters(SymbolPair, OrderSide, decimal)
Sets common order parameters that are required by all order types.
- SetSide(OrderSide)
Sets order side.
- SetSize(decimal)
Sets order size.
- SetSizeInBaseSymbol(bool)
Sets if order size is specified in terms of order's base symbol or quote symbol.
- SetSymbolPair(SymbolPair)
Sets symbol pair.
- SetThresholdPrice(decimal)
Sets threshold price.
- SetTimeInForce(TimeInForce)
Sets time-in-force value.