Show / Hide Table of Contents

Class SimpleOrderBase

Encapsulates base data for ordinal order types, never used directly by any code.

Inheritance
System.Object
OrderBase
SimpleOrderBase
LimitOrder
MarketOrder
StopLimitOrder
StopOrder
TrailingStopOrder
Inherited Members
OrderBase.Symbol
OrderBase.Quantity
OrderBase.Side
OrderBase.Type
OrderBase.Duration
OrderBase.ClientOrderId
OrderBase.ExtendedHours
OrderBase.PositionIntent
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 abstract class SimpleOrderBase : OrderBase

Constructors

| Improve this Doc View Source

SimpleOrderBase(String, OrderQuantity, OrderSide, OrderType)

Creates new instance of the SimpleOrderBase class.

Declaration
protected SimpleOrderBase(String symbol, OrderQuantity quantity, OrderSide side, OrderType type)
Parameters
Type Name Description
String symbol

Alpaca symbol for order.

Alpaca.Markets.OrderQuantity quantity

Order quantity (absolute value).

OrderSide side

Order side (buy or sell).

OrderType type

Order type (market, limit, stop, stop-limit).

Methods

| Improve this Doc View Source

Bracket(Decimal, Decimal)

Creates a new instance of the BracketOrder order from the current order.

Declaration
public BracketOrder Bracket(Decimal takeProfitLimitPrice, Decimal stopLossStopPrice)
Parameters
Type Name Description
Decimal takeProfitLimitPrice

Take profit order limit price.

Decimal stopLossStopPrice

Stop loss order stop price.

Returns
Type Description
BracketOrder

New advanced order representing an original order plus pair of take profit and stop loss orders.

| Improve this Doc View Source

Bracket(Decimal, Decimal, Decimal)

Creates a new instance of the BracketOrder order from the current order.

Declaration
public BracketOrder Bracket(Decimal takeProfitLimitPrice, Decimal stopLossStopPrice, Decimal stopLossLimitPrice)
Parameters
Type Name Description
Decimal takeProfitLimitPrice

Take profit order limit price.

Decimal stopLossStopPrice

Stop loss order stop price.

Decimal stopLossLimitPrice

Stop loss order limit price.

Returns
Type Description
BracketOrder

New advanced order representing an original order plus pair of take profit and stop loss orders.

| Improve this Doc View Source

StopLoss(Decimal)

Creates a new instance of the StopLossOrder order from the current order.

Declaration
public StopLossOrder StopLoss(Decimal stopLossStopPrice)
Parameters
Type Name Description
Decimal stopLossStopPrice

Stop loss order stop price.

Returns
Type Description
StopLossOrder

New advanced order representing pair of original order and stop loss order.

| Improve this Doc View Source

StopLoss(Decimal, Decimal)

Creates a new instance of the StopLossOrder order from the current order.

Declaration
public StopLossOrder StopLoss(Decimal stopLossStopPrice, Decimal stopLossLimitPrice)
Parameters
Type Name Description
Decimal stopLossStopPrice

Stop loss order stop price.

Decimal stopLossLimitPrice

Stop loss order limit price.

Returns
Type Description
StopLossOrder

New advanced order representing pair of original order and stop loss order.

| Improve this Doc View Source

TakeProfit(Decimal)

Creates a new instance of the TakeProfitOrder order from the current order.

Declaration
public TakeProfitOrder TakeProfit(Decimal takeProfitLimitPrice)
Parameters
Type Name Description
Decimal takeProfitLimitPrice

Take profit order limit price.

Returns
Type Description
TakeProfitOrder

New advanced order representing pair of original order and take profit order.

Extension Methods

OrderBaseExtensions.WithDuration<TOrder>(TOrder, TimeInForce)
OrderBaseExtensions.WithClientOrderId<TOrder>(TOrder, String)
OrderBaseExtensions.WithExtendedHours<TOrder>(TOrder, Boolean)
OrderBaseExtensions.WithPositionIntent<TOrder>(TOrder, PositionIntent)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX