canonical: https://jentic.com/apis/marketstack.com/marketstack

# Marketstack API

APILayer, which operates Marketstack, publishes its own OpenAPI specification on SwaggerHub at `https://api.swaggerhub.com/apis/apilayer-863/MarketstackAPIv2/2.0.0/swagger.json`, and that document is canonical: it describes the v2 API on api.marketstack.com/v2. The spec behind this entry is a curated, agent-optimized Jentic variant of the earlier v1 surface on api.marketstack.com/v1, which Marketstack has since deprecated in favour of v2, so treat it as a legacy view rather than the full current surface. Marketstack provides historical and real-time stock market data covering 70+ global exchanges, including end-of-day prices, intraday quotes, ticker metadata, dividends, splits, and currency or timezone reference data. The API is designed for finance applications, research notebooks, and AI agents that need normalized OHLCV data without scraping individual exchange feeds. Authentication uses a single `access_key` query parameter on every request.

## For AI agents

Pull end-of-day and intraday stock prices, list tickers and exchanges, and look up dividends or splits across 70+ global stock exchanges in normalized JSON.

## Scope

All 18 operations in this spec are read-only market-data lookups covering end-of-day and intraday prices, tickers, exchanges, dividends, splits, currencies and timezones, with no write, order-entry, account or portfolio operations, and they describe the deprecated v1 surface rather than the current v2 API.

## Capabilities

- Retrieve end-of-day OHLCV data for one or more tickers across global exchanges
- Pull intraday quotes for US tickers on the IEX exchange, with intervals below 15 minutes on the Professional plan or higher
- Look up ticker metadata including exchange, name, and symbol mappings
- Fetch dividend history and stock split events for any listed ticker
- List supported exchanges, currencies, and timezones for normalisation
- Query historical end-of-day prices on a specific date for backtesting

## Use cases

### Quantitative Backtesting

Quant researchers and individual traders need clean OHLCV data for backtesting strategies. Marketstack returns normalized end-of-day prices in JSON for tickers across 70+ exchanges, removing the need to maintain per-exchange ingestion code. A typical backtest pulls 5-10 years of EOD bars for a basket of tickers in a single batch request loop.

Example prompt: Call `GET /eod` with `symbols=AAPL,MSFT,GOOG` and `date_from=2024-01-01&date_to=2024-12-31` and return a daily close-price series.

### Portfolio Dashboard Refresh

Personal finance dashboards and fintech apps display the latest closing price and daily change for each holding. Marketstack's `/eod/latest` endpoint returns the most recent EOD bar across requested symbols in a single call, and `/intraday/latest` handles same-day moves during market hours. Dashboards typically refresh every 5-15 minutes.

Example prompt: Call `GET /eod/latest?symbols=NVDA,AMD` and compute the percentage change vs the previous close.

### Corporate Actions Tracking

Investment platforms need to adjust positions for dividends and splits to keep cost basis correct. Marketstack exposes dedicated `/dividends` and `/splits` endpoints filtered by symbol and date range so reconciliation jobs can detect new corporate actions and apply adjustments to historical price series.

Example prompt: Call `GET /dividends?symbols=KO&date_from=2025-01-01` and reconcile the dividend payments against the holdings ledger.

### AI Agent Market Research

An AI investment assistant can use Jentic to call Marketstack on demand when a user asks about a stock's recent performance or dividend history. Jentic stores the `access_key` securely and exposes Marketstack operations behind intent-based search, so the agent never embeds the key in a prompt or source file.

Example prompt: Search Jentic for 'get latest stock price', load the Marketstack `/eod/latest` schema, and execute it for symbol 'TSLA' to answer the user's question.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /eod | End-of-day OHLCV data for one or more tickers |
| GET | /eod/latest | Latest available end-of-day bar |
| GET | /intraday | Intraday quotes for US tickers on the IEX exchange |
| GET | /tickers | List or search tickers |
| GET | /dividends | Dividend history for tickers |
| GET | /splits | Stock split history for tickers |
| GET | /exchanges | List supported stock exchanges |

