ghostfolio / ghostfolio/ghostfolio
[FEATURE] Decide "currency" value based on suffix country vaule in Yahoo Finance
- Dominant language
- TypeScript
- Stars
- 9.3k
- Forks
- 1.3k
- Avg merge
- 22h 5m
- Merged PRs (30d)
- 172
Description
I see many stock data in Vietnam did not show in the Asset lookup, it's because Yahoo did not have "**currency**" in the search response.
Example of stock "FPT"
```{
"exchange": "VSE",
"shortname": "FPT CORPORATION",
"quoteType": "EQUITY",
"symbol": "FPT.VN",
"index": "quotes",
"score": 20003,
"typeDisp": "Equity",
"longname": "FPT Corporation",
"exchDisp": "VSE",
"sector": "Technology",
"sectorDisp": "Technology",
"industry": "Information Technology Services",
"industryDisp": "Information Technology Services",
"dispSecIndFlag": false,
"isYahooFinance": true
}
```
I think we can achieve it by decide currency value by look at the suffix of symbol, which could be country code (VN - Vietnam in example above).
pseudo-code that update currency base on country code in **yahoo-finance.service.ts - search()**:
```js // force support Vietnamese stock
items.forEach((item) => {
if (item.symbol?.endsWith('.VN')) {
item.currency = 'VND';
}
});
```
I think if we have an option to let user decide what stock they want to display in the lookup would be nice
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.