A stock dashboard is one of those projects everyone thinks they could build in a weekend. The interface is the easy part: a table of tickers, some green and red numbers, a chart. The hard part is the data, because “the price of Apple” turns out to mean several different things depending on which day you ask and what you compare it to.
We built one called StockoMeter on the Marketstack API. It shows prices, top gainers and losers, volume, sectors and price history for about a hundred of the most relevant tickers. We’ll go through the API first, with the real requests and responses we got on November 23, 2026, and then show how to vibe code a dashboard of your own with an AI assistant.

StockoMeter overview: tracked tickers, advancers and decliners, and hot, active, top gainer and top volume cards for November 20, 2026
Table of Contents
What is the Marketstack API?
Marketstack gives you stock market data over a plain REST API: end-of-day prices for tens of thousands of tickers, historical prices, the list of tickers and exchanges, splits and dividends. You send a GET request with your key in the access_key query parameter and get JSON back. Version 2 lives at https://api.marketstack.com/v2.
Using a reliable market data API allows developers to integrate stock prices and historical financial data directly into their dashboards and investment applications.
The free plan is enough to build and test with. According to the pricing page it includes 100 requests a month, HTTPS, end-of-day data and one year of history, and it’s for non-commercial use. The cheapest paid plan, Basic, is $9.99 a month for 10,000 requests and adds intraday data for US stocks, ten years of history and commercial use. That split matters for a dashboard: on the free plan your prices are end-of-day prices, so the honest label is “as of” a date, not “live”.
The same data powers more than dashboards. Portfolio trackers, price alerts, earnings and dividend calendars, “what if I’d bought in 2020” calculators and embeddable price widgets are all the same three endpoints arranged differently. StockoMeter has most of those too, which is a good sign of how far a small API surface goes.
How do you get the latest prices from Marketstack?
You call /eod/latest with a comma-separated list of symbols. Here’s the request we sent for three tickers:
curl “https://api.marketstack.com/v2/eod/latest?symbols=AAPL,NVDA,TSLA&limit=10&access_key=YOUR_KEY“ |
It answered in 0.53 seconds. Here’s the first record (we’ve trimmed the other two, which have the same shape):
{
"pagination": { "limit": 10, "offset": 0, "count": 3, "total": 3 },
"data": [
{
"open": 352.865,
"high": 354.34,
"low": 340.56,
"close": 342.56,
"volume": 80692545.0,
"adj_open": 352.865,
"adj_close": 342.56,
"split_factor": 1.0,
"dividend": 0.0,
"name": "Apple Inc",
"exchange_code": "NASDAQ",
"asset_type": "Stock",
"price_currency": "USD",
"symbol": "AAPL",
"exchange": "XNAS",
"date": "2026-11-20T00:00:00+0000"
}
]
}
Each record is one trading day for one symbol: open, high, low, close and volume, plus adj_ versions of each that account for splits and dividends. Use the adjusted values for anything that spans time, like charts and returns, because a 4-for-1 split otherwise looks like a 75% crash. exchange is the operating MIC (XNAS) and exchange_code is the acronym people recognise (NASDAQ), so show the second one. price_currency matters as soon as you add a non-US exchange.
For history, the same shape comes from /eod, newest first if you ask for it:
curl “https://api.marketstack.com/v2/eod?symbols=AAPL&limit=90&sort=DESC&access_key=YOUR_KEY“ |
The pagination.total on that response was 7,545, so Apple’s full daily history is there for plans that include it. StockoMeter asks for the last 90 days for its charts.
Where does the list of tickers come from?
A dashboard needs to decide which stocks to show before it can ask for prices. Marketstack’s /tickerslist endpoint answers that, and it’s bigger than you’d expect:
curl “https://api.marketstack.com/v2/tickerslist?limit=5&access_key=YOUR_KEY“ |
{
"pagination": { "limit": 5, "offset": 0, "count": 5, "total": 683247 },
"data": [
{
"name": "Microsoft Corporation",
"ticker": "MSFT",
"has_intraday": false,
"has_eod": true,
"stock_exchange": { "name": "NASDAQ - ALL MARKETS", "acronym": "NASDAQ", "mic": "XNAS" }
}
]
}
That’s 683,247 tickers. The useful surprise is the order: Microsoft, Apple and Amazon came back first, so the list is sorted by relevance rather than alphabetically. That gives you a ready-made “top 100” without maintaining your own list.
So StockoMeter builds its main view in two steps. It takes the first 100 entries from /tickerslist, keeps the ones where has_eod is true, then asks /eod/latest for their prices in batches of 100 symbols and puts them back in relevance order. In our run, 100 requested tickers became 97 priced rows: a few entries on the list don’t return an end-of-day record. Your code has to expect fewer rows than symbols and never assume the two lists line up by index.
The other thing to know is speed. That /tickerslist call took 6.0 seconds, against about half a second for each price request. It’s the slowest call in the app and the one that changes least, so it’s the first thing to cache.
Why doesn’t the daily change match your broker?
This is the one that will catch you. The obvious way to compute “today’s change” from an end-of-day record is from the open to the close, because that’s all one /eod/latest record gives you. StockoMeter’s list views (the overview cards, movers and sectors) do exactly that, and the movers page says so under its title: “Sorted by today’s change (close vs open)”. For Apple on November 20 it’s:
(342.56 – 352.865) / 352.865 = -2.92% |
But brokers and finance sites measure the day’s change against the previous day’s close. Apple closed at 349.21 on November 19, so the number a trader would expect is:
(342.56 – 349.21) / 349.21 = -1.90% |
That’s a full percentage point apart, on the most-watched stock in the world, and both numbers are “correct”. The open-to-close figure tells you how the stock moved during the session. The close-to-close figure includes the overnight gap, and it’s what people mean by “Apple was down 1.9% today”. On a day with a big gap after earnings, the two can even have opposite signs.
The stock page shows both, and that’s the approach we’d copy. It already fetches 90 days of history for the chart, so the previous close is sitting right there: the page labels the open-to-close number “today” and puts “−1.90% vs prior close” under it, at no extra request cost.
StockoMeter stock page for AAPL: −2.92% today (open to close) next to −1.90% vs prior close, with the 90-day chart from the eod endpoint
For list views, where you only have one record per symbol, getting the close-to-close number means fetching the last two trading days for every symbol. One /eod request with several symbols and a date range does it, but it’s more data per refresh than /eod/latest, which is the trade-off. Either way, label it. A “change since open” label is perfectly fine. An unlabelled number that disagrees with Google is not.
What does “latest” mean on a Monday?
We made these requests on Monday, November 23, before the US market closed. Every record came back dated 2026-11-20T00:00:00+0000, which was the previous Friday. That’s correct: end-of-day data only exists once the day is over, and the weekend has no trading days.
Two things follow. First, the date field is a trading day stamped at midnight UTC, not the time of the last trade, so show it as a date (“As of Nov 20, 2026”, which is what StockoMeter’s header does) and don’t run it through a time zone conversion, which would turn it into November 19 for anyone in the Americas. Second, your “today” view will show Friday’s numbers all weekend and most of Monday. Say so on the page, or users will assume the app is broken every Monday morning. If you want prices that move during the trading day, that’s what the intraday data on Basic is for: it covers US stocks, so your numbers change during the session instead of once a day.
StockoMeter top gainers and losers, labelled "Sorted by today's change (close vs open)", from the November 20 end-of-day records
How do you stay inside the request quota?
Fetch on your server, cache hard and share the result with every visitor. The key travels in the query string, so it can’t go to the browser anyway, and 100 requests a month on the free plan is about three a day. Even on Basic, a dashboard that called Marketstack once per visitor would run out fast.
StockoMeter wraps every call in one server-side helper that sets a revalidation time on Next.js’s fetch:
const res = await fetch(url, { |
The ticker list and latest prices revalidate every 65 seconds, and price history every hour (3,600 seconds), both configurable with environment variables. History for a past day never changes, so an hour is conservative. All calls share the marketstack cache tag, so one revalidateTag(“marketstack”) refreshes everything when you need to.
Do the quota maths before you trust those numbers. Refreshing the main view every 65 seconds, around the clock, is roughly 40,000 refreshes a month, and each one costs a /tickerslist call plus one /eod/latest call per 100 symbols. That’s far past the free plan and four times Basic. With end-of-day data, prices only change once a day, so a production version should revalidate the list and latest prices every few hours, or once after the market closes. That’s the first number we’d change.
Two smaller things from the code are worth copying. The helper reads json.data ?? json.body?.data ?? [], because responses can come wrapped differently, and a dashboard that crashes on an unexpected shape is worse than one that shows an empty card. It also throws on any non-2xx status, so a failed fetch never gets cached as an empty list. Marketstack’s error codes in the body (usage_limit_reached, rate_limit_reached, invalid_access_key) are what to log and show.
How to vibe code the stock dashboard
An AI coding assistant will build most of this quickly, as long as the prompts carry the details above. Left alone, it will call the API from the browser, compute change from open to close without saying so, convert the date field to local time, and assume one row per requested symbol. We’d use a tool that edits a real project, like Claude Code or Cursor, and go one step at a time.
Start with the data layer, since every page depends on it:
Create a Next.js App Router project with a server-only module lib/marketstack.ts |
When it’s done, call a page twice and check that the second load makes no upstream request, then search the built client JavaScript for your key to make sure it never left the server. Also check that a request for 100 tickers that returns 97 prices doesn’t misalign names and prices.
Next, get the daily change right:
Compute each stock’s daily change as close-to-close: fetch the last two |
Check it against a source you trust. Pick two or three tickers and compare your 1D change with your broker or a finance site after the close. If yours is off by roughly the overnight gap, it’s still measuring from the open.
Then the dashboard views:
Build an overview page from the top 100 tickers: counts of advancers and |
Sectors deserve one note. Marketstack’s ticker list doesn’t include a sector, so StockoMeter keeps its own small map of 38 well-known symbols to sectors (Apple to Tech, JPMorgan to Finance and so on). If you want sectors across thousands of tickers, you’ll need a source for that mapping, and it’s worth deciding early.
The last prompt handles failure, which is what makes the dashboard feel solid:
If Marketstack fails or returns an error code in the body, keep serving the |
Things to sort out before you launch
Work out your quota for real traffic. Count the upstream calls per refresh (one /tickerslist, one /eod/latest per 100 symbols, plus history pages), multiply by how often you revalidate, and pick the refresh interval and plan that fit. With end-of-day data there’s no reason to refresh more than a few times a day.
Be clear about what the numbers are. Say “end-of-day” or “as of” on the page, label how the daily change is calculated, and explain the weekend gap in an FAQ. Finance users notice wrong numbers immediately, and a clear label turns “this is broken” into “ah, Friday’s close”.
Check the licence too. The free plan is non-commercial, and a stock dashboard is usually commercial the moment it carries ads or a sign-up, so move to a paid plan before launch. Company logos are a separate service (StockoMeter uses logo.dev), with its own key and terms.
Wrapping up
The prices themselves come from one endpoint. What makes the dashboard right is the work around it: choosing tickers by relevance, expecting fewer rows than symbols, computing change against the previous close, treating the date as a trading day, and caching on the server so every visitor shares the same few requests. You can try StockoMeter, and get a free key from Marketstack to start building. When you launch, Basic ($9.99 a month) adds intraday US prices, ten years of history and commercial use.
Happy coding.
Build Your Stock Dashboard with Marketstack
Access real-time, intraday, and historical stock market data for over 170,000 stock tickers across 70+ global exchanges. Build powerful stock dashboards, portfolio trackers, and financial applications with Marketstack’s REST API.
Start for free with 100 API requests per month. No credit card required.