Linking Marketstack as a source
This source is currently in alpha. The interface and available tables may change.
Let AI connect your sources for you
Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Contents
Marketstack (an APILayer product) is a REST API for real-time, intraday, and historical stock market data covering 70+ exchanges and 125,000+ tickers. Linking Marketstack as a source pulls end-of-day, intraday, splits, and dividends data, company profiles, analyst ratings, and SEC filings along with market reference tables (tickers, exchanges, currencies, timezones) into your PostHog data warehouse, where you can join it with your product data.
Prerequisites
Before connecting Marketstack, you need:
- A Marketstack account.
- Your API access key, found in your Marketstack dashboard. The free plan covers end-of-day and all reference tables; intraday data requires a paid plan.
Adding a data source
- In PostHog, go to the Sources tab of the data pipeline section.
- Click + New source and click Link next to this source.
- Enter your credentials (see Configuration below) and click Next.
- Select the tables you want to sync, choose a sync method and frequency, then click Import.
Once the syncs are complete, you can start querying this data in PostHog.
When configuring the source, provide:
- Access key - your Marketstack API access key from the dashboard.
- Symbols (optional) - a comma-separated list of ticker symbols, e.g.
AAPL,MSFT,TSLA. Symbols are required for the EOD, intraday, splits, dividends, ticker info, and company ratings tables — those endpoints return data per symbol. The reference tables (tickers, exchanges, currencies, timezones) don't need symbols. - CIK codes (optional) - a comma-separated list of SEC Central Index Key codes, e.g.
0000320193. CIK codes are required for the submissions table.
The tickerinfo, companyratings, and submissions tables are only available on Marketstack API v2. The companyratings endpoint allows one request per minute, so each symbol adds about a minute to its sync.
Marketstack enforces a rate limit of 5 requests per second and a monthly request quota tied to your plan, so keep the number of symbols and the historical range in mind when backfilling.
Sync modes
Each table can be synced in one of several modes, depending on what the source supports:
- Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
- Incremental – only new or updated rows are synced on each run, using a cursor field (such as an
updated_attimestamp). Cheaper than a full refresh, but deletes aren't captured. - Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
- Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.
See sync methods for a full explanation of how each mode works and how to choose between them.
The time-series tables (eod, intraday, splits, dividends) support incremental sync — after the first backfill, each run only requests data on or after the latest synced date, using Marketstack's date_from filter. The reference and lookup tables (tickers, exchanges, currencies, timezones, tickerinfo, companyratings, submissions) are full-refresh snapshots.
Configuration
| Option | Type | Required |
|---|---|---|
Access key | password | Yes |
Symbols | text | No |
CIK codes | text | No |
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
eod | End-of-day (daily OHLCV) stock prices per symbol, including adjusted prices, split factor, and dividend. Requires symbols. Incremental on date. | Incremental, Full refresh | date | — |
intraday | Intraday (intra-day interval) stock prices per symbol. Requires symbols and a paid plan. Incremental on date. | Incremental, Full refresh | date | — |
splits | Historical stock split factors per symbol. Requires symbols. Incremental on date. | Incremental, Full refresh | date | — |
dividends | Historical dividend payouts per symbol. Requires symbols. Incremental on date. | Incremental, Full refresh | date | — |
tickerinfo | Company profile per configured symbol: sector, industry, executives, addresses, and listing exchanges. Requires symbols. Full refresh. | Full refresh | — | — |
companyratings | Individual analyst ratings and price targets per configured symbol. Requires symbols. Rate-limited by Marketstack to one request per minute, so each symbol adds a minute to the sync. Full refresh. | Full refresh | — | — |
submissions | Recent SEC filings (10-K, 10-Q, 8-K, and others) per configured CIK code, one row per filing. Requires CIK codes. Full refresh. | Full refresh | — | — |
tickers | Reference table of supported stock tickers with name, exchange, and EOD/intraday availability. Full refresh. | Full refresh | — | — |
exchanges | Reference table of supported stock exchanges with MIC/acronym codes, country, and timezone. Full refresh. | Full refresh | — | — |
currencies | Reference table of supported currencies with ISO code, symbol, and name. Full refresh. | Full refresh | — | — |
timezones | Reference table of supported timezones with abbreviation and daylight-saving abbreviation. Full refresh. | Full refresh | — | — |
Troubleshooting
missing_symbols/ no rows for EOD, intraday, splits, dividends, ticker info, or company ratings - these tables require at least one symbol. Add symbols to the source configuration and resync.missing_cik_codes- the submissions table requires at least one CIK code. Add CIK codes to the source configuration and resync.function_access_restricted- your Marketstack plan doesn't include this endpoint (intraday requires a paid plan). Upgrade your plan or deselect the restricted table.usage_limit_reached- you've hit your monthly request quota. Upgrade your plan or wait for the quota to reset, then resync.invalid_access_key- the access key is wrong or deactivated. Generate a new key in your Marketstack dashboard and reconnect.
If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.











