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

Position

hallee edited this page May 13, 2020 · 2 revisions

Position

public struct Position: Codable, Hashable

Inheritance

Codable, Hashable

Properties

assetId

Asset ID.

let assetId: String

symbol

Symbol name of the asset.

let symbol: String

exchange

Exchange name of the asset.

let exchange: String

assetClass

Asset class name.

let assetClass: AssetClass

avgEntryPrice

Average entry price of the position.

let avgEntryPrice: Money

qty

The number of shares.

let qty: Quantity

side

let side: PositionSide

marketValue

Total dollar amount of the position.

let marketValue: Money

costBasis

Total cost basis in dollars.

let costBasis: Money

unrealizedPl

Unrealized profit/loss in dollars.

let unrealizedPl: Money

unrealizedPlpc

Unrealized profit/loss percent (by a factor of 1).

let unrealizedPlpc: String

unrealizedIntradayPl

Unrealized profit/loss in dollars for the day.

let unrealizedIntradayPl: Money

unrealizedIntradayPlpc

Unrealized profit/loss percent (by a factor of 1) for the day.

let unrealizedIntradayPlpc: String

currentPrice

Current asset price per share.

let currentPrice: Money

lastdayPrice

Last day’s asset price per share based on the closing value of the last trading day.

let lastdayPrice: Money

changeToday

Percent change from last day price (by a factor of 1).

let changeToday: String
Clone this wiki locally