This repository was archived by the owner on Jan 17, 2024. It is now read-only.
generated from pixel-foundry/swift-package
-
Notifications
You must be signed in to change notification settings - Fork 4
OrderRequest
hallee edited this page May 10, 2020
·
1 revision
public struct OrderRequest: Codable, Hashable
Codable
, Hashable
init(symbol:qty:side:type:timeInForce:limitPrice:stopPrice:extendedHours:clientOrderID:orderClass:takeProfit:stopLoss:)
public init(symbol: String, qty: Quantity, side: OrderSide, type: OrderType, timeInForce: TimeInForce, limitPrice: Money? = nil, stopPrice: Money? = nil, extendedHours: Bool = false, clientOrderID: String? = nil, orderClass: OrderClass? = nil, takeProfit: TakeProfit? = nil, stopLoss: StopLoss? = nil)
Symbol or asset ID to identify the asset to trade.
var symbol: String
Number of shares to trade.
var qty: Quantity
var side: OrderSide
var type: OrderType
var timeInForce: TimeInForce
Required if type is limit
or stopLimit
var limitPrice: Money?
Required if type is stop
or stopLimit
var stopPrice: Money?
If true, order will be eligible to execute in premarket/afterhours.
var extendedHours
Only works with type limit
and time in force day
.
A unique identifier for the order. Automatically generated if not sent. 48 characters or less.
var clientOrderID: String?
var orderClass: OrderClass?
var takeProfit: TakeProfit?
var stopLoss: StopLoss?
Generated at 2020-05-22T00:57:11+0000 using swift-doc 1.0.0-beta.3.
Types
- Account
- AccountStatus
- Alpaca
- Alpaca.Key
- Alpaca.Mode
- Alpaca.Version
- AlpacaAPI
- AlpacaAPI.Path
- AlpacaError
- Asset
- Asset.QueryParameters
- AssetClass
- AssetStatus
- Calendar
- Calendar.QueryParameters
- Cancel
- Clock
- Currency
- Direction
- Exchange
- Money
- Order
- Order.QueryParameters
- OrderCancellation
- OrderClass
- OrderRequest
- OrderSide
- OrderStatus
- OrderStatusFilter
- OrderType
- Position
- PositionLiquidation
- PositionSide
- Quantity
- StopLoss
- TakeProfit
- TimeInForce