## Key resources

- **End-of-Day** — Daily OHLCV bars for global tickers, with date-range and latest-bar lookups.
- **Intraday** — Intraday quotes for US tickers on the IEX exchange; intervals below 15 minutes require the Professional plan or higher.
- **Tickers** — Search and look up ticker metadata across exchanges.
- **Dividends** — Dividend payment history per ticker.
- **Splits** — Stock split events per ticker.
- **Reference Data** — Lists of exchanges, currencies, and timezones.

## Why Jentic

- **Setup:** Wiring Marketstack by hand means appending its access_key query parameter, learning the /eod, /intraday, /tickers, and corporate-action paths, and paging results yourself. Through Jentic you install once, import the Marketstack API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The Marketstack endpoints are read-only price and reference lookups, so scoping is by operation: you limit the agent to the operations it needs, such as fetching end-of-day prices, intraday data, or ticker dividends, and leave out the rest. Every operation you allow is one you have chosen, so the agent stays inside that set.
- **Credential handling:** Your Marketstack access key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get end of day stock price' or 'list ticker dividends', and Jentic returns the matching Marketstack operation with its query schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Polygon.io API** — Polygon.io is a higher-throughput market data API with full real-time NBBO feeds.
- **Finnhub API** — Finnhub provides stock market data plus fundamentals and alternative data feeds.
- **Alpha Vantage API** — Alpha Vantage offers free historical and intraday stock data with technical indicators.
- **Tiingo API** — Tiingo provides end-of-day equity prices alongside news feeds.

## FAQ

### Is there a Marketstack MCP server?

You do not need an MCP server to give your agent Marketstack. Jentic connects it directly from the API Directory: import Marketstack, store your access key once, and your agent can pull end-of-day prices, intraday quotes, dividends and splits, with no extra tool definitions loaded into its context.

### What authentication does the Marketstack API use?

Marketstack uses an `access_key` query-string parameter on every request. Through Jentic, the key is stored encrypted in your Jentic One instance and injected at execution time so the agent never sees the raw value.

### Can I get intraday stock prices with the Marketstack API?

Yes, for US tickers. Marketstack's documentation states that intraday prices are available for all US stock tickers included in the IEX (Investors Exchange) stock exchange. The `GET /intraday` endpoint returns those quotes and `GET /intraday/latest` returns the most recent intraday bar. Marketstack also states that data frequency intervals below 15 minutes are only supported on the Professional Plan or higher, so 1-minute granularity depends on your plan.

### What are the rate limits for the Marketstack API?

Marketstack meters usage as a monthly request quota set by plan. The Free plan includes 100 market data API requests per month, supporting end-of-day data as well as up to 12 months of history. The quotas attached to the paid plans are listed on the Marketstack pricing page.

### How do I fetch end-of-day prices through Jentic?

Install self-hosted Jentic One and register your agent, then search the API Directory by intent for 'get end of day stock price'. Jentic returns the `/eod` operation schema and your agent executes it with the tickers and date range you want, with no manual auth wiring.

### Does the Marketstack API cover non-US exchanges?

Yes. Marketstack covers 70+ global stock exchanges. Use `GET /exchanges` to enumerate them and pass the appropriate MIC code via the `exchange` parameter on price queries.

### Can I limit what my agent is allowed to do with the Marketstack API?

Yes. Because you run Jentic One yourself, your own rules decide which Marketstack operations the agent may call, and since every endpoint is a read-only price or reference lookup, you scope access one operation at a time. You can allow only what the agent needs, such as fetching end-of-day prices from /eod, pulling intraday quotes from /intraday, or reading dividends from /dividends, and leave out the rest. Your Marketstack access key stays under your control and is injected at execution time, so the agent never sees the raw value or reaches operations you did not grant.
