Browse Source
Bugfix/fix symbol conversion from yahoo finance with hyphen (#549)
* Fix symbol conversion from Yahoo Finance
* Update changelog
pull/550/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
5 additions and
1 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts
|
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
## Unreleased |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed the symbol conversion from _Yahoo Finance_ including a hyphen |
|
|
|
|
|
|
|
### Todo |
|
|
|
|
|
|
|
- Apply data migration (`yarn database:migrate`) |
|
|
|
|
|
@ -240,7 +240,7 @@ export class YahooFinanceService implements DataProviderInterface { |
|
|
|
} |
|
|
|
|
|
|
|
private convertFromYahooFinanceSymbol(aYahooFinanceSymbol: string) { |
|
|
|
const symbol = aYahooFinanceSymbol.replace('-', ''); |
|
|
|
const symbol = aYahooFinanceSymbol.replace('-USD', 'USD'); |
|
|
|
return symbol.replace('=X', ''); |
|
|
|
} |
|
|
|
|
|
|
|