Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/scraper/stock/yahoo.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ func GetHistory(ticker string, commodityName string) ([]*price.Price, error) {
}

var prices []*price.Price
if len(response.Chart.Result) == 0 {
return nil, fmt.Errorf("Failed to fetch data for %s, is the ticker valid?", ticker)
}
result := response.Chart.Result[0]
needExchangePrice := false
var exchangePrice *btree.BTree
Expand Down