Releases: barchart/portfolio-api-common
Releases · barchart/portfolio-api-common
v2.0.0
Breaking Changes
- Changed the constructor of the
PositionGroup
class. - Removed the
PositionGroup.setForexRates
function. - Removed the
PositionContainer.getForexQuotes
function.
New Features
- Increased efficiency of currency translation mechanism (see the
PositionContainer
andPositionGroup
classes). - Added option to use Barchart formatting rules (with variable decimal places) for last price (see BAR2-2852).
Bug Fixes
- Changed formatting rules for open, high, low, and previous to use same logic as last price.
Technical Enhancements
- Updated AWS CodeBuild to use Node.js version 20.
- Updated the
@barchart/common-js
library. - Updated the
uuid
library to the next major version.
Other
- Removed duplicate invocation of
recalculatePercentages
in thePositionContainer
class (on quotes update).
v1.32.0
New Features
- Added support for the Swiss Franc.
v.131.1
Bug Fixes
- Updated the
InstrumentProvider
class to return crypto tokens (a synthetic instrument).
v1.31.0
New Features
- Added
InstrumentType.CRYPTO
to support crypto tokens (e.g. Bitcoin, Ethereum).
v1.30.0
New Features
- Updated the
PositionGroup
class to havebasisPrice
andunrealizedPrice
fields formatted inGBP
(when the instrument is traded inGBX
).
v1.29.3
Bug Fixes
- Corrected failure to properly calculate percent change (since inception) for positions that were closed in previous years.
Technical Enhancements
- Updated
PositionSchema
addingsnapshot.initial
as an optional field.
v1.29.2
Other
- Updated the
PositionContainer.getPositionSymbols
function to have an additional argument for filtering expired symbols.
v1.29.1
Bug Fixes
- Updated the
InstrumentProvider
to have thewaitInMilliseconds
argument.
v1.28.0
New Features
- Updated the
PositionContainer
class, adding anexpired
attribute (for single positions). - Updated the
PositionItem
class, marking expired options as worthless (resulting in total gains or losses of the premium).
v1.27.2
Bug Fixes
- Corrected potentially incorrect currency translation by preventing two
Rate
objects, which represent same currency pair, from existing in thePositionContainer
(e.g. ^EURUSD and ^USDEUR). - Eliminated multiple unnecessary calls to the
PositionGroup.setForexRates
function. - Eliminated multiple unnecessary calls to the
PositionGroup.refresh
function.