|
|
@ -191,7 +191,9 @@ export class EodHistoricalDataService implements DataProviderInterface { |
|
|
|
})?.currency; |
|
|
|
|
|
|
|
result[this.convertFromEodSymbol(code)] = { |
|
|
|
currency: currency ?? DEFAULT_CURRENCY, |
|
|
|
currency: |
|
|
|
currency ?? |
|
|
|
this.convertFromEodSymbol(code)?.replace(DEFAULT_CURRENCY, ''), |
|
|
|
dataSource: DataSource.EOD_HISTORICAL_DATA, |
|
|
|
marketPrice: close, |
|
|
|
marketState: isToday(new Date(timestamp * 1000)) ? 'open' : 'closed' |
|
|
@ -205,7 +207,7 @@ export class EodHistoricalDataService implements DataProviderInterface { |
|
|
|
if (response[`${DEFAULT_CURRENCY}GBP`]) { |
|
|
|
response[`${DEFAULT_CURRENCY}GBp`] = { |
|
|
|
...response[`${DEFAULT_CURRENCY}GBP`], |
|
|
|
currency: `${DEFAULT_CURRENCY}GBp`, |
|
|
|
currency: 'GBp', |
|
|
|
marketPrice: this.getConvertedValue({ |
|
|
|
symbol: `${DEFAULT_CURRENCY}GBp`, |
|
|
|
value: response[`${DEFAULT_CURRENCY}GBP`].marketPrice |
|
|
@ -216,7 +218,7 @@ export class EodHistoricalDataService implements DataProviderInterface { |
|
|
|
if (response[`${DEFAULT_CURRENCY}ILS`]) { |
|
|
|
response[`${DEFAULT_CURRENCY}ILA`] = { |
|
|
|
...response[`${DEFAULT_CURRENCY}ILS`], |
|
|
|
currency: `${DEFAULT_CURRENCY}ILA`, |
|
|
|
currency: 'ILA', |
|
|
|
marketPrice: this.getConvertedValue({ |
|
|
|
symbol: `${DEFAULT_CURRENCY}ILA`, |
|
|
|
value: response[`${DEFAULT_CURRENCY}ILS`].marketPrice |
|
|
@ -224,6 +226,15 @@ export class EodHistoricalDataService implements DataProviderInterface { |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
if (response[`${DEFAULT_CURRENCY}USX`]) { |
|
|
|
response[`${DEFAULT_CURRENCY}USX`] = { |
|
|
|
currency: 'USX', |
|
|
|
dataSource: this.getName(), |
|
|
|
marketPrice: new Big(1).mul(100).toNumber(), |
|
|
|
marketState: 'open' |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
return response; |
|
|
|
} catch (error) { |
|
|
|
let message = error; |
|
|
|