Browse Source
Merge branch 'main' into feature/simplify-header
pull/1027/head
Thomas Kaul
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
19 additions and
0 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts
|
|
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
- Simplified the header |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed an issue with the currency inconsistency in the _Yahoo Finance_ service (convert from `ILA` to `ILS`) |
|
|
|
|
|
|
|
## 1.161.1 - 16.06.2022 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
@ -181,6 +181,9 @@ export class YahooFinanceService implements DataProviderInterface { |
|
|
|
if (symbol === 'USDGBp') { |
|
|
|
// Convert GPB to GBp (pence)
|
|
|
|
marketPrice = new Big(marketPrice).mul(100).toNumber(); |
|
|
|
} else if (symbol === 'USDILA') { |
|
|
|
// Convert ILS to ILA
|
|
|
|
marketPrice = new Big(marketPrice).mul(100).toNumber(); |
|
|
|
} |
|
|
|
|
|
|
|
response[symbol][format(historicalItem.date, DATE_FORMAT)] = { |
|
|
@ -243,6 +246,18 @@ export class YahooFinanceService implements DataProviderInterface { |
|
|
|
.mul(100) |
|
|
|
.toNumber() |
|
|
|
}; |
|
|
|
} else if ( |
|
|
|
symbol === 'USDILS' && |
|
|
|
yahooFinanceSymbols.includes('USDILA=X') |
|
|
|
) { |
|
|
|
// Convert ILS to ILA
|
|
|
|
response['USDILA'] = { |
|
|
|
...response[symbol], |
|
|
|
currency: 'ILA', |
|
|
|
marketPrice: new Big(response[symbol].marketPrice) |
|
|
|
.mul(100) |
|
|
|
.toNumber() |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|