|
|
|
@ -206,6 +206,9 @@ export class YahooFinanceService implements DataProviderInterface {
|
|
|
|
|
} else if (symbol === `${this.baseCurrency}ILA`) {
|
|
|
|
|
// Convert ILS to ILA
|
|
|
|
|
marketPrice = new Big(marketPrice).mul(100).toNumber();
|
|
|
|
|
} else if (symbol === `${this.baseCurrency}ZAc`) {
|
|
|
|
|
// Convert ZAR to ZAc (cents)
|
|
|
|
|
marketPrice = new Big(marketPrice).mul(100).toNumber();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response[symbol][format(historicalItem.date, DATE_FORMAT)] = {
|
|
|
|
@ -287,6 +290,18 @@ export class YahooFinanceService implements DataProviderInterface {
|
|
|
|
|
.mul(100)
|
|
|
|
|
.toNumber()
|
|
|
|
|
};
|
|
|
|
|
} else if (
|
|
|
|
|
symbol === `${this.baseCurrency}ZAR` &&
|
|
|
|
|
yahooFinanceSymbols.includes(`${this.baseCurrency}ZAc=X`)
|
|
|
|
|
) {
|
|
|
|
|
// Convert ZAR to ZAc (cents)
|
|
|
|
|
response[`${this.baseCurrency}ZAc`] = {
|
|
|
|
|
...response[symbol],
|
|
|
|
|
currency: 'ZAc',
|
|
|
|
|
marketPrice: new Big(response[symbol].marketPrice)
|
|
|
|
|
.mul(100)
|
|
|
|
|
.toNumber()
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|