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
parent
commit
155bf67f60
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      CHANGELOG.md
  2. 2
      apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts

4
CHANGELOG.md

@ -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`)

2
apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts

@ -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', '');
}

Loading…
Cancel
Save