Class OrderBaseExtensions
Set of extensions methods for implementing the fluent interface for the OrderBase inheritors.
Inheritance
Inherited Members
Namespace: Alpaca.Markets
Assembly: Alpaca.Markets.dll
Syntax
public static class OrderBaseExtensions
Methods
| Improve this Doc View SourceWithClientOrderId<TOrder>(TOrder, String)
Sets the new value for the ClientOrderId property of the target order.
Declaration
public static TOrder WithClientOrderId<TOrder>(this TOrder order, String clientOrderId)
where TOrder : OrderBase
Parameters
Type | Name | Description |
---|---|---|
TOrder | order | Target order for changing ClientOrderId property. |
String | clientOrderId | The new ClientOrderId property value. |
Returns
Type | Description |
---|---|
TOrder | Fluent interface - returns the |
Type Parameters
Name | Description |
---|---|
TOrder | Type of target order for altering. |
WithDuration<TOrder>(TOrder, TimeInForce)
Sets the new value for the Duration property of the target order.
Declaration
public static TOrder WithDuration<TOrder>(this TOrder order, TimeInForce duration)
where TOrder : OrderBase
Parameters
Type | Name | Description |
---|---|---|
TOrder | order | Target order for changing Duration property. |
TimeInForce | duration | The new Duration property value. |
Returns
Type | Description |
---|---|
TOrder | Fluent interface - returns the |
Type Parameters
Name | Description |
---|---|
TOrder | Type of target order for altering. |
WithExtendedHours<TOrder>(TOrder, Boolean)
Sets the new value for the ExtendedHours property of the target order.
Declaration
public static TOrder WithExtendedHours<TOrder>(this TOrder order, Boolean extendedHours)
where TOrder : OrderBase
Parameters
Type | Name | Description |
---|---|---|
TOrder | order | Target order for changing ExtendedHours property. |
Boolean | extendedHours | The new ExtendedHours property value. |
Returns
Type | Description |
---|---|
TOrder | Fluent interface - returns the |
Type Parameters
Name | Description |
---|---|
TOrder | Type of target order for altering. |
WithPositionIntent<TOrder>(TOrder, PositionIntent)
Sets the new value for the PositionIntent property of the target order.
Declaration
public static TOrder WithPositionIntent<TOrder>(this TOrder order, PositionIntent positionIntent)
where TOrder : OrderBase
Parameters
Type | Name | Description |
---|---|---|
TOrder | order | Target order for changing PositionIntent property. |
PositionIntent | positionIntent | The new PositionIntent property value. |
Returns
Type | Description |
---|---|
TOrder | Fluent interface - returns the |
Type Parameters
Name | Description |
---|---|
TOrder | Type of target order for altering. |