Show / Hide Table of Contents

Class OrderBaseExtensions

Set of extensions methods for implementing the fluent interface for the OrderBase inheritors.

Inheritance
System.Object
OrderBaseExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Alpaca.Markets
Assembly: Alpaca.Markets.dll
Syntax
public static class OrderBaseExtensions

Methods

| Improve this Doc View Source

WithClientOrderId<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 order object.

Type Parameters
Name Description
TOrder

Type of target order for altering.

| Improve this Doc View Source

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 order object.

Type Parameters
Name Description
TOrder

Type of target order for altering.

| Improve this Doc View Source

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 order object.

Type Parameters
Name Description
TOrder

Type of target order for altering.

| Improve this Doc View Source

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 order object.

Type Parameters
Name Description
TOrder

Type of target order for altering.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX