Class OrderSideExtensions
Set of extensions methods for creating the OrderBase inheritors.
Inheritance
Inherited Members
Namespace: Alpaca.Markets
Assembly: Alpaca.Markets.dll
Syntax
public static class OrderSideExtensions
Methods
| Improve this Doc View SourceLimit(OrderSide, String, OrderQuantity, Decimal)
Creates new limit order using specified side, symbol, quantity, and limit price.
Declaration
public static LimitOrder Limit(this OrderSide orderSide, String symbol, OrderQuantity quantity, Decimal limitPrice)
Parameters
Type | Name | Description |
---|---|---|
OrderSide | orderSide | Order side (buy or sell). |
String | symbol | Order asset symbol. |
Alpaca.Markets.OrderQuantity | quantity | Order quantity. |
Decimal | limitPrice | Order limit price. |
Returns
Type | Description |
---|---|
LimitOrder | The new LimitOrder object instance. |
Market(OrderSide, String, OrderQuantity)
Creates new market order using specified side, symbol, and quantity.
Declaration
public static MarketOrder Market(this OrderSide orderSide, String symbol, OrderQuantity quantity)
Parameters
Type | Name | Description |
---|---|---|
OrderSide | orderSide | Order side (buy or sell). |
String | symbol | Order asset symbol. |
Alpaca.Markets.OrderQuantity | quantity | Order quantity. |
Returns
Type | Description |
---|---|
MarketOrder | The new MarketOrder object instance. |
Stop(OrderSide, String, OrderQuantity, Decimal)
Creates new stop order using specified side, symbol, quantity, and stop price.
Declaration
public static StopOrder Stop(this OrderSide orderSide, String symbol, OrderQuantity quantity, Decimal stopPrice)
Parameters
Type | Name | Description |
---|---|---|
OrderSide | orderSide | Order side (buy or sell). |
String | symbol | Order asset symbol. |
Alpaca.Markets.OrderQuantity | quantity | Order quantity. |
Decimal | stopPrice | Order stop price. |
Returns
Type | Description |
---|---|
StopOrder | The new StopOrder object instance. |
StopLimit(OrderSide, String, OrderQuantity, Decimal, Decimal)
Creates new limit order using specified side, symbol, quantity, stop, and limit prices.
Declaration
public static StopLimitOrder StopLimit(this OrderSide orderSide, String symbol, OrderQuantity quantity, Decimal stopPrice, Decimal limitPrice)
Parameters
Type | Name | Description |
---|---|---|
OrderSide | orderSide | Order side (buy or sell). |
String | symbol | Order asset symbol. |
Alpaca.Markets.OrderQuantity | quantity | Order quantity. |
Decimal | stopPrice | Order stop price. |
Decimal | limitPrice | Order limit price. |
Returns
Type | Description |
---|---|
StopLimitOrder | The new StopLimitOrder object instance. |
TrailingStop(OrderSide, String, OrderQuantity, TrailOffset)
Creates new trailing stop order using specified side, symbol, quantity, and trail offset.
Declaration
public static TrailingStopOrder TrailingStop(this OrderSide orderSide, String symbol, OrderQuantity quantity, TrailOffset trailOffset)
Parameters
Type | Name | Description |
---|---|---|
OrderSide | orderSide | Order side (buy or sell). |
String | symbol | Order asset symbol. |
Alpaca.Markets.OrderQuantity | quantity | Order quantity. |
Alpaca.Markets.TrailOffset | trailOffset | Order trail offset. |
Returns
Type | Description |
---|---|
TrailingStopOrder | The new TrailingStopOrder object instance. |