Pull Live Stock, Crypto, FOREX and Commodities News Into Google Sheets

Having a broad understanding of world events, whether at the macroeconomic level or within specific asset classes like publicly listed companies, cryptocurrencies, or derivatives, has proven to be a key point of information for any investor. For instance, a breakthrough in GPU technology at Nvidia could spark short-term price swings, while the ongoing cost of living crisis might drive long-term trends in assets like gold, further influencing incentives for investors and companies alike.

Staying tuned into these developments and organizing them in one platform, like Google Sheets, provides a real edge in making faster, more rational decisions in today’s information-driven world. Interested? Perfect. Let's dive deeper into the new SF_NEWS() function that will bring you the latest news on any asset class you want to follow, straight into your Google Sheets!

Getting Started

  1. Make sure SheetsFinance is properly installed and linked to your google account, if not, you can find how to do so here.
  2. Keep our documentation page for SF_NEWS() handy for reference.

Displaying the latest stock news in Google Sheets

Let's dive straight into the SF_NEWS() function, which will enable you to fetch the latest news on any publicly listed company.

Breaking down all the elements of the function, SF_NEWS() takes on the following format:

Copy
    =SF_NEWS(symbol(s), type, limit, metrics, site, startDate, endDate, options)
    

Let's start super simple. Let's say you want the 10 latest news pieces on Apple Inc. (AAPL). You can do so by simply inputting the following line into Google Sheets:

Copy
    =SF_NEWS("AAPL")
    

🔥 Hot Tip: You can click these functions to copy them and then paste them straight into your spreadsheet.

📝 Note: Currently the SF_NEWS() function only supports US based equities, but coverage also includes most cryptocurrencies, as well as FOREX and commodities, like gold.

By default, the above function outputs the 10 latest news pieces on Apple Inc. (AAPL), with the most recent news piece appearing at the top of the list. By changing the limit argument, you can modify how many news pieces you'd like to fetch, but more on this later on.

The function by default outputs the following metrics:

  • The symbol of the asset
  • The publishedDate for when it was published
  • Thesite where the news piece was published
  • The title of the news piece
  • The summarized text of the news piece
  • The url to find the source

To display all the metrics you can either enter"all" for the metrics argument, or just leave the argument blank as we've already done. However, you can also specify which metrics you'd like to display by "chaining" them with the & symbol. For example, if you'd like to display only the title and the site, you could enter title&site in the metrics argument of the SF_NEWS() function:

Copy
    =SF_NEWS("AAPL", "stocks", 10, "title&site")
    

Fetching news articles on non-equity assets (cryptocurrencies, FOREX, and commodities)

Now, let's look into fetching the latest news on a non-equity asset type, how about a cryptocurrency? This time, we'll need to specify the type parameter, which will allow us to select the asset class we're interested in. The available options are "stocks" (the default parameter), "crypto" and "forexAndCommodities".

Very simply, if we'd like to lookup 10 recent news article about Bitcoin we would use:

Copy
    =SF_NEWS("BTCUSD", "crypto")
    

The same applies for enterin FOREX pairs, for example, for the latest news on JPY/USD foreign exchange:

Copy
    =SF_NEWS("JPYUSD", "forexAndCommodities")
    

Filtering the news articles feed

Now let's explore some of the additional parameters that can be used to filter the news feed. First up there's the ability to adjust the limit. This is pretty self-explanatory, just adjust this number to your liking to return more or less news pieces.

Next up we have the site parameter, which allows you to filter the news feed by the source(s) of the news. You can enter multiple sites by separating (or "chaining") them with the & symbol.

Lastly, and at this stage only available for our "stocks" type, you can filter the news feed by dates. This is done by specifying the startDate and endDate parameters.

So let's put this all together. Say for instance, you want to get the latest 5 news articles in the last 30 days for Ulta Beauty (ULTA), but specifically from Youtube and Fools.com, we can combine all these parameters as follows:

Copy
    =SF_NEWS("ULTA", "stocks", 5, "all", "youtube.com&fool.com",H5-30,H5)
    

💡 Quick Tip: To limit live function calls, place =TODAY() in cell H5 (as the above snippet) and reference it directly in your formula.

Using the Function Generator to build these functions for you

Feeling a bit overwhelmed by all the functions? Don't worry, we've got you covered! 😁

Our Function Generator is a tool that builds these functions for you. Just select the function you want to use, input the required parameters, and the Function Generator will generate the function for you and automatically insert it into your Google Sheet. You can find the Function Generator in the Google Sheets under (Extensions > Sheets Finance > Function Generator).

If you aren’t sure what ticker to use for a certain company, either use the Symbol Search tool within Google Sheets (Extensions > Sheets Finance > Symbol Search), or visit the SF Symbol Search page.

You can also use the SF_MAP function to translate any ISIN, CUSIP or CIK code into the correct ticker used at SheetsFinance, for more information, kindly look through this documentation page.

Conclusion

And that's it! You're now equipped with the knowledge to fetch the latest news on any asset class you want to follow, straight into your Google Sheets. This will enable you to stay up-to-date with the latest developments in the world of finance, and make more informed decisions in your investment journey.

AM
Antoine Mauger
Analyst