Skip to content

Releases: barchart/portfolio-api-common

v2.0.0

19 Nov 02:41
0513aad
Compare
Choose a tag to compare

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 and PositionGroup 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 the PositionContainer class (on quotes update).

v1.32.0

06 Oct 19:01
a66ea8b
Compare
Choose a tag to compare

New Features

  • Added support for the Swiss Franc.

v.131.1

02 Oct 22:17
c1429e4
Compare
Choose a tag to compare

Bug Fixes

  • Updated the InstrumentProvider class to return crypto tokens (a synthetic instrument).

v1.31.0

27 Sep 23:48
77df1d3
Compare
Choose a tag to compare

New Features

  • Added InstrumentType.CRYPTO to support crypto tokens (e.g. Bitcoin, Ethereum).

v1.30.0

30 Apr 13:09
79dc861
Compare
Choose a tag to compare

New Features

  • Updated the PositionGroup class to have basisPrice and unrealizedPrice fields formatted in GBP (when the instrument is traded in GBX).

v1.29.3

01 Mar 20:24
21341b1
Compare
Choose a tag to compare

Bug Fixes

  • Corrected failure to properly calculate percent change (since inception) for positions that were closed in previous years.

Technical Enhancements

  • Updated PositionSchema adding snapshot.initial as an optional field.

v1.29.2

26 Jan 11:39
Compare
Choose a tag to compare

Other

  • Updated the PositionContainer.getPositionSymbols function to have an additional argument for filtering expired symbols.

v1.29.1

05 Dec 14:39
3a531f1
Compare
Choose a tag to compare

Bug Fixes

  • Updated the InstrumentProvider to have the waitInMilliseconds argument.

v1.28.0

29 Nov 01:57
50e4b65
Compare
Choose a tag to compare

New Features

  • Updated the PositionContainer class, adding an expired 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

22 Nov 23:06
8a12118
Compare
Choose a tag to compare

Bug Fixes

  • Corrected potentially incorrect currency translation by preventing two Rate objects, which represent same currency pair, from existing in the PositionContainer (e.g. ^EURUSD and ^USDEUR).
  • Eliminated multiple unnecessary calls to the PositionGroup.setForexRates function.
  • Eliminated multiple unnecessary calls to the PositionGroup.refresh function.