Markets-widget fails to show daily change for some symbols
- Dominant language
- Go
- Stars
- 37.1k
- Forks
- 1.5k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 1
Description
Markets widget doesn't show day change properly for all symbols.
_Glance version: 0.8.4_
**_In this screenshot, ASWC.DE should display **-2.29%**_**
**_Actual day change of ASWC.DE from Yahoo Finance:_**
I speculate it might have to do with Yahoo Finance sometimes returning null values in response at: `result.Indicators.Quote[0].Close`, for example:
**_ASWC.DE Yahoo API reponse with null values:_**
`https://query1.finance.yahoo.com/v8/finance/chart/aswc.de?range=1mo&interval=1d`
**_DFEN.DE Yahoo API response with no null values:_**
`https://query1.finance.yahoo.com/v8/finance/chart/dfen.de?range=1mo&interval=1d`
### Steps to reproduce:
_Can be unreliable, depending if Yahoo API returns null values or not._
1. Add markets widget to glance.yml with these symbols:
```
- type: markets
markets:
- symbol: SPYI.DE
name: SPYI
- symbol: QDVE.DE
name: S&P IT
- symbol: ASWC.DE
name: Future of Defence
- symbol: DFEN.DE
name: VanEck Defense
```
2. Check whether Glance dashboard incorrectly displays +0.00% for any of the symbols.
### Full JSONs for ASWC.DE and DFEN.DE:
[dfen.de.json](https://github.com/user-attachments/files/23401139/dfen.de.json)
[qdve.de.json](https://github.com/user-attachments/files/23401140/qdve.de.json)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the markets widget entry point and trace how the Yahoo Finance chart response from result.Indicators.Quote[0].Close is used to calculate daily change. Reproduce with the symbols in the glance.yml example, especially ASWC.DE, and compare the displayed percentage with Yahoo Finance; done means symbols with null values show their correct daily change instead of +0.00%.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100