<!-- BusyBot node reference — https://busybot.net/tools/marketstack/ -->

> Node: Marketstack (`marketstack`) · Action · v1
> Category: Analytics · Credentials: Marketstack API (`marketstackApi`)
> Updated: 2026-08-16

# 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

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Marketstack API** credentials.
See the [Credentials Guide](https://busybot.net/credentials/marketstack-api/) for setup instructions.

### Resources

| Resource | Value |
|----------|-------|
| End-of-Day Data | `endOfDayData` |
| Exchange | `exchange` |
| Ticker | `ticker` |

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| End-of-Day Data: Get Many | `getAll` | Get many end-of-day data records |
| Exchange: Get | `get` | Get an exchange |
| Ticker: Get | `get` | Get a ticker |

### Parameters

#### End-of-Day Data: Get Many

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Ticker (`symbols`) | `string` | Yes | — | One or multiple comma-separated stock symbols (tickers) to retrieve, e.g. AAPL or AAPL,MSFT. |
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `50` | Max number of results to return. _(shown when Return All is `false`)_ |
| Filters | `collection` | No | `{}` | — |
| — Exchange (`exchange`) | `string` | No | — | Stock exchange to filter results by, specified by Market Identifier Code (MIC), e.g. XNAS. |
| — Latest | `boolean` | No | `false` | Whether to fetch the most recent stock market data. |
| — Sort Order | `options` | No | `DESC` | Order to sort results in. |
| | | | | Options: `ASC` (Ascending), `DESC` (Descending) |
| — Specific Date | `string` | No | — | Date 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 Date | `string` | No | — | Timeframe start date in YYYY-MM-DD format, e.g. 2024-01-01, or in ISO-8601 format. |
| — Timeframe End Date | `string` | No | — | Timeframe end date in YYYY-MM-DD format, e.g. 2024-01-31, or in ISO-8601 format. |

#### Exchange: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Exchange (`exchange`) | `string` | Yes | — | Stock exchange to retrieve, specified by Market Identifier Code (MIC), e.g. XNAS for NASDAQ. |

#### Ticker: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Ticker (`symbol`) | `string` | Yes | — | Stock symbol (ticker) to retrieve, e.g. AAPL. |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Max Concurrency | `number` | No | `10` | Maximum 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 / Operation | Output items |
|----------------------|--------------|
| `End-of-Day Data: Get Many` | **Fans out** — one item per end-of-day record returned. A query covering three symbols over twenty trading days produces sixty items. |
| `Exchange: Get` | One item, carrying the exchange record. |
| `Ticker: Get` | One 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:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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:

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

Look up a ticker:

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

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes 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.