Method ConvertTo
- Namespace
- WhalesSecret.TradeScriptLib.Utils.Orders
- Assembly
- WhalesSecret.TradeScriptLib.dll
ConvertTo<TOtherOrderRequest>()
Converts current order builder to OrderRequestBuilder<TOrderRequest>.
public OrderRequestBuilder<TOtherOrderRequest> ConvertTo<TOtherOrderRequest>() where TOtherOrderRequest : OrderRequest
Returns
- OrderRequestBuilder<TOtherOrderRequest>
New OrderRequestBuilder<TOrderRequest> instance.
Type Parameters
TOtherOrderRequest
Type of the order request to convert the current order request builder to.
Remarks
SymbolPair, OrderSide and order size are cloned. Client order ID is not copied by design.
Exceptions
- InvalidStateException
Thrown if:
- SetSizeInBaseSymbol(bool) with
true
value was called on the original builder but the target order request does not support the value, or - unsupported conversion type is requested.
- SetSizeInBaseSymbol(bool) with