Browse Source

Feature/Improve activities import by ISIN number (#3051)

* Improve activities import by ISIN number

* Update changelog
pull/3067/head^2
Søren Bjergmark 1 year ago
committed by GitHub
parent
commit
68e558f198
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 4
      apps/api/src/services/data-provider/data-enhancer/yahoo-finance/yahoo-finance.service.ts
  3. 12
      apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts

4
CHANGELOG.md

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
### Changed
- Improved the activities import by `isin` in the _Yahoo Finance_ service
### Fixed ### Fixed
- Fixed an issue with the exchange rate calculation of (wealth) items in accounts - Fixed an issue with the exchange rate calculation of (wealth) items in accounts

4
apps/api/src/services/data-provider/data-enhancer/yahoo-finance/yahoo-finance.service.ts

@ -196,7 +196,9 @@ export class YahooFinanceDataEnhancerService implements DataEnhancerInterface {
shortName: assetProfile.price.shortName, shortName: assetProfile.price.shortName,
symbol: assetProfile.price.symbol symbol: assetProfile.price.symbol
}); });
response.symbol = assetProfile.price.symbol; response.symbol = this.convertFromYahooFinanceSymbol(
assetProfile.price.symbol
);
if (assetSubClass === AssetSubClass.MUTUALFUND) { if (assetSubClass === AssetSubClass.MUTUALFUND) {
response.sectors = []; response.sectors = [];

12
apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts

@ -38,17 +38,7 @@ export class YahooFinanceService implements DataProviderInterface {
}: { }: {
symbol: string; symbol: string;
}): Promise<Partial<SymbolProfile>> { }): Promise<Partial<SymbolProfile>> {
const { assetClass, assetSubClass, currency, name } = return this.yahooFinanceDataEnhancerService.getAssetProfile(symbol);
await this.yahooFinanceDataEnhancerService.getAssetProfile(symbol);
return {
assetClass,
assetSubClass,
currency,
name,
symbol,
dataSource: this.getName()
};
} }
public getDataProviderInfo(): DataProviderInfo { public getDataProviderInfo(): DataProviderInfo {

Loading…
Cancel
Save