|
|
@ -47,7 +47,7 @@ import { |
|
|
isSameDay, |
|
|
isSameDay, |
|
|
parseISO |
|
|
parseISO |
|
|
} from 'date-fns'; |
|
|
} from 'date-fns'; |
|
|
import { uniqBy } from 'lodash'; |
|
|
import { isArray, uniqBy } from 'lodash'; |
|
|
|
|
|
|
|
|
@Injectable() |
|
|
@Injectable() |
|
|
export class FinancialModelingPrepService |
|
|
export class FinancialModelingPrepService |
|
|
@ -440,10 +440,14 @@ export class FinancialModelingPrepService |
|
|
signal: AbortSignal.timeout(requestTimeout) |
|
|
signal: AbortSignal.timeout(requestTimeout) |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
.then( |
|
|
.then(async (res) => { |
|
|
(res) => |
|
|
const json = (await res.json()) as unknown as { |
|
|
res.json() as unknown as { price: number; symbol: string }[] |
|
|
price: number; |
|
|
) |
|
|
symbol: string; |
|
|
|
|
|
}[]; |
|
|
|
|
|
|
|
|
|
|
|
return isArray(json) ? json : []; |
|
|
|
|
|
}) |
|
|
]); |
|
|
]); |
|
|
|
|
|
|
|
|
for (const { currency, symbolTarget } of assetProfileResolutions) { |
|
|
for (const { currency, symbolTarget } of assetProfileResolutions) { |
|
|
|