Reference · Tools

Marketstack

Retrieve stock market data including end-of-day closing prices, exchange details, and ticker/symbol information from the Marketstack API.

Action Analytics v1

The Marketstack node retrieves stock market data — end-of-day closing prices, exchange details and ticker or symbol information. A typical build is pulling closing prices for a watchlist each evening and writing them into a sheet or alerting on a threshold.

Node type
Action
Parameters
11
Outputs
Output, Error
Credentials
Marketstack API

Marketstack

Retrieve stock market data, end-of-day prices, exchange details, and ticker information.

Overview

Marketstack is a REST API providing real-time and historical stock market data. This tool provides access to the Marketstack API v1 (api.marketstack.com/v1). It supports three resources: End-of-Day Data (get many — closing prices for stocks), Exchange (get — stock exchange details by MIC code), and Ticker (get — stock symbol details). The End-of-Day Data resource supports filtering by latest data, specific date, or date range, plus exchange and sort order filters. Authentication is via API key passed as the access_key query parameter. The free plan uses HTTP only; paid plans support HTTPS.

Category: Analytics
Tool Name: marketstack
Version: 1

Appearance: Icon: lucide-BarChart | Color: #2D4059

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Marketstack API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
End-of-Day DataendOfDayData
Exchangeexchange
Tickerticker

Operations

OperationValueDescription
End-of-Day Data: Get ManygetAllGet many end-of-day data records
Exchange: GetgetGet an exchange
Ticker: GetgetGet a ticker

Parameters

End-of-Day Data: Get Many

ParameterTypeRequiredDefaultDescription
Ticker (symbols)stringYesOne or multiple comma-separated stock symbols (tickers) to retrieve, e.g. AAPL or AAPL,MSFT.
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)
FilterscollectionNo{}
— Exchange (exchange)stringNoStock exchange to filter results by, specified by Market Identifier Code (MIC), e.g. XNAS.
— LatestbooleanNofalseWhether to fetch the most recent stock market data.
— Sort OrderoptionsNoDESCOrder to sort results in.
Options: ASC (Ascending), DESC (Descending)
— Specific DatestringNoDate in YYYY-MM-DD format, e.g. 2024-01-15, or in ISO-8601 format, e.g. 2024-01-15T00:00:00+0000.
— Timeframe Start DatestringNoTimeframe start date in YYYY-MM-DD format, e.g. 2024-01-01, or in ISO-8601 format.
— Timeframe End DatestringNoTimeframe end date in YYYY-MM-DD format, e.g. 2024-01-31, or in ISO-8601 format.

Exchange: Get

ParameterTypeRequiredDefaultDescription
Exchange (exchange)stringYesStock exchange to retrieve, specified by Market Identifier Code (MIC), e.g. XNAS for NASDAQ.

Ticker: Get

ParameterTypeRequiredDefaultDescription
Ticker (symbol)stringYesStock symbol (ticker) to retrieve, e.g. AAPL.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

Every result record is merged onto the input item JSON, so upstream fields stay addressable alongside the market data, and binary data is forwarded unchanged.

How many items you get back depends on the resource:

Resource / OperationOutput items
End-of-Day Data: Get ManyFans out — one item per end-of-day record returned. A query covering three symbols over twenty trading days produces sixty items.
Exchange: GetOne item, carrying the exchange record.
Ticker: GetOne item, carrying the ticker record.

When a query matches nothing at all, a single pass-through item is emitted carrying the input JSON unchanged — so an empty result is visible downstream rather than silently dropping the item.

The record fields are whatever the Marketstack API returns for that endpoint (for end-of-day data that includes the symbol, the date, and the open/high/low/close/volume figures). Reference them downstream by expression, for example {{ $json.close }}.

Usage Examples

  • Get the latest closing prices for AAPL and MSFT
  • Get end-of-day data for a specific date
  • Get end-of-day data for a date range
  • Get details about the NASDAQ exchange
  • Get details about the AAPL ticker

Example Configuration

Latest closing prices for several symbols:

{
  "type": "marketstack",
  "parameters": {
    "resource": "endOfDayData",
    "operation": "getAll",
    "symbols": "AAPL,MSFT,GOOGL",
    "returnAll": true,
    "filters": {
      "latest": true,
      "sort": "DESC"
    }
  }
}

A month of NASDAQ closes for one symbol, capped at 50 records:

{
  "type": "marketstack",
  "parameters": {
    "resource": "endOfDayData",
    "operation": "getAll",
    "symbols": "AAPL",
    "returnAll": false,
    "limit": 50,
    "filters": {
      "dateFrom": "2026-01-01",
      "dateTo": "2026-01-31",
      "exchange": "XNAS"
    }
  }
}

Closing data for one specific trading day, with the symbol taken from the item:

{
  "type": "marketstack",
  "parameters": {
    "resource": "endOfDayData",
    "operation": "getAll",
    "symbols": "{{ $json.ticker }}",
    "returnAll": true,
    "filters": {
      "specificDate": "2026-03-15"
    }
  }
}

Look up an exchange by its MIC code:

{
  "type": "marketstack",
  "parameters": {
    "resource": "exchange",
    "operation": "get",
    "exchange": "XNAS"
  }
}

Look up a ticker:

{
  "type": "marketstack",
  "parameters": {
    "resource": "ticker",
    "operation": "get",
    "symbol": "AAPL"
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Retrieve stock market end-of-day prices, exchange details, and ticker information from the Marketstack API using an API key.

Behavior notes

  • Pick exactly one time filter. Latest, Specific Date, and the Timeframe Start/End pair select different endpoints. Latest wins over Specific Date, which wins over the timeframe; and if you use neither Latest nor Specific Date you must supply both timeframe dates or the node errors.
  • Ticker takes a comma-separated list. AAPL,MSFT in one node is one API call, and cheaper than three nodes.
  • Exchanges are addressed by MIC code, not by name — XNAS for NASDAQ, XNYS for NYSE.
  • Dates accept YYYY-MM-DD or full ISO-8601.
  • Return All pages the API until it is exhausted, which burns request quota fast on a long timeframe. Set a limit while you are building the workflow.
  • The free Marketstack plan is HTTP-only. Paid plans serve the same endpoints over HTTPS.

Frequently asked questions

How do the time filters interact?

Pick exactly one. Latest wins over Specific Date, which wins over the timeframe pair. If you use neither Latest nor Specific Date you must supply both timeframe dates or the node errors.

How do I fetch several symbols efficiently?

Ticker takes a comma-separated list — `AAPL,MSFT` in one node is a single API call, which is cheaper than three separate nodes.

What data can it return besides prices?

Exchange details and ticker/symbol information, so you can resolve what an exchange or symbol refers to as well as fetch its prices.

Which credential does it need?

A Marketstack API credential holding the API key.

Build with the Marketstack node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Marketstack API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.