# TickerLayer Market Data API (`tickerlayer/tickerlayer-market-data`) Actor

Live quotes, snapshots, OHLCV history, symbol catalogs, market hours, bond yields and stock fundamentals for stocks, forex, crypto, indices, ETFs and commodities. One API key, one schema, no scraping.

- **URL**: https://apify.com/tickerlayer/tickerlayer-market-data.md
- **Developed by:** [TickerLayer](https://apify.com/tickerlayer) (community)
- **Categories:** Developer tools, Integrations, Automation
- **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 row (snapshot, quote, trade, bar, bond, market status)s

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

## TickerLayer Market Data API

Stop scraping finance sites. This Actor pulls **live and historical market data straight from the TickerLayer API**: stocks, forex, crypto, indices, ETFs, commodities, government bond yields and stock fundamentals, all through one API key and one consistent schema.

No headless browser, no proxies, no HTML that breaks next week. Every run is a handful of clean JSON calls, and the rows land in your dataset ready for a sheet, a database or the next Actor in your pipeline.

- **Free to start.** Every TickerLayer account gets 3,000 REST requests per month with no card. Sign up at [tickerlayer.com/signup](https://tickerlayer.com/signup) and copy the key from the dashboard.
- **Seven asset classes.** Crypto, forex, stocks, indices, ETFs, commodities and bonds share the same symbol, quote, snapshot and OHLCV shapes.
- **Honest data positioning.** TickerLayer serves derived, indicative, non-exchange-sourced market data through its own aggregation layer, with published [data quality benchmarks](https://tickerlayer.com/data-quality) instead of marketing claims.

### What you can fetch

| Operation | What comes back | Typical use |
| --- | --- | --- |
| `snapshot` | Last price, bid/ask, previous close, change and change percent per symbol | Watchlists, dashboards, "how is X doing" |
| `quote` | Latest bid/ask with sizes | Spread monitoring |
| `last_trade` | Most recent trade price, size and time | Tick-level checks |
| `previous_bar` | Previous daily bar, or the most recently settled 1m/5m/15m/1h/4h bar | Closing prices, deterministic bar audits |
| `history` | OHLCV bars between two dates at 1m, 5m, 15m, 1h, 4h or 1d, paged automatically | Backtests, charts, exports |
| `symbols` | The full catalog for one asset class | Discover what is covered before you ask for it |
| `market_status` | Open/closed, current phase, next open and next close for a market or symbol, or a global overview | Gating jobs on trading hours |
| `market_sessions` | Pre-market, primary and post-market windows for one day | Scheduling |
| `market_holidays` | Holiday calendar for a market and year, one row per holiday | Calendar tables |
| `bond_yield` | Latest government bond yield with previous observation and change in basis points | Rates dashboards |
| `fundamentals` | Company profile and share structure: float, shares outstanding, short interest, ownership, average volumes | Screening US, DE, ES and FR stocks |

### Symbols

Symbol formats follow the TickerLayer conventions, so the same list works on the API and on this Actor:

| Asset class | Format | Examples |
| --- | --- | --- |
| Crypto | concatenated pair | `BTCUSD`, `ETHUSD`, `SOLUSD` |
| Forex | concatenated pair | `EURUSD`, `GBPJPY`, `USDTRY` |
| Commodities | reference code | `XAUUSD`, `XAGUSD`, `WTIUSD`, `BRENTUSD`, `NATGASUSD` |
| Indices | bare code, no market prefix | `US500`, `US100`, `US30`, `DE40`, `JP225`, `HK33`, `KOR200` |
| ETFs | ticker | `SPY`, `QQQ`, `US500ETF` |
| Stocks | `COUNTRY:TICKER`, always with the ISO country prefix | `US:KO`, `US:JNJ`, `DE:BMW`, `GB:HSBA`, `TR:THYAO`, `SA:2222` |
| Bonds | `COUNTRY:TENOR` | `US:10Y`, `US:2Y`, `US:3M`, `DE:10Y`, `UK:10Y` |

A bare stock ticker like `KO` is rejected before any request is made. Run the `symbols` operation, or browse [tickerlayer.com/symbols](https://tickerlayer.com/symbols), when you are not sure a symbol is covered.

### Two ways to run it

**Bring your own key (free on Apify).** Put your TickerLayer API key in `apiKey`. Nothing is charged through Apify; your own TickerLayer plan and quota apply, starting with the free tier of 3,000 requests per month.

**No key, pay per event.** Leave `apiKey` empty and the Actor runs through a shared TickerLayer key. You pay from your Apify balance only for what you receive:

| Event | Charged for | Price |
| --- | --- | --- |
| `price-row` | One dataset row from snapshot, quote, last\_trade, previous\_bar, bond\_yield, market\_status, market\_sessions or market\_holidays | $0.002 per row ($2 per 1,000) |
| `history-request` | One history request, up to 5,000 OHLCV bars | $0.01 per request |
| `catalog-request` | One symbols request, the full catalog of an asset class | $0.01 per request |
| `fundamentals-row` | One company in a fundamentals result | $0.005 per row |

Error rows are never charged. Set a maximum total charge on the run and the Actor stops cleanly when it is reached; rows are only charged after they are saved to your dataset. Shared runs use at most 4 parallel requests. For large or recurring workloads your own key is far cheaper: see [pricing](https://tickerlayer.com/pricing).

### Input

| Field | Type | Notes |
| --- | --- | --- |
| `apiKey` | string, secret | Your TickerLayer API key. Stored encrypted by Apify and only ever sent to `api.tickerlayer.com`. Empty means a pay-per-event run through the shared key, see above. |
| `operation` | enum | One of the operations above. Default `snapshot`. |
| `assetClass` | enum | `crypto`, `forex`, `stocks`, `indices`, `etfs`, `commodities`. Default `crypto`. Ignored by `bond_yield` and `fundamentals`. |
| `symbols` | string list | One symbol per line. Leave empty for `symbols`, for the market calendar operations, or to page a whole `fundamentals` market. |
| `interval` | enum | Bar size for `history` and `previous_bar`. Default `1d`. |
| `from`, `to` | `YYYY-MM-DD` | UTC date range for `history`, inclusive. Defaults to the last 30 days. |
| `maxBars` | integer | Cap on bars per symbol for `history`. Default 500. Larger ranges are paged 5,000 bars at a time. |
| `sort` | enum | `asc` (default) or `desc` for `history`. |
| `market` | string | Market code for the calendar operations and `fundamentals` paging: `US`, `DE`, `GB`, `JP`, `SA`, or `CRYPTO`, `FOREX`, `COMMODITIES`. |
| `date` | `YYYY-MM-DD` | Day for `market_sessions`. Defaults to today. |
| `year` | integer | Year for `market_holidays`. Defaults to the current year. |
| `maxConcurrency` | integer | Parallel requests, 1 to 10. Default 4, which stays under the free-tier limit of 10 requests per second. Shared-key runs are capped at 4. |
| `continueOnError` | boolean | Default `true`: a symbol that fails becomes an error row and the run continues. Set `false` to fail the run on the first error. |

Example input for a stock watchlist:

```json
{
  "apiKey": "px_your_key",
  "operation": "snapshot",
  "assetClass": "stocks",
  "symbols": ["US:KO", "US:JNJ", "US:XOM", "DE:BMW", "GB:HSBA"]
}
```

Example input for one month of hourly gold bars:

```json
{
  "apiKey": "px_your_key",
  "operation": "history",
  "assetClass": "commodities",
  "symbols": ["XAUUSD"],
  "interval": "1h",
  "from": "2026-08-01",
  "to": "2026-08-31",
  "maxBars": 1000
}
```

### Output

Every row carries the same envelope, so one dataset can mix operations and still be filtered: `operation`, `asset_class`, `symbol`, `fetched_at` (ISO 8601, UTC) and `source`. The response fields follow, exactly as the API returns them, plus a `time` field with the event timestamp rendered as ISO 8601 where the API gives Unix milliseconds.

Snapshot row:

```json
{
  "operation": "snapshot",
  "asset_class": "stocks",
  "symbol": "US:KO",
  "bid": 88.43,
  "ask": 88.59,
  "bid_size": 100,
  "ask_size": 100,
  "last_price": 88.52,
  "last_size": 191,
  "last_timestamp": 1789555131697,
  "prev_close": 88.71,
  "change": -0.19,
  "change_percent": -0.2142,
  "time": "2026-09-16T10:38:51.697Z",
  "fetched_at": "2026-09-16T10:46:28.883Z",
  "source": "tickerlayer"
}
```

History row (one per bar):

```json
{
  "operation": "history",
  "asset_class": "forex",
  "symbol": "EURUSD",
  "interval": "1h",
  "o": 1.15942,
  "h": 1.15958,
  "l": 1.15852,
  "c": 1.15865,
  "v": null,
  "t": 1789344000000,
  "time": "2026-09-14T00:00:00.000Z",
  "fetched_at": "2026-09-16T10:46:42.995Z",
  "source": "tickerlayer"
}
```

Bond yield row:

```json
{
  "operation": "bond_yield",
  "asset_class": "bonds",
  "symbol": "US:10Y",
  "rate": 5,
  "unit": "percent",
  "date": "2026-09-15",
  "prev_rate": 4.97,
  "prev_date": "2026-09-14",
  "change": 0.03,
  "change_bps": 3,
  "change_percent": 0.6036,
  "time": "2026-09-15T00:00:00.000Z",
  "fetched_at": "2026-09-16T10:46:43.581Z",
  "source": "tickerlayer"
}
```

A symbol that fails is written as an error row instead of silently disappearing:

```json
{
  "operation": "snapshot",
  "asset_class": "stocks",
  "symbol": "US:NOPE",
  "error_status": 404,
  "error_message": "Not found: unknown symbol or route (symbol not available). Run the symbols operation or check https://tickerlayer.com/symbols",
  "fetched_at": "2026-09-16T10:46:29.115Z",
  "source": "tickerlayer"
}
```

The run also stores a summary in the key-value store under `OUTPUT`: job counts, rows written, the API requests used and every error with its status.

### Requests and quota

The Actor makes one API request per symbol for the price operations, one per 5,000 bars for `history`, one per 100 symbols for `fundamentals`, and one per market or symbol for the calendar operations. The `OUTPUT` record shows the exact count after each run so you can plan against your monthly quota. Rate limits are respected: a `429` is retried with backoff, and a `403` means the plan does not include that asset class, so the row explains it instead of retrying.

### Errors you may see

| Status | Meaning | What to do |
| --- | --- | --- |
| 401 | API key missing or invalid | Copy the key again from [the dashboard](https://tickerlayer.com/dashboard). The run stops immediately. |
| 403 | The plan does not include this asset class or feature | See [pricing](https://tickerlayer.com/pricing). |
| 404 | Unknown symbol | Check the format table above or run `symbols`. |
| 429 | Rate limit | Lower `maxConcurrency` or upgrade. |

### Beyond this Actor

- REST base URL `https://api.tickerlayer.com` and WebSocket streaming at `wss://stream.tickerlayer.com` for tick-by-tick updates: [documentation](https://tickerlayer.com/docs)
- Complete endpoint reference written for AI agents: [tickerlayer.com/llms-full.txt](https://tickerlayer.com/llms-full.txt)
- Hosted MCP server for Claude, ChatGPT, Cursor and other agents: [tickerlayer.com/mcp](https://tickerlayer.com/mcp)
- Measured price fidelity and freshness per asset class: [Data Quality and Benchmarks](https://tickerlayer.com/data-quality)

### Data positioning

TickerLayer provides derived, indicative, non-exchange-sourced market data for informational and technical use. It is not a broker, exchange, trading venue, investment adviser or execution platform, and it does not provide official exchange data. Data may be delayed, estimated or differ from official market prices. You are responsible for checking that the data fits your use case, including licensing and redistribution. See the [market data disclaimer](https://tickerlayer.com/market-data-disclaimer).

# Actor input Schema

## `apiKey` (type: `string`):

Your TickerLayer API key (starts with px\_). Create one for free at https://tickerlayer.com/dashboard. Stored encrypted and only sent to api.tickerlayer.com. With your own key nothing is charged through Apify. Leave empty to use the shared key and pay per row or request from your Apify balance (see the pricing table in the README).

## `operation` (type: `string`):

What to fetch. Snapshot is the best single call for "how is X doing": last trade, bid/ask, previous close and change.

## `assetClass` (type: `string`):

Asset class of the symbols. Ignored for bond\_yield and fundamentals.

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

One symbol per line. Crypto and forex are concatenated pairs (BTCUSD, EURUSD). Commodities use reference codes (XAUUSD, WTIUSD). Indices use bare codes (US500, DE40, JP225). ETFs use their ticker (SPY, US500ETF). Stocks ALWAYS carry the ISO country prefix: US:KO, DE:BMW, GB:HSBA, SA:2222. Bonds use COUNTRY:TENOR (US:10Y, DE:2Y). Leave empty for symbols, market\_\* operations, or to page a whole fundamentals market.

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

Bar size for history and previous\_bar. For previous\_bar, 1d returns the previous daily bar and any other value returns the most recently settled intraday bar.

## `from` (type: `string`):

Start date for history, YYYY-MM-DD, inclusive. Defaults to 30 days before "to".

## `to` (type: `string`):

End date for history, YYYY-MM-DD, inclusive. Defaults to today (UTC).

## `maxBars` (type: `integer`):

Cap on bars returned per symbol for history. Larger ranges are paged automatically, 5,000 bars per request.

## `sort` (type: `string`):

Order of history bars by time.

## `market` (type: `string`):

Market for market\_status, market\_sessions, market\_holidays and fundamentals paging. Stock markets are ISO country codes (US, DE, GB, JP, SA). Use CRYPTO, FOREX or COMMODITIES for those calendars. Leave empty on market\_status for the global overview.

## `date` (type: `string`):

Day for market\_sessions, YYYY-MM-DD. Defaults to today.

## `year` (type: `integer`):

Calendar year for market\_holidays. Defaults to the current year.

## `maxConcurrency` (type: `integer`):

Parallel requests to the API. Free TickerLayer keys allow 10 requests per second, so 4 is a safe default. Runs on the shared key are capped at 4.

## `continueOnError` (type: `boolean`):

When on, a symbol that fails (unknown symbol, plan does not include it) is written to the dataset as an error row and the run continues. When off, the run fails on the first error.

## Actor input object example

```json
{
  "operation": "snapshot",
  "assetClass": "crypto",
  "symbols": [
    "BTCUSD",
    "ETHUSD",
    "SOLUSD"
  ],
  "interval": "1d",
  "maxBars": 500,
  "sort": "asc",
  "market": "US",
  "maxConcurrency": 4,
  "continueOnError": true
}
```

# Actor output Schema

## `rows` (type: `string`):

Dataset items: operation, asset\_class, symbol, the API response fields, time (ISO 8601), fetched\_at and source. Failed symbols carry error\_status and error\_message.

## `summary` (type: `string`):

Job counts, rows written, API requests used and every error with its status.

# 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 = {
    "operation": "snapshot",
    "assetClass": "crypto",
    "symbols": [
        "BTCUSD",
        "ETHUSD",
        "SOLUSD"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tickerlayer/tickerlayer-market-data").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 = {
    "operation": "snapshot",
    "assetClass": "crypto",
    "symbols": [
        "BTCUSD",
        "ETHUSD",
        "SOLUSD",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("tickerlayer/tickerlayer-market-data").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 '{
  "operation": "snapshot",
  "assetClass": "crypto",
  "symbols": [
    "BTCUSD",
    "ETHUSD",
    "SOLUSD"
  ]
}' |
apify call tickerlayer/tickerlayer-market-data --silent --output-dataset

```

## MCP server setup

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

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/sJTFizgdQANU1TERP/builds/UmOyKDVt5GzfkeAM0/openapi.json
