diff --git a/CHANGELOG.md b/CHANGELOG.md index bc3e536b6f..e22e54a2b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + +- Added a periodic refresh of the numbers on the home, analysis and accounts pages while the page is visible, briefly coloring changed values green or red, moving the chart of the home page without redrawing it, with a live indicator in the header + +### Changed + +- Colored the changes of the performance of a holding in green or red only while its market is open (in gray while it is closed), colored the whole change and performance of the portfolio in green or red, and highlighted a change in percent together with its absolute change +- Highlighted the tiles of the holdings chart whose value changed on a refresh and faded the tiles of the holdings whose market is closed + ## 3.100.0 - 2026-11-15 ### Changed diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 8cb3ce9f1f..8a68725bd9 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -680,9 +680,24 @@ export class PortfolioService { }; }); - const symbolProfiles = await this.symbolProfileService.getSymbolProfiles( - assetProfileIdentifiers - ); + const [symbolProfiles, quotes] = await Promise.all([ + this.symbolProfileService.getSymbolProfiles(assetProfileIdentifiers), + // The quotes are cached, they only provide the state of the markets + this.dataProviderService + .getQuotes({ + items: positions + .filter(({ quantity }) => { + return !quantity.eq(0); + }) + .map(({ dataSource, symbol }) => { + return { dataSource, symbol }; + }), + subscriptionType: user.subscription?.type + }) + .catch(() => { + return {} as Awaited>; + }) + ]); const cashSymbolProfiles = this.getCashSymbolProfiles(cashDetails); symbolProfiles.push(...cashSymbolProfiles); @@ -765,6 +780,9 @@ export class PortfolioService { markets, marketsAdvanced, marketPrice, + marketState: + quotes[getAssetProfileIdentifier({ dataSource, symbol })] + ?.marketState, tags, allocationInPercentage: filteredValueInBaseCurrency.eq(0) ? 0 diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html index 0d35d7e23a..957ea21654 100644 --- a/apps/client/src/app/components/header/header.component.html +++ b/apps/client/src/app/components/header/header.component.html @@ -12,6 +12,7 @@ +