# Stock Crypto Forex FX Rates Quotes Ticker API (`gaivin/global-markets-stocks-crypto-fx`) Actor

Stock quotes, cryptocurrency prices and foreign exchange rates in one flat dataset. US stocks, BTC and ETH, major currency pairs, all in one run. No API key needed.

- **URL**: https://apify.com/gaivin/global-markets-stocks-crypto-fx.md
- **Developed by:** [duan jiayun](https://apify.com/gaivin) (community)
- **Categories:** Business, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/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

## Global Markets Scraper — Stocks, Crypto & FX

Get **US, Hong Kong and global stock / index quotes**, **top cryptocurrency prices** and **live foreign-exchange rates** in a single flat dataset.

Free public endpoints only. **No API key. No login. No rate-limit signup.**

### Why this Actor

Three separate integrations (equities + crypto + FX) normally means three API keys, three schemas and three bills. This Actor returns **one dataset with one schema** so you can pipe it straight into a sheet, a dashboard, a trading bot or an LLM agent.

Useful for:

- Portfolio and watchlist monitoring
- Market snapshot generation for reports and newsletters
- LLM / AI agent tooling that needs live prices
- FX and crypto arbitrage screening

### Quick start

Paste this into the Input tab and hit **Start** — no configuration needed.

```json
{"symbols": ["AAPL", "BTC", "EUR"], "limit": 20}
```

That gives you 股价 + 加密货币 + 汇率 in one run.

Or from the command line:

```bash
curl -X POST "https://api.apify.com/v2/acts/gaivin~global-markets-stocks-crypto-fx/runs?token=YOUR_TOKEN"   -H "Content-Type: application/json"   -d '{"symbols": ["AAPL", "BTC", "EUR"], "limit": 20}'
```

### What you get

Every row shares the same flat shape:

| Field | Type | Meaning |
|---|---|---|
| `source` | string | `stocks`, `crypto` or `fx` |
| `type` | string | `quote`, `coin` or `rate` |
| `title` | string | Human-readable label, e.g. `Apple Inc. (AAPL)` or `USD/CNY` |
| `score` | number | The price / rate — this is the value you usually want |
| `url` | string | Canonical page for the instrument |
| `extra` | string | Change, %, volume, market cap, 24h range, currency, exchange |
| `scraped_at` | string | ISO 8601 UTC timestamp |

#### Example rows

```json
{
  "source": "stocks",
  "type": "quote",
  "title": "Apple Inc. (AAPL)",
  "score": 342.37,
  "url": "https://finance.yahoo.com/quote/AAPL",
  "extra": "change=-1.8 change_pct=-0.523 prev_close=344.17 volume=43750861 currency=USD exchange=NMS",
  "scraped_at": "2026-11-07T14:02:11Z"
}
```

```json
{
  "source": "fx",
  "type": "rate",
  "title": "USD/CNY",
  "score": 6.6713,
  "url": "https://www.frankfurter.app/latest?from=USD&to=CNY",
  "extra": "base=USD quote=CNY date=2026-11-06 provider=ECB",
  "scraped_at": "2026-11-07T14:02:11Z"
}
```

```json
{
  "source": "crypto",
  "type": "coin",
  "title": "Bitcoin (BTC)",
  "score": 75900,
  "url": "https://www.coingecko.com/en/coins/bitcoin",
  "extra": "market_cap=1526272432444 rank=1 volume_24h=... change_24h=... high_24h=... low_24h=... ath=... currency=usd",
  "scraped_at": "2026-11-07T14:02:11Z"
}
```

### Data sources

| Source | Provider | What it covers |
|---|---|---|
| `stocks` | Yahoo Finance | US equities, Hong Kong equities, world indices |
| `crypto` | CoinGecko | Top coins by market cap, with 24h stats and all-time high |
| `fx` | Frankfurter (ECB) | Official European Central Bank reference rates, ~30 currencies |

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `sources` | array | all three | `stocks`, `crypto`, `fx` |
| `symbols` | array | 28 major names | Yahoo tickers. `AAPL` US, `0700.HK` Hong Kong, `^GSPC` index |
| `cryptoLimit` | integer | `20` | How many coins, 1–250 |
| `vsCurrency` | string | `usd` | Crypto quote currency: `usd`, `eur`, `cny`, `jpy`… |
| `fxBase` | string | `USD` | Base currency for exchange rates |
| `fxTargets` | array | 12 majors | Quote currencies; leave empty for all ECB currencies |

#### Symbol cheat sheet

| Kind | Format | Examples |
|---|---|---|
| US stock | plain ticker | `AAPL`, `MSFT`, `TSLA`, `NVDA` |
| Hong Kong | `.HK` suffix | `0700.HK` (Tencent), `9988.HK` (Alibaba) |
| Index | leading `^` | `^GSPC` S\&P 500, `^IXIC` Nasdaq, `^HSI` Hang Seng, `^N225` Nikkei |

### Output size and cost

Default run ≈ **60 rows** (29 stock quotes + 20 coins + 12 FX pairs).

Pricing: **$0.03 per Actor start** + **$2.00 per 1,000 results**.
A default run costs roughly **$0.15**. Platform usage included — no separate compute charge.

### Notes

- All endpoints are public and key-free.
- A single failing symbol does not break the run; check the log for `[stock SYM] failed`.
- Crypto and FX endpoints are rate-limited upstream. Keep `cryptoLimit` reasonable and avoid very frequent scheduled runs.
- Quotes reflect the most recent trading session; `scraped_at` tells you when the snapshot was taken.

### Related Actors

More public-data Actors by the same author. All use the same flat schema (`source`, `type`, `title`, `score`, `url`, `extra`, `scraped_at`), so datasets from different Actors can be concatenated directly.

**China data**

- [`china-market-trend-pulse`](https://apify.com/gaivin/china-market-trend-pulse) — Douyin hot search and e-commerce boards, Weibo trends, plus A-share index quotes in one run.
- [`china-tech-news-trends`](https://apify.com/gaivin/china-tech-news-trends) — ITHome, SSPAI, V2EX and Baidu hot search — what Chinese tech is actually reading today.
- [`china-trending-aggregator`](https://apify.com/gaivin/china-trending-aggregator) — Zhihu hot search, Bilibili rankings and Douban hot lists — the Chinese internet's front page.
- [`cn-entertainment-trends`](https://apify.com/gaivin/cn-entertainment-trends) — Douban movie/TV/variety rankings with live ratings + Bilibili hot videos, rankings, hot search and creator cards.

**AI and research**

- [`ai-model-radar-huggingface-openrouter`](https://apify.com/gaivin/ai-model-radar-huggingface-openrouter) — HuggingFace trending models, datasets and spaces plus live OpenRouter and LiteLLM token pricing.
- [`ai-research-papers-arxiv`](https://apify.com/gaivin/ai-research-papers-arxiv) — Newest arXiv papers in cs.AI, cs.LG and cs.CL with authors, abstracts and categories.

**Developer tools**

- [`developer-pulse-hn-devto-github`](https://apify.com/gaivin/developer-pulse-hn-devto-github) — Hacker News top stories, Dev.to trending articles and GitHub trending repos in one run.
- [`open-source-dependency-health`](https://apify.com/gaivin/open-source-dependency-health) — OSV vulnerabilities pinned to your exact version, plus npm/PyPI downloads and deps.dev release status.

**News and trends**

- [`world-news-pulse-bbc-guardian-npr`](https://apify.com/gaivin/world-news-pulse-bbc-guardian-npr) — BBC, Guardian, Al Jazeera and NPR headlines in one deduplicated dataset.

**Business and lifestyle**

- [`app-store-steam-tracker`](https://apify.com/gaivin/app-store-steam-tracker) — iTunes top charts and Steam specials, top sellers and new releases, with FX conversion.
- [`books-research-tracker`](https://apify.com/gaivin/books-research-tracker) — Open Library trending books and search, newest Crossref articles and bioRxiv/medRxiv preprints.
- [`podcast-youtube-tracker`](https://apify.com/gaivin/podcast-youtube-tracker) — iTunes podcast charts, podcast RSS episodes and YouTube channel feeds in one schema.
- [`remote-jobs-aggregator`](https://apify.com/gaivin/remote-jobs-aggregator) — Five job boards (Remotive, Arbeitnow, Jobicy, Himalayas, RemoteOK) in one searchable dataset.
- [`startup-vc-signal-tracker`](https://apify.com/gaivin/startup-vc-signal-tracker) — YC company directory, Crunchbase and TechCrunch funding news, Show HN launches and Lobsters.
- [`weather-air-quality-monitor`](https://apify.com/gaivin/weather-air-quality-monitor) — Multi-city weather forecast, PM2.5/AQI, sunrise and sunset, plus live ISS position.

> Running any of these? Open an issue on the Actor page — feature requests shape the roadmap.

# Actor input Schema

## `sources` (type: `array`):

Which market data to collect: 'stocks' for equities and indices, 'crypto' for cryptocurrencies, 'fx' for foreign-exchange rates. Leave the default to get all three in one run.

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

Yahoo Finance ticker symbols. Use plain tickers for US stocks (AAPL, MSFT), a .HK suffix for Hong Kong (0700.HK), and a leading ^ for indices (^GSPC, ^HSI). Defaults to 28 major US, HK and global names.

## `cryptoLimit` (type: `integer`):

How many top coins by market cap to return. Between 1 and 250.

## `vsCurrency` (type: `string`):

Fiat currency that crypto prices are quoted in. Any ISO code supported by CoinGecko, e.g. usd, eur, cny, jpy.

## `fxBase` (type: `string`):

Base currency for exchange rates, e.g. USD, EUR, CNY. Rates are expressed as 1 unit of base = X units of quote.

## `fxTargets` (type: `array`):

Quote currencies to fetch against the base, e.g. EUR, GBP, JPY, CNY, HKD. Leave empty to return every currency the ECB publishes.

## Actor input object example

```json
{
  "sources": [
    "stocks",
    "crypto",
    "fx"
  ],
  "symbols": [
    "AAPL",
    "MSFT",
    "GOOGL",
    "AMZN",
    "NVDA",
    "META",
    "TSLA",
    "0700.HK",
    "9988.HK",
    "^GSPC",
    "^IXIC",
    "^HSI"
  ],
  "cryptoLimit": 20,
  "vsCurrency": "usd",
  "fxBase": "USD",
  "fxTargets": [
    "EUR",
    "GBP",
    "JPY",
    "CNY",
    "HKD",
    "AUD",
    "CAD",
    "CHF",
    "KRW",
    "INR"
  ]
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset with one row per market data point.

# 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 = {
    "sources": [
        "stocks",
        "crypto",
        "fx"
    ],
    "symbols": [
        "AAPL",
        "MSFT",
        "GOOGL",
        "AMZN",
        "NVDA",
        "META",
        "TSLA",
        "0700.HK",
        "9988.HK",
        "^GSPC",
        "^IXIC",
        "^HSI"
    ],
    "fxTargets": [
        "EUR",
        "GBP",
        "JPY",
        "CNY",
        "HKD",
        "AUD",
        "CAD",
        "CHF",
        "KRW",
        "INR"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gaivin/global-markets-stocks-crypto-fx").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 = {
    "sources": [
        "stocks",
        "crypto",
        "fx",
    ],
    "symbols": [
        "AAPL",
        "MSFT",
        "GOOGL",
        "AMZN",
        "NVDA",
        "META",
        "TSLA",
        "0700.HK",
        "9988.HK",
        "^GSPC",
        "^IXIC",
        "^HSI",
    ],
    "fxTargets": [
        "EUR",
        "GBP",
        "JPY",
        "CNY",
        "HKD",
        "AUD",
        "CAD",
        "CHF",
        "KRW",
        "INR",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("gaivin/global-markets-stocks-crypto-fx").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 '{
  "sources": [
    "stocks",
    "crypto",
    "fx"
  ],
  "symbols": [
    "AAPL",
    "MSFT",
    "GOOGL",
    "AMZN",
    "NVDA",
    "META",
    "TSLA",
    "0700.HK",
    "9988.HK",
    "^GSPC",
    "^IXIC",
    "^HSI"
  ],
  "fxTargets": [
    "EUR",
    "GBP",
    "JPY",
    "CNY",
    "HKD",
    "AUD",
    "CAD",
    "CHF",
    "KRW",
    "INR"
  ]
}' |
apify call gaivin/global-markets-stocks-crypto-fx --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gaivin/global-markets-stocks-crypto-fx"
        }
    }
}
```

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/3J0mypBkpQv8Sup1S/builds/oBtDBPXd8otwvEy7P/openapi.json
