Browse Source

Minor improvements

pull/3051/head
Thomas Kaul 2 years ago
parent
commit
8b08a1bf2b
  1. 8
      apps/api/src/services/data-provider/data-enhancer/yahoo-finance/yahoo-finance.service.ts
  2. 2
      apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts
  3. 3
      test/import/ok-btc.csv
  4. 3
      test/import/ok-isin.csv

8
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,
symbol: assetProfile.price.symbol
});
response.symbol = assetProfile.price.symbol;
response.symbol = this.convertFromYahooFinanceSymbol(
assetProfile.price.symbol
);
if (assetSubClass === AssetSubClass.MUTUALFUND) {
response.sectors = [];
@ -230,10 +232,6 @@ export class YahooFinanceDataEnhancerService implements DataEnhancerInterface {
}
}
response.symbol = this.convertFromYahooFinanceSymbol(
assetProfile.price.symbol
);
const url = assetProfile.summaryProfile?.website;
if (url) {
response.url = url;

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

@ -38,7 +38,7 @@ export class YahooFinanceService implements DataProviderInterface {
}: {
symbol: string;
}): Promise<Partial<SymbolProfile>> {
return await this.yahooFinanceDataEnhancerService.getAssetProfile(symbol);
return this.yahooFinanceDataEnhancerService.getAssetProfile(symbol);
}
public getDataProviderInfo(): DataProviderInfo {

3
test/import/ok-btc.csv

@ -1,3 +0,0 @@
Date,DataSource,Code,Currency,Price,Quantity,Action,Fee
12/12/2021,YAHOO,BTCUSD,USD,44558.42,1,buy,0
12/12/2021,YAHOO,BTC-USD,USD,44558.42,1,buy,0
1 Date DataSource Code Currency Price Quantity Action Fee
2 12/12/2021 YAHOO BTCUSD USD 44558.42 1 buy 0
3 12/12/2021 YAHOO BTC-USD USD 44558.42 1 buy 0

3
test/import/ok-isin.csv

@ -1,3 +0,0 @@
Date,Action,DataSource,Code,Quantity,unitPrice,Fee,Currency
2024-02-25,buy,YAHOO,DK0060442556,5,275.10,0,DKK
2024-02-25,buy,YAHOO,SPIC25KL.CO,5,275.10,0,DKK
1 Date Action DataSource Code Quantity unitPrice Fee Currency
2 2024-02-25 buy YAHOO DK0060442556 5 275.10 0 DKK
3 2024-02-25 buy YAHOO SPIC25KL.CO 5 275.10 0 DKK
Loading…
Cancel
Save