Stock Master Tracker docs
v2.0.0
Get help
● Set up · Read this first

Market data
your plan, your licence.

Where prices, charts and company data come from, which plan you need before you may show prices to the public, how routing and budgets work, and the SEC EDGAR contact.

FinnhubTwelve DataSEC EDGARDisplay-licence switch

01The display licence comes first

The package includes no market-data licence

Prices come from your Finnhub and/or Twelve Data account. Free plans are generally meant for personal or internal use, not for showing prices to the public in an app. This is not legal advice and the terms change: read your provider's current terms and your plan's description, and ask the provider if it is unclear. Only turn the switch below on when the plan you pay for allows public display.

  • Console → Market data → "I confirm my data plans allow showing prices in a public app". It is off by default and only the owner can change it. The change is written to the audit log.
  • While it is off, every price endpoint (quotes, indices, stock page, chart, company news, earnings calendar, brief, report) answers 503 provider_not_licensed. The app shows "Prices are not connected yet" and no price, chart or quote. SEC filings and insider trades, which are public data, keep working.
  • The console's Status page says so in one line ("Prices may be shown (display licence confirmed)").
  • The confirmation is yours. The code cannot verify your contract, and you carry the responsibility for what you show.
The Market data section of the console with the display-licence switch off
Console → Market data, licence switch off

02The two providers

FinnhubTwelve Data
Sign upfinnhub.io, dashboard shows the keytwelvedata.com, account page shows the key
How the backend calls itKey in the X-Finnhub-Token headerKey as the apikey query parameter
Default routeQuotes, profile, fundamentals, company news, earnings calendar, searchCharts
Default budget in the console60 calls a minute, no daily cap8 calls a minute, 800 a day

The default budgets match the free plans of the two providers as the console labels them. Set them to your own plan: the backend stops calling a provider that is over budget and uses the other one or the cache. Whether your plan includes a capability (for example historical candles for the longer chart ranges) is for you to check on the provider's site; if it does not, route that capability to the other provider or expect the chart to show an error state.

You need at least one key. With only one key, set every route to that provider. A capability whose routed provider has no key falls back to the other one if fallback is on and that one has a key.

03Set it up

  1. Get your key(s)On a plan whose terms allow showing prices in a public app.
  2. Enter them in the consoleMarket data → Finnhub API key and Twelve Data API key (owner only, write-only: the console never shows a saved key again). Press Test next to each. The test calls /quote for AAPL.
  3. Routing and budgetsChoose the provider per capability (quotes, charts, profile, fundamentals, news, calendar, search), keep Fall back to the other provider on, and set the per-minute and per-day budgets to your plan.
  4. SEC contactBelow.
  5. Confirm the licenceOnly when your plan allows public display. Save. Open Status: "Prices may be shown" turns green.

04Cache times

Every answer is cached in memory and in Firestore to save provider calls. Defaults (seconds), editable under Market data → Cache:

WhatDefaultWhatDefault
Quotes60Company news900
Charts up to 1 month300Earnings calendar3600
Charts 6 months and longer3600Search3600
Company profile86400SEC filings900
Key statistics3600Insider trades900
SEC ticker list86400

When every provider fails, the last cached value is served with "stale": true and the app shows it as cached; with nothing cached the API answers 503 upstream_unavailable. The Provider usage page of the console shows calls, credits and errors per provider and month against your budgets.

05SEC EDGAR contact

SEC EDGAR is free and needs no key, but the SEC requires every client to identify itself and allows at most 10 requests per second.

  1. Enter a contactConsole → Market data → SEC EDGAR contact: your company name and a mailbox you read, in the form Your Company you@example.com. It is sent as the User-Agent. It is not a secret and never shown in the app.
  2. Test itThe test downloads the SEC ticker list with your contact.
  3. RateThe default 8 requests per second leaves room under the SEC's 10.

Without a contact the API answers 503 edgar_not_configured: filings, insider trades, search (it runs on the SEC ticker list) and news tagging stay off. Read the SEC's guidance on accessing EDGAR data before you launch.

06What the data covers

  • US-listed companies and ETFs. Prices are in the listing currency (US listings: USD); there is no currency conversion.
  • Symbols are upper case with - for share classes (BRK-B); a . is accepted on input.
  • The index strip uses ETF proxies (SPY, QQQ, DIA, IWM) and labels them as such, because the indices themselves are separately licensed. Change the list in Console → Market (SYMBOL|Label per line, at most 12). The featured tickers the brief reads its movers from are in the same section (at most 50).
  • Analyst ratings are shown as counts (positive, neutral, negative), never as a recommendation.

07Errors you may see

AnswerMeaning and fix
503 provider_not_licensedThe display-licence switch is off. Confirm it only if your plan allows public display.
503 upstream_unavailableNo provider is configured for that call, every provider failed and nothing was cached, or you are in the local demo without keys. Add a key or wait for the provider.
503 edgar_not_configuredThe SEC contact is empty.
404 not_foundUnknown ticker, or the SEC has no filer for it (filings and insiders).

More fixes: Troubleshooting.