diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts index 8850495cc..2725747aa 100644 --- a/apps/api/src/app/import/import.service.ts +++ b/apps/api/src/app/import/import.service.ts @@ -755,14 +755,15 @@ export class ImportService { continue; } - const assetProfile = { - currency, - ...( + let assetProfile: Partial = { currency }; + + try { + assetProfile = ( await this.dataProviderService.getAssetProfiles([ { dataSource, symbol } ]) - )?.[symbol] - }; + )?.[symbol]; + } catch {} if (!assetProfile?.name) { const assetProfileInImport = assetProfilesWithMarketDataDto?.find( @@ -799,11 +800,7 @@ export class ImportService { } } - if ( - (dataSource !== 'MANUAL' && type === 'BUY') || - type === 'DIVIDEND' || - type === 'SELL' - ) { + if (!['FEE', 'INTEREST', 'LIABILITY'].includes(type)) { if (!assetProfile?.name) { throw new Error( `activities.${index}.symbol ("${symbol}") is not valid for the specified data source ("${dataSource}")`