# Market Price Tracker: Currencies, Crypto & Stocks (`acerodario/market-price-tracker`) Actor

Track exchange rates (160+ currencies), crypto and stock prices in one run. Remembers the last price between runs and flags moves above your threshold, so scheduled runs can alert you. No API keys, no login.

- **URL**: https://apify.com/acerodario/market-price-tracker.md
- **Developed by:** [León Darío Acero Zapata](https://apify.com/acerodario) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 price quotes

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-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

## Market Price Tracker: Currencies, Crypto & Stocks with Alerts

Track **exchange rates, crypto and stock prices in one run**, and get told only when something moves.

The Actor remembers the last price of every instrument between runs, so a scheduled run can answer the question that matters: *what changed since last time?*

- **160+ currencies**: USD/EUR, EUR/GBP, USD/COP, USD/MXN, USD/BRL and any other ISO pair.
- **Crypto**: BTC, ETH, SOL and every pair listed on Coinbase Exchange, with 24h high, low and volume.
- **Stocks, indices and commodities**: AAPL, ^GSPC, GC=F (gold), CL=F (oil) and other Yahoo Finance symbols.
- **Alerts**: set a threshold (for example 2 %) and each price is flagged when it moved that much since the previous run.
- **No API keys, no login, no proxies.** Runs in a few seconds.

### What you can do with it

- Send yourself an email or Slack message when the dollar, Bitcoin or a stock moves more than X %.
- Keep a Google Sheet or database updated with daily exchange rates for invoicing or accounting.
- Feed live prices to an AI agent through the Apify MCP server.
- Build a price history: schedule the Actor and every run adds a dated row per instrument.

### Input

| Field | Example | Notes |
|---|---|---|
| `currencyPairs` | `["USD/EUR", "USD/COP"]` | BASE/QUOTE with ISO codes |
| `cryptoPairs` | `["BTC-USD", "ETH-EUR"]` | `BTC` alone means BTC-USD |
| `stockSymbols` | `["AAPL", "^GSPC", "GC=F"]` | Yahoo Finance symbols |
| `alertThresholdPercent` | `"2"` | Empty or 0 = no alerts |
| `onlyAlerts` | `true` | Save only the prices that crossed the threshold |
| `watchlistName` | `"treasury"` | Keeps the history of different schedules apart |

### Output

One item per instrument:

```json
{
  "assetType": "crypto",
  "symbol": "BTC-USD",
  "name": "BTC in USD",
  "price": 62347.1,
  "currency": "USD",
  "changePercent": -2.99,
  "previousClose": 64269.27,
  "dayHigh": 65199.37,
  "dayLow": 62202.64,
  "volume": 11630.75,
  "source": "Coinbase Exchange",
  "sourceTime": "2026-11-18T21:29:52+00:00",
  "previousRunPrice": 63900.0,
  "previousRunAt": "2026-11-18T09:00:03+00:00",
  "changeSinceLastRunPercent": -2.4302,
  "alert": true,
  "alertThresholdPercent": 2.0,
  "watchlist": "default",
  "fetchedAt": "2026-11-18T21:30:01+00:00"
}
```

- `changePercent` is the daily move reported by the source: versus the previous reference rate (currencies), the 24h open (crypto) or the previous close (stocks).
- `changeSinceLastRunPercent` compares with the price saved by the previous run of the same watchlist. It is `null` on the first run.
- A run summary (requested, resolved, alerts, warnings) is stored in the key-value store under `SUMMARY`.

### How alerts work

1. Schedule the Actor (every hour, every day, whatever you need).
2. Set `alertThresholdPercent` and turn on `onlyAlerts`.
3. Connect an integration (email, Slack, webhook, Make, n8n, Zapier) that fires when the dataset is not empty.

With `onlyAlerts` on you only pay for the prices that actually moved.

### Data sources and limits

| Asset | Source | Freshness |
|---|---|---|
| Major currencies | European Central Bank reference rates, via frankfurter.dev | Once per business day |
| Other currencies | exchangerate-api.com open endpoint | Once per day |
| Crypto | Coinbase Exchange public market data | Real time |
| Stocks, indices, commodities | Yahoo Finance public chart data | Delayed quotes, depends on the exchange |

- Currency rates are daily reference rates, not live trading quotes.
- Symbols that cannot be resolved are skipped, listed in the log and in `SUMMARY`, and **not charged**.
- Up to 500 instruments per run.
- Prices are provided for information only. Do not use them as the sole basis for trading decisions.

Rates By [Exchange Rate API](https://www.exchangerate-api.com).

# Actor input Schema

## `currencyPairs` (type: `array`):

Exchange rates to track, written as BASE/QUOTE with ISO codes, e.g. USD/EUR, EUR/GBP, USD/COP, USD/MXN. 160+ currencies supported.

## `cryptoPairs` (type: `array`):

Crypto prices to track, e.g. BTC-USD, ETH-USD, SOL-EUR. A coin without a quote currency (BTC) is priced in USD.

## `stockSymbols` (type: `array`):

Yahoo Finance symbols, e.g. AAPL, MSFT, ^GSPC (S\&P 500), GC=F (gold), CL=F (crude oil), EC (Ecopetrol).

## `alertThresholdPercent` (type: `string`):

Flag a price as an alert when it moved at least this much (up or down) since the previous run of the same watchlist. On the first run the daily change is used. Leave empty or 0 for no alerts. Decimals allowed, e.g. 0.5.

## `onlyAlerts` (type: `boolean`):

Save (and pay for) only the prices that crossed the alert threshold. Useful for scheduled runs connected to email, Slack or a webhook.

## `watchlistName` (type: `string`):

Prices are remembered per watchlist, so different schedules do not mix their history.

## Actor input object example

```json
{
  "currencyPairs": [
    "USD/EUR",
    "EUR/GBP",
    "USD/JPY",
    "USD/MXN"
  ],
  "cryptoPairs": [
    "BTC-USD",
    "ETH-USD"
  ],
  "onlyAlerts": false,
  "watchlistName": "default"
}
```

# Actor output Schema

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

Current price, daily change and change since the previous run for each instrument.

# 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 = {
    "currencyPairs": [
        "USD/EUR",
        "EUR/GBP",
        "USD/JPY",
        "USD/MXN"
    ],
    "cryptoPairs": [
        "BTC-USD",
        "ETH-USD"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("acerodario/market-price-tracker").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 = {
    "currencyPairs": [
        "USD/EUR",
        "EUR/GBP",
        "USD/JPY",
        "USD/MXN",
    ],
    "cryptoPairs": [
        "BTC-USD",
        "ETH-USD",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("acerodario/market-price-tracker").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 '{
  "currencyPairs": [
    "USD/EUR",
    "EUR/GBP",
    "USD/JPY",
    "USD/MXN"
  ],
  "cryptoPairs": [
    "BTC-USD",
    "ETH-USD"
  ]
}' |
apify call acerodario/market-price-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,acerodario/market-price-tracker"
        }
    }
}
```

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/QExLsSMvadPXja7lc/builds/Fz6irN8Gbi8bkFf9V/openapi.json
