Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
use the single quote endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
librehat committed Jun 2, 2023
1 parent eed3625 commit c9cdb9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plasmoid/contents/code/yahoofinance.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export function resolveMultipleQuotes(symbols) {
if (symbols.length === 0) {
return Promise.resolve([]);
}
/** FIXME: no longer working
return httpRequestP(`https://query2.finance.yahoo.com/v6/finance/quote?symbols=${symbols.join(",")}&fields=symbol,longName,shortName,exchange,quoteType,regularMarketPrice,regularMarketTime,regularMarketChange,regularMarketVolume,regularMarketDayRange,regularMarketOpen,regularMarketChangePercent,marketCap`)
.then((text) => {
const resp = JSON.parse(text);
Expand Down Expand Up @@ -153,6 +154,8 @@ export function resolveMultipleQuotes(symbols) {
marketCap: result.marketCap || "N/A"
}));
});
*/
return Promise.all(symbols.map(resolveQuote));
}

/**
Expand Down

0 comments on commit c9cdb9d

Please sign in to comment.