|
|
|
@ -90,16 +90,13 @@ export class CurrentRateService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
promises.push(
|
|
|
|
|
this.marketDataService.getRange({
|
|
|
|
|
this.marketDataService
|
|
|
|
|
.getRange({
|
|
|
|
|
dateQuery,
|
|
|
|
|
symbols
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const marketData = flatten(await Promise.all(promises));
|
|
|
|
|
|
|
|
|
|
if (marketData) {
|
|
|
|
|
return marketData.map((marketDataItem) => {
|
|
|
|
|
.then((data) => {
|
|
|
|
|
return data.map((marketDataItem) => {
|
|
|
|
|
return {
|
|
|
|
|
date: marketDataItem.date,
|
|
|
|
|
symbol: marketDataItem.symbol,
|
|
|
|
@ -110,9 +107,10 @@ export class CurrentRateService {
|
|
|
|
|
)
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
throw new Error(`Values not found for symbols ${symbols.join(', ')}`);
|
|
|
|
|
return flatten(await Promise.all(promises));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private containsToday(dates: Date[]): boolean {
|
|
|
|
|