Feature/increase historical market data gathering to 10 years (#1830)

* Increase historical market data gathering of currency pairs to 10+ years

* Update changelog
pull/1828/head^2
Thomas Kaul 2 years ago committed by GitHub
parent 9d6bb325cd
commit 9bce57894e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Improved the activities import for `csv` files exported by _Interactive Brokers_ - Improved the activities import for `csv` files exported by _Interactive Brokers_
- Increased the historical market data gathering of currency pairs to 10+ years
- Improved the content of the Frequently Asked Questions (FAQ) page - Improved the content of the Frequently Asked Questions (FAQ) page
- Improved the content of the pricing page - Improved the content of the pricing page
- Changed the `auth` endpoint of the login with _Security Token_ from `GET` to `POST` - Changed the `auth` endpoint of the login with _Security Token_ from `GET` to `POST`

@ -100,6 +100,7 @@ export class AdminService {
dataSource, dataSource,
marketDataItemCount, marketDataItemCount,
symbol, symbol,
assetClass: 'CASH',
countriesCount: 0, countriesCount: 0,
sectorsCount: 0 sectorsCount: 0
}; };
@ -186,8 +187,11 @@ export class AdminService {
]); ]);
return { return {
assetProfile, marketData,
marketData assetProfile: assetProfile ?? {
symbol,
currency: '-'
}
}; };
} }

@ -11,7 +11,7 @@ import { InjectQueue } from '@nestjs/bull';
import { Inject, Injectable, Logger } from '@nestjs/common'; import { Inject, Injectable, Logger } from '@nestjs/common';
import { DataSource } from '@prisma/client'; import { DataSource } from '@prisma/client';
import { JobOptions, Queue } from 'bull'; import { JobOptions, Queue } from 'bull';
import { format, subDays } from 'date-fns'; import { format, min, subDays, subYears } from 'date-fns';
import { DataProviderService } from './data-provider/data-provider.service'; import { DataProviderService } from './data-provider/data-provider.service';
import { DataEnhancerInterface } from './data-provider/interfaces/data-enhancer.interface'; import { DataEnhancerInterface } from './data-provider/interfaces/data-enhancer.interface';
@ -236,7 +236,7 @@ export class DataGatheringService {
return { return {
dataSource, dataSource,
symbol, symbol,
date: startDate date: min([startDate, subYears(new Date(), 10)])
}; };
}); });

@ -14,6 +14,7 @@ import {
import { UpdateAssetProfileDto } from '@ghostfolio/api/app/admin/update-asset-profile.dto'; import { UpdateAssetProfileDto } from '@ghostfolio/api/app/admin/update-asset-profile.dto';
import { AdminService } from '@ghostfolio/client/services/admin.service'; import { AdminService } from '@ghostfolio/client/services/admin.service';
import { import {
AdminMarketDataDetails,
EnhancedSymbolProfile, EnhancedSymbolProfile,
UniqueAsset UniqueAsset
} from '@ghostfolio/common/interfaces'; } from '@ghostfolio/common/interfaces';
@ -33,7 +34,7 @@ import { AssetProfileDialogParams } from './interfaces/interfaces';
}) })
export class AssetProfileDialog implements OnDestroy, OnInit { export class AssetProfileDialog implements OnDestroy, OnInit {
public assetClass: string; public assetClass: string;
public assetProfile: EnhancedSymbolProfile; public assetProfile: AdminMarketDataDetails['assetProfile'];
public assetProfileForm = this.formBuilder.group({ public assetProfileForm = this.formBuilder.group({
comment: '', comment: '',
symbolMapping: '' symbolMapping: ''

@ -3,6 +3,6 @@ import { MarketData } from '@prisma/client';
import { EnhancedSymbolProfile } from './enhanced-symbol-profile.interface'; import { EnhancedSymbolProfile } from './enhanced-symbol-profile.interface';
export interface AdminMarketDataDetails { export interface AdminMarketDataDetails {
assetProfile: EnhancedSymbolProfile; assetProfile: Partial<EnhancedSymbolProfile>;
marketData: MarketData[]; marketData: MarketData[];
} }

Loading…
Cancel
Save