Skip to content
This repository was archived by the owner on Jan 17, 2024. It is now read-only.

OrderRequest

hallee edited this page May 10, 2020 · 1 revision

OrderRequest

public struct OrderRequest: Codable, Hashable

Inheritance

Codable, Hashable

Initializers

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)

Properties

symbol

Symbol or asset ID to identify the asset to trade.

var symbol: String

qty

Number of shares to trade.

var qty: Quantity

side

var side: OrderSide

type

var type: OrderType

timeInForce

var timeInForce: TimeInForce

limitPrice

Required if type is limit or stopLimit

var limitPrice: Money?

stopPrice

Required if type is stop or stopLimit

var stopPrice: Money?

extendedHours

If true, order will be eligible to execute in premarket/afterhours.

var extendedHours

Only works with type limit and time in force day.

clientOrderID

A unique identifier for the order. Automatically generated if not sent. 48 characters or less.

var clientOrderID: String?

orderClass

var orderClass: OrderClass?

takeProfit

var takeProfit: TakeProfit?

stopLoss

var stopLoss: StopLoss?
Clone this wiki locally