|
@ -361,13 +361,13 @@ export class ExchangeRateDataService { |
|
|
const symbol = `${currencyFrom}${currencyTo}`; |
|
|
const symbol = `${currencyFrom}${currencyTo}`; |
|
|
|
|
|
|
|
|
const marketData = await this.marketDataService.getRange({ |
|
|
const marketData = await this.marketDataService.getRange({ |
|
|
dateQuery: { gte: startDate, lt: endDate }, |
|
|
assetProfileIdentifiers: [ |
|
|
uniqueAssets: [ |
|
|
|
|
|
{ |
|
|
{ |
|
|
dataSource, |
|
|
dataSource, |
|
|
symbol |
|
|
symbol |
|
|
} |
|
|
} |
|
|
] |
|
|
], |
|
|
|
|
|
dateQuery: { gte: startDate, lt: endDate } |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if (marketData?.length > 0) { |
|
|
if (marketData?.length > 0) { |
|
@ -392,13 +392,13 @@ export class ExchangeRateDataService { |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
const marketData = await this.marketDataService.getRange({ |
|
|
const marketData = await this.marketDataService.getRange({ |
|
|
dateQuery: { gte: startDate, lt: endDate }, |
|
|
assetProfileIdentifiers: [ |
|
|
uniqueAssets: [ |
|
|
|
|
|
{ |
|
|
{ |
|
|
dataSource, |
|
|
dataSource, |
|
|
symbol: `${DEFAULT_CURRENCY}${currencyFrom}` |
|
|
symbol: `${DEFAULT_CURRENCY}${currencyFrom}` |
|
|
} |
|
|
} |
|
|
] |
|
|
], |
|
|
|
|
|
dateQuery: { gte: startDate, lt: endDate } |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
for (const { date, marketPrice } of marketData) { |
|
|
for (const { date, marketPrice } of marketData) { |
|
@ -415,16 +415,16 @@ export class ExchangeRateDataService { |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
const marketData = await this.marketDataService.getRange({ |
|
|
const marketData = await this.marketDataService.getRange({ |
|
|
dateQuery: { |
|
|
assetProfileIdentifiers: [ |
|
|
gte: startDate, |
|
|
|
|
|
lt: endDate |
|
|
|
|
|
}, |
|
|
|
|
|
uniqueAssets: [ |
|
|
|
|
|
{ |
|
|
{ |
|
|
dataSource, |
|
|
dataSource, |
|
|
symbol: `${DEFAULT_CURRENCY}${currencyTo}` |
|
|
symbol: `${DEFAULT_CURRENCY}${currencyTo}` |
|
|
} |
|
|
} |
|
|
] |
|
|
], |
|
|
|
|
|
dateQuery: { |
|
|
|
|
|
gte: startDate, |
|
|
|
|
|
lt: endDate |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
for (const { date, marketPrice } of marketData) { |
|
|
for (const { date, marketPrice } of marketData) { |
|
|