Browse Source
Feature/deactivate delisted asset profiles in FMP service (#6808)
* Deactivate delisted asset profiles
* Update changelog
pull/6860/head
Thomas Kaul
23 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
1 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/financial-modeling-prep/financial-modeling-prep.service.ts
|
|
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
|
### Changed |
|
|
### Changed |
|
|
|
|
|
|
|
|
|
|
|
- Deactivated asset profiles automatically on delisting in the _Financial Modeling Prep_ service |
|
|
- Migrated various components from `NgClass` to class bindings |
|
|
- Migrated various components from `NgClass` to class bindings |
|
|
- Refreshed the cryptocurrencies list |
|
|
- Refreshed the cryptocurrencies list |
|
|
- Improved the language localization for Spanish (`es`) |
|
|
- Improved the language localization for Spanish (`es`) |
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
import { CryptocurrencyService } from '@ghostfolio/api/services/cryptocurrency/cryptocurrency.service'; |
|
|
import { CryptocurrencyService } from '@ghostfolio/api/services/cryptocurrency/cryptocurrency.service'; |
|
|
|
|
|
import { AssetProfileDelistedError } from '@ghostfolio/api/services/data-provider/errors/asset-profile-delisted.error'; |
|
|
import { |
|
|
import { |
|
|
DataProviderInterface, |
|
|
DataProviderInterface, |
|
|
GetAssetProfileParams, |
|
|
GetAssetProfileParams, |
|
|
@ -122,7 +123,9 @@ export class FinancialModelingPrepService |
|
|
).then((res) => res.json()); |
|
|
).then((res) => res.json()); |
|
|
|
|
|
|
|
|
if (!assetProfile) { |
|
|
if (!assetProfile) { |
|
|
throw new Error(`${symbol} not found`); |
|
|
throw new AssetProfileDelistedError( |
|
|
|
|
|
`No data found, ${symbol} (${this.getName()}) may be delisted` |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const { assetClass, assetSubClass } = |
|
|
const { assetClass, assetSubClass } = |
|
|
|