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 3
Quantity
hallee edited this page May 10, 2020
·
1 revision
Quantity is a type wrapper for integers that interfaces more cleanly with Alpaca’s API.
public struct Quantity: HashableAlpaca sometimes returns strings and sometimes numbers for quantity values. This type properly decodes from JSON in either case.
AdditiveArithmetic, Codable, Comparable, CustomDebugStringConvertible, CustomStringConvertible, ExpressibleByIntegerLiteral, Hashable, Numeric
init(_ value: Int)public init(integerLiteral value: Int)public init(from decoder: Decoder) throwspublic init?<T>(exactly source: T) where T: BinaryIntegervar value: Intvar description: Stringvar debugDescription: Stringvar magnitude: Quantitypublic func encode(to encoder: Encoder) throwspublic static func <(lhs: Quantity, rhs: Quantity) -> Boolpublic static func +(lhs: Quantity, rhs: Quantity) -> Quantitypublic static func -(lhs: Quantity, rhs: Quantity) -> Quantitypublic static func *(lhs: Quantity, rhs: Quantity) -> Quantitypublic static func /(lhs: Quantity, rhs: Quantity) -> Quantitypublic static func *=(lhs: inout Quantity, rhs: Quantity)public static func /=(lhs: inout Quantity, rhs: Quantity)public static func %(lhs: inout Quantity, rhs: Quantity) -> QuantityGenerated 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