This repository has been 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
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: Hashable
Alpaca 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) throws
public init?<T>(exactly source: T) where T: BinaryInteger
var value: Int
var description: String
var debugDescription: String
var magnitude: Quantity
public func encode(to encoder: Encoder) throws
public static func <(lhs: Quantity, rhs: Quantity) -> Bool
public static func +(lhs: Quantity, rhs: Quantity) -> Quantity
public static func -(lhs: Quantity, rhs: Quantity) -> Quantity
public static func *(lhs: Quantity, rhs: Quantity) -> Quantity
public static func /(lhs: Quantity, rhs: Quantity) -> Quantity
public static func *=(lhs: inout Quantity, rhs: Quantity)
public static func /=(lhs: inout Quantity, rhs: Quantity)
public static func %(lhs: inout Quantity, rhs: Quantity) -> Quantity
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