PortfolioPosition class

DegiroApi class to store portfolio position infos

Annotations
  • @freezed

Constructors

PortfolioPosition({required String id, ProductInfo? productInfo, @Default('') String positionType, @Default(0) int size, @Default(0) double price, @Default(0) double value, @Default(0) double plBase, @Default(0) double todayPlBase, @Default(0) double breakEvenPrice, @Default(0) double realizedProductPl, @Default(0) double todayRealizedProductPl})
const
factory
PortfolioPosition.fromJson(Map<String, Object?> json)
factory

Properties

breakEvenPrice double
no setterinherited
copyWith → $PortfolioPositionCopyWith<PortfolioPosition>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Id of the portfolio position (NOT of the product)
no setterinherited
isOpen bool
Identify an open position
no setter
latestValue double
Latest position value calculated by the package using the product close price.
no setter
plBase double
Total P/L offset value (you don't see this value on Degiro UI) Used to calculate the totalPl property.
no setterinherited
positionType String
Can be 'PRODUCT' or 'CASH'
no setterinherited
price double
Yesterday price or the last price recorded not today.
no setterinherited
productInfo ProductInfo?
no setterinherited
realizedProductPl double
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
The current owned quantity of the product.
no setterinherited
todayPl double
The 'P/L' value you see on the portfolio position of Degiro UI.
no setter
todayPlBase double
Today P/L offset value (you don't see this value on Degiro UI) Used to calculate the todayPl property.
no setterinherited
todayRealizedProductPl double
no setterinherited
totalPl double
The 'Total P/L' value you see on the portfolio position of Degiro UI.
no setter
unrealizedPl double
The 'Unrealised P/L' value you see on the portfolio position of Degiro UI.
no setter
value double
The pre computed by Degiro APIs yesterday value of the position:
value = price * size.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited