# Stock Price History & Technical Indicators ($0.30/1K) (`carabain-digital/stock-prices`) Actor

Daily, weekly and monthly OHLCV price history of shares, ETFs and indices worldwide from Yahoo Finance, by ticker or ISIN: adjusted close, dividends, splits, plus optional RSI, MACD, moving averages, Bollinger bands, ATR, pivot points and support/resistance levels.

- **URL**: https://apify.com/carabain-digital/stock-prices.md
- **Developed by:** [Carabain Digital](https://apify.com/carabain-digital) (community)
- **Categories:** Developer tools, Automation
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.18 / 1,000 price bars

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

#### What is Stock Price History & Technical Indicators?

**Stock Price History & Technical Indicators** gives you the **daily, weekly or monthly price history (open, high, low, close, volume) of shares, ETFs and indices worldwide, by Yahoo Finance ticker or ISIN**. Every bar also carries the split- and dividend-adjusted close, the dividend paid and the split that took effect, and the change versus the previous bar. Switch on the optional **technical indicators add-on** and every row also gets RSI, MACD, moving averages, Bollinger bands, ATR, pivot points and support and resistance levels, computed for you. Built for **backtests, charting, screeners, portfolio trackers and trading bots**. Prefilled example: Apple, ASML (by ISIN) and Toyota, ready in seconds. Costs **$0.30 per 1,000 price bars**.

- 🌍 **Any symbol Yahoo Finance knows**: `AAPL`, `ASML.AS`, `SAP.DE`, `7203.T`, `0700.HK`, `RELIANCE.NS`, `BHP.AX`, `SHOP.TO`, indices such as `^GSPC`, ETFs
- 🔑 **Tickers and ISINs, mixed**: an ISIN is mapped to the share's primary listing for you
- 📅 **Daily, weekly or monthly bars**, as far back as Yahoo goes (IBM from 1962)
- 💱 **Clean currency**: London pence, South African cents and Israeli agorot are converted to GBP, ZAR and ILS
- 🧮 **Adjusted close**: `adj_close` is adjusted for splits and dividends, so it is a total-return series
- ✂️ **Dividends and splits** on the bar they take effect
- 📈 **Optional indicators**: SMA 20/50/200, EMA 12/26, RSI 14, MACD, Bollinger bands, ATR 14, pivot points, support/resistance
- 🔌 **Connect anywhere**: API, schedules, webhooks, Google Sheets, Make, Zapier, MCP / AI agents

#### Use it from AI agents

This Actor has an agent skill for Claude Code, Codex, Cursor and other agents that read `SKILL.md`: it tells the agent when to use the Actor, every input field and the output. Install it with:

```bash
npx skills add carabain-digital/apify-agent-skills --skill stock-prices
```

Or read the skill on GitHub: [carabain-digital/apify-agent-skills/skills/stock-prices](https://github.com/carabain-digital/apify-agent-skills/tree/main/skills/stock-prices).

#### What data can I get?

<table>
<tr><td>🆔 Symbol, ISIN, name, exchange, currency</td><td>📅 Date of the bar (exchange-local day)</td></tr>
<tr><td>💹 Open, high, low, close, volume</td><td>🧮 Adjusted close (splits and dividends)</td></tr>
<tr><td>💶 Dividend per share on its ex-date bar</td><td>✂️ Split ratio (4:1, 1:10)</td></tr>
<tr><td>📊 Change % versus the previous bar</td><td>📈 With the add-on: SMA, EMA, RSI, MACD, Bollinger, ATR, pivots, support, resistance</td></tr>
</table>

#### How do I get stock price history?

1. [Create a free Apify account](https://console.apify.com/sign-up) and open this Actor.
2. Paste your **symbols** (tickers or ISINs), one per line, up to 500 per run.
3. Pick the **bar size** and a **From date** (empty = the last 12 months; an early date such as `1970-01-01` gives the full history). Optionally switch **Technical indicators** on.
4. Click **Start**, then download the rows from the **Output** tab as JSON, CSV, Excel, XML or HTML.

#### How much does it cost?

You pay per price bar that ends up in your dataset: **$0.30 per 1,000 bars**, no subscription. A year of daily bars is about 250 rows, so ten years of one share costs about $0.75, and 100 shares for a year about $7.50. The optional **Technical indicators** add-on costs another **$0.30 per 1,000 bars** that carry indicator values (off by default); bars with no value at all are not charged. The monthly credit of Apify's Free plan ($5) covers around 16,000 bars. Paid plans get volume discounts. Failed runs cost nothing, and you can cap spending with **Maximum cost per run** in the run options.

#### ⬇️ Input

| Field | Description |
|---|---|
| **Symbols** (`symbols`) | Yahoo Finance tickers or ISINs, e.g. `AAPL`, `ASML.AS`, `7203.T`, `NL0010273215`. Up to 500 |
| **Bar size** (`interval`) | `1d` (default), `1wk` or `1mo` |
| **From date** (`from_date`) | First day, YYYY-MM-DD. Empty = last 12 months |
| **To date** (`to_date`) | Last day, YYYY-MM-DD. Empty = today |
| **Technical indicators** (`technicalIndicators`) | Add-on: indicator fields on every row (default off) |
| **Max rows** (`limit`) | Stop after this many rows in total |
| **Proxy** (`proxyConfiguration`) | Apify datacenter proxy by default |

```json
{
    "symbols": ["AAPL", "NL0010273215", "7203.T"],
    "interval": "1d",
    "from_date": "2025-01-01",
    "technicalIndicators": true
}
```

#### ⬆️ Output

One row per symbol per bar, **newest first** within each symbol. View them as a table in the **Output** tab or export JSON, CSV, Excel, XML or HTML. Every row has the same keys; fields that do not apply are `null`.

```json
{
    "id": "yahoo:AAPL:2026-11-25",
    "symbol": "AAPL",
    "isin": null,
    "name": "Apple Inc.",
    "exchange": "NasdaqGS",
    "currency": "USD",
    "date": "2026-11-25",
    "open": 353.48,
    "high": 356.75,
    "low": 345.13,
    "close": 355.58,
    "adj_close": 355.58,
    "volume": 54240100,
    "dividend": null,
    "split_ratio": null,
    "change_pct": 0.4265,
    "scraped_at": "2026-11-26T08:10:21Z",
    "sma_20": 348.6715,
    "sma_50": 343.0452,
    "sma_200": 304.4022,
    "ema_12": 350.6943,
    "ema_26": 347.7364,
    "rsi_14": 57.8969,
    "macd": 2.9579,
    "macd_signal": 3.0976,
    "macd_hist": -0.1397,
    "bb_upper": 361.0862,
    "bb_middle": 348.6715,
    "bb_lower": 336.2568,
    "atr_14": 8.5636,
    "pivot": 351.45,
    "r1": 357.02,
    "r2": 359.97,
    "r3": 365.54,
    "s1": 348.5,
    "s2": 342.93,
    "s3": 339.98,
    "support": 352.8467,
    "support_touches": 3,
    "resistance": 360.83,
    "resistance_touches": 1
}
```

The indicator fields (`sma_20` to `resistance_touches`) are `null` unless the add-on is on, or when there is not enough history.

**`close` versus `adj_close`**: `close` is adjusted for splits only (it matches the price chart). `adj_close` is also adjusted for dividends: use it for returns and backtests, `close` for the price level.

#### How are the technical indicators calculated?

All indicators are computed on the **close** (not `adj_close`) in plain code, and **300 earlier bars are fetched as warm-up** (and not returned), so every value is valid from the first row you get.

- **SMA 20 / 50 / 200**: average of the last 20, 50 or 200 closes.
- **EMA 12 / 26**: exponential average, started from the SMA of the first n closes, then `ema = prev + 2/(n+1) × (close − prev)`.
- **RSI 14**: Wilder's method: average gain and loss of 14 bars, then smoothed as `(prev × 13 + new) / 14`; `RSI = 100 − 100 / (1 + gain / loss)`.
- **MACD**: EMA 12 minus EMA 26; `macd_signal` is a 9-bar EMA of it; `macd_hist` is the difference.
- **Bollinger bands**: SMA 20 plus and minus 2 standard deviations of the last 20 closes.
- **ATR 14**: Wilder's average of the true range (the largest of high − low, and the distances from the previous close to the high and the low).
- **Pivot points** (`pivot`, `r1`-`r3`, `s1`-`s3`): the classic floor-trader levels, from the **previous bar's** high H, low L and close C: `pivot = (H+L+C)/3`, `r1 = 2×pivot − L`, `s1 = 2×pivot − H`, `r2 = pivot + (H−L)`, `s2 = pivot − (H−L)`, `r3 = H + 2×(pivot − L)`, `s3 = L − 2×(H − pivot)`.
- **Support and resistance** (`support`, `resistance` and their `_touches`): a bar is a **swing high** when its high is above the two highs before it and the two after it (a swing low is the mirror image). Of the swing points in the last 120 bars, those within half an ATR of each other (1.5% of the price when ATR is not available yet) are merged into one level: the level is their average and `touches` is how many swing points it holds. `support` is the nearest level below the close, `resistance` the nearest above; they are `null` when there is none (a stock at an all-time high has no resistance).

**Why the levels are known with a two-bar delay.** A swing point needs two bars on each side to exist, so the swing high at bar *i* can only be recognised once bar *i + 2* has closed. Each row uses only swing points that were already confirmed on that day, never later bars. A back-test that reads `support` and `resistance` on a given date therefore sees what a trader could have seen on that date (no lookahead).

#### What can I do with this data?

- 📉 **Backtesting**: clean OHLCV and `adj_close` for any strategy, with splits and dividends marked
- 📊 **Charts and dashboards**: candlesticks, volume, moving averages and Bollinger bands straight from the output
- 🔍 **Screeners**: filter on RSI below 30, a golden cross (SMA 50 over SMA 200), or price next to its support
- 💼 **Portfolio tracking**: daily closes per holding by ISIN, in the local currency
- 🤖 **Trading bots and alerts**: a daily scheduled run with the latest indicator values
- 🌍 **Cross-market comparison**: US, European, Asian and Australian shares in one dataset

#### ⚠️ Good to know

- **The source is Yahoo Finance's public chart data.** Coverage is what Yahoo has: most listed shares, ETFs, indices, currencies and futures; history length varies per symbol. Prices are not a licensed real-time feed: weekdays only, and the latest bar can still be forming while the market is open. Not for trading decisions that need exchange-grade data.
- **ISINs** are resolved through Yahoo's search to one listing (usually the home exchange). To get another listing, give its ticker (`ASML` for Nasdaq, `ASML.AS` for Amsterdam).
- **Currency**: prices are in the listing's trading currency (`currency` field). London, Johannesburg and Tel Aviv quotes are converted from pence, cents and agorot.
- **Weekly and monthly bars** are dated by Yahoo's bar start (a Monday, or the first day of the month) and the last bar can be a partial period.
- **Unknown symbols** are skipped and logged; the run only fails if none of them returns data.
- **Dividends** are Yahoo's split-adjusted amounts on the bar containing the ex-date. For payment dates and declared amounts see [EU Dividends & Splits by ISIN](https://apify.com/carabain-digital/eu-dividends).

#### Other market data Actors

| Actor | What it does |
|---|---|
| [EU Dividends & Splits by ISIN](https://apify.com/carabain-digital/eu-dividends) | Dividend history, pay dates, types and splits of European and UK shares. |
| [EU Short Positions Register](https://apify.com/carabain-digital/eu-short-positions) | Disclosed net short positions in European and UK shares from 9 regulators. |

#### Frequently asked questions

#### Can I use it with the Apify API?

Yes. Every run has a dataset you can read through the [Apify API](https://docs.apify.com/api/v2). Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("carabain-digital/stock-prices").call(run_input={
    "symbols": ["AAPL", "ASML.AS"],
    "from_date": "2025-01-01",
    "technicalIndicators": True,
})
for bar in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(bar["symbol"], bar["date"], bar["close"], bar["rsi_14"])
```

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('carabain-digital/stock-prices').call({
    symbols: ['AAPL', 'ASML.AS'],
    from_date: '2025-01-01',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'price bars');
```

#### Can I call it as a real-time API?

Yes. This Actor also runs as a **Server Actor**: send an HTTP request and get the rows back in the response, no run to start or dataset to fetch. Pass the same fields as the normal input, in the query string (repeat a key for a list) or as a JSON body:

```bash
curl "https://carabain-digital--stock-prices.apify.actor/?symbols=AAPL&symbols=7203.T&limit=10" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>"
```

The response is a JSON array of the same rows a normal run returns, billed the same way. Errors come back as `{"error": ..., "message": ...}` with status 400 (invalid input) or 502 (blocked). See the **Server** tab for details.

#### Can I use it through an MCP server or with AI agents?

Yes. Add it to an AI agent through the [Apify MCP server](https://mcp.apify.com) (`https://mcp.apify.com?tools=carabain-digital/stock-prices`), or let the agent find it with `search-actors` and run it with `call-actor`. A run for a few symbols finishes in seconds and the rows are small and flat. Example prompt: *"Use Stock Price History & Technical Indicators to get Apple's daily closes and RSI for the last 3 months."*

#### How do I keep prices up to date?

Create a **Task** with your symbols and a **From date** of a week ago, and schedule it daily. The `id` (`yahoo:<symbol>:<date>`) is stable, so you can upsert on it; the most recent bar can change until the market closes.

#### Why is `support` or `resistance` empty?

They are `null` when no level exists on that side of the close, for example at an all-time high, or when there are fewer than 5 bars of history.

#### Why do two listings of the same company have different prices?

Each listing trades on its own exchange in its own currency. Give the ticker of the listing you want.

#### Is it legal to use this data?

The Actor reads publicly visible endpoints, without a login, and returns market data, no personal data. Check Yahoo's terms for your use case, especially for commercial redistribution. More background: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

#### Not working? Feedback

Open an issue on the **Issues** tab of this Actor with the run link and the symbol, and we will look at it. Feature ideas (more indicators, more intervals) are welcome there too.

#### Other scrapers by us

| Actor | Covers |
|---|---|
| [ImmoScout24 Scraper](https://apify.com/carabain-digital/immoscout24-listings) | German real estate listings |
| [StepStone Jobs Scraper](https://apify.com/carabain-digital/stepstone-jobs) | German job postings |

⭐ **Does it work well for you?** A review on the Store page helps others find this Actor and helps us keep it maintained.

# Actor input Schema

## `symbols` (type: `array`):

Yahoo Finance tickers or ISINs, one per line, mixed is fine. Examples: `AAPL`, `MSFT`, `ASML.AS` (Amsterdam), `SAP.DE` (Xetra), `7203.T` (Tokyo), `0700.HK` (Hong Kong), `RELIANCE.NS` (India), `BHP.AX` (Australia), `SHOP.TO` (Toronto), `^GSPC` (S\&P 500), `NL0010273215` (ASML by ISIN). An ISIN is mapped to the share's primary listing. Up to 500 per run; symbols Yahoo does not know are skipped and logged.

## `interval` (type: `string`):

One row per day (`1d`), week (`1wk`) or month (`1mo`). Example: `1wk` for 5 years of weekly bars.

## `from_date` (type: `string`):

First day to return, YYYY-MM-DD. Example: `2020-01-01`. Leave empty for the last 12 months. For the full history use an early date such as `1970-01-01`: Yahoo returns everything it has (large caps go back to the 1980s or earlier).

## `to_date` (type: `string`):

Last day to return, YYYY-MM-DD. Example: `2025-12-31`. Leave empty for today.

## `technicalIndicators` (type: `boolean`):

Adds SMA 20/50/200, EMA 12/26, RSI 14, MACD (12/26/9), Bollinger bands (20, 2), ATR 14, classic pivot points with R1-R3 / S1-S3, and swing-point support and resistance levels to every row. Computed on the close, with 300 earlier bars as warm-up so the values are valid from the first row. Charged as a separate add-on event per row.

## `limit` (type: `integer`):

Stop after this many rows in total. Example: `5000`. Leave empty for all rows of all symbols.

## `proxyConfiguration` (type: `object`):

Yahoo Finance is public. The default (Apify datacenter proxy) is the cheapest; switch to Residential only if runs get blocked.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "NL0010273215",
    "7203.T"
  ],
  "interval": "1d",
  "technicalIndicators": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `prices` (type: `string`):

One row per symbol per bar, newest first per symbol.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "symbols": [
        "AAPL",
        "NL0010273215",
        "7203.T"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("carabain-digital/stock-prices").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "symbols": [
        "AAPL",
        "NL0010273215",
        "7203.T",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("carabain-digital/stock-prices").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "symbols": [
    "AAPL",
    "NL0010273215",
    "7203.T"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call carabain-digital/stock-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,carabain-digital/stock-prices"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/xoOvbEFOQuwMmrvpT/builds/UhQNNEcroCQljRjGl/openapi.json
