Stooq (Poland)
Stooq — Decades of daily closes for indices, stocks, FX and commodities — no key, no sign-up, no licence
When you need a long daily price history for a chart or a notebook and do not want an account: S&P 500 (^spx), Nikkei (^nkx), KOSPI (^kospi), DAX (^dax), USD/KRW (usdkrw), gold (xauusd), plus US and Polish stocks.
Reach for it when…
When you need a long daily price history for a chart or a notebook and do not want an account: S&P 500 (^spx), Nikkei (^nkx), KOSPI (^kospi), DAX (^dax), USD/KRW (usdkrw), gold (xauusd), plus US and Polish stocks.
Not for: Anything that runs unattended (the hit limit will bite), intraday data, fundamentals, anything you will redistribute.
Units, revisions, traps
Units. Prices in the instrument's currency; indices in points. Columns: Date, Open, High, Low, Close, Volume.
Revisions. Not revised; occasional gaps on holidays.
- After the daily limit the CSV URL returns an HTML page — check that the first column is 'Date' before trusting the frame.
- Symbols use suffixes (.us for US stocks) and '^' for indices (URL-encode it as %5E).
- Volume is often blank for indices and FX.
Classic mistake: Building a scheduled job on Stooq and discovering the HTML page in the data a month later.
Three recipes
- Recipe 1 · S&P 500 daily closes since 1990
- Recipe 2 · USD/KRW next to the KOSPI
- Recipe 3 · Gold in dollars, weekly
Each recipe: Python · Excel · Sheets, with how to read the result. Python recipes run under pandas; recipe 1 is re-run by the weekly check where the source allows it.
How to use it in your own work
Copy the snippet, change the series id, read the result the way the footer says. Replace YOUR_…_KEY with your own key where one is needed.
Recipe 1S&P 500 daily closes since 1990
import pandas as pd
u = "https://stooq.com/q/d/l/?s=%5Espx&i=d" # ^spx, URL-encoded
df = pd.read_csv(u)
assert "Date" in df.columns, "hit limit reached: the URL returned a page, not data"
s = df.set_index(pd.to_datetime(df.Date))["Close"]
print(s["1990":].tail())- Data → From Web → https://stooq.com/q/d/l/?s=^spx&i=d → Load.
=IMPORTDATA("https://stooq.com/q/d/l/?s=^spx&i=d")Recipe 2USD/KRW next to the KOSPI
import pandas as pd
def stooq(sym):
d = pd.read_csv(f"https://stooq.com/q/d/l/?s={sym}&i=d")
assert "Date" in d.columns, "hit limit"
return d.set_index(pd.to_datetime(d.Date))["Close"]
df = pd.DataFrame({"kospi": stooq("%5Ekospi"), "usdkrw": stooq("usdkrw")}).dropna()
print(df.tail())- Two From Web queries merged on Date.
- Two IMPORTDATA calls and a VLOOKUP.
Recipe 3Gold in dollars, weekly
import pandas as pd
d = pd.read_csv("https://stooq.com/q/d/l/?s=xauusd&i=w")
assert "Date" in d.columns
print(d.set_index(pd.to_datetime(d.Date))["Close"].tail())- From Web with i=w for weekly.
=IMPORTDATA with i=w.Series → question map
The ids we use from Stooq, each with the question it answers. The catalog's compare view reads the concept tags behind these rows.
| Series | Answers | Region | Concept |
|---|---|---|---|
| ^spx | Where is the S&P 500? | United States | equity_index |
| ^nkx | Where is the Nikkei 225? | Japan | equity_index |
| ^kospi | Where is the KOSPI? | Korea | equity_index |
| ^dax | Where is the DAX? | Germany | equity_index |
| usdkrw | Won per dollar, daily | Korea | fx_usd |
| xauusd | Where is gold? | global | commodity |
| spy.us | Daily OHLC for a US ticker | United States | ohlc_daily |
Compare with
Same question, different source: Twelve Data, EODHD, Cboe index data. The compare view lines up coverage, frequency, history and access side by side and lists what the combination makes possible.
Questions readers ask
Is Stooq legal to use?
For personal use it is a public download; there is no licence granting anything more. Do not redistribute the data or build a product on it.
Why did my CSV turn into HTML?
You hit the unpublished daily limit for your IP. Wait a day, or move scheduled work to a source with terms (Twelve Data, EODHD, Tiingo).
Which symbols exist?
Search on stooq.com; the symbol in the page URL is the one for the CSV endpoint.
From the paper
Educational only — we explain, we never advise · snippet licence: public domain · corrections to [email protected], fixed within a day and logged in the changelog.