Back to Marketstack in Google Sheets
SheetXAI logo
Marketstack logo
Marketstack · Google Sheets Guide

Refresh a Watchlist With the Latest Prices From Marketstack in a Google Sheet

2026-05-14
5 min read

The Scenario

You manage a personal portfolio of 20 stocks and you check it at the same time every Monday morning. Column A in your Google Sheet has the tickers. Columns B through E are supposed to show the latest close, adjusted close, volume, and date — but the last time they were updated was two weeks ago, because the process for updating them involves opening Marketstack's API in a browser, calling each ticker individually, and pasting the results by hand.

Last Monday you skipped it. This Monday you need accurate numbers for a rebalancing decision before the market opens.

The bad version:

  • Open Marketstack's API endpoint for latest EOD data, call it for ticker 1, copy the close price into column B manually
  • Repeat 19 more times — including the moment around ticker 11 when you realize you pasted the adjusted close into the close column and the close into the adjusted close column, and have to go back and fix five rows
  • Check the date in column E to confirm you got today's data and not yesterday's, because one of the tickers settled a day late and now the column is inconsistent

The rebalancing decision is time-sensitive. The data entry is not where your attention should be.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads the ticker list in column A and through its Marketstack integration it can pull the latest end-of-day data for every row and write it into the right columns — in one shot.

For each ticker in column A, fetch the latest end-of-day data from Marketstack and write the most recent close price into column B, adjusted close into column C, volume into column D, and the date into column E

What You Get

  • Close price in column B for every ticker in the list
  • Adjusted close in column C, accounting for dividends and splits
  • Volume in column D
  • Date in column E showing which trading day the data is from
  • Any ticker with no recent data gets a note in the corresponding row explaining the gap

What If the Data Is Not Quite Ready

Some tickers in the list are ETFs without adjusted close

For each ticker in column A, fetch the latest EOD data from Marketstack — write close into column B and volume into column C; for tickers that have an adjusted close, write it into column D; leave column D blank for tickers that do not report an adjusted close

The list includes tickers from multiple exchanges and you need the exchange noted

For each ticker in column A, fetch the latest EOD close from Marketstack and write it into column B, volume into column C, and the exchange MIC code into column D so I can see which exchange each quote came from

You want a percentage change column added automatically

Fetch the latest EOD close from Marketstack for each ticker in column A and write it into column B; then calculate the day-over-day percentage change using the previous close from Marketstack and write that into column C, formatted as a percentage

Full watchlist refresh: fetch latest close, flag anything down more than 5 percent, and add a notes column

For each ticker in column A, fetch today's latest EOD close from Marketstack and write it into column B; calculate the percentage change from the prior close and write it into column C; in column D, flag any ticker with a change worse than negative 5 percent with the word ALERT, leave it blank otherwise

Combining the data fetch, the calculation, and the conditional flag in one prompt means you get an actionable watchlist instead of a partially updated table you still have to work through.

Try It

Get the 7-day free trial of SheetXAI and open your portfolio watchlist sheet, then ask it to refresh every ticker in column A with the latest EOD data from Marketstack. The Marketstack integration is included in every SheetXAI plan.

See also: pulling historical OHLCV data and building a dividend history table.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more