80M+ prices. 75 years of fundamentals. 63,000 entities.
import xfinlink as xfl prices = xfl.prices("AAPL", start="2020-01-01") fundamentals = xfl.fundamentals("AAPL", period_type="annual") history = xfl.resolve("AAPL")
Search any field. See real values.
Three functions. Install, query, done. Everything you need to integrate xfinlink into a research pipeline, trading system, or weekend project.
Install the package and make your first query in under a minute.
pip install xfinlink
Then in Python:
import xfinlink as xfl prices = xfl.prices("AAPL", start="2020-01-01") print(prices.head())
No API key. No rate limit to configure. Your queries are cached by default.
Daily OHLCV prices with split adjustment. Coverage back to 1996 for every US-listed stock and ETF.
| param | type | default | description |
|---|---|---|---|
| ticker | str | list[str] | required | Ticker(s) to fetch. |
| start | str (ISO date) | optional | Earliest date, inclusive. |
| end | str (ISO date) | optional | Latest date, inclusive. Defaults to today. |
| fields | list[str] | optional | Subset of columns. Defaults to all 12 fields. |
| adjust | str | "all" | Adjustment mode: all, splits, or none. |
Request:
df = xfl.prices("AAPL", start="2024-01-01", fields=["close", "volume"])
Response:
date ticker close volume 2024-01-02 AAPL 185.64 45,123,456 2024-01-03 AAPL 184.25 42,889,012 2024-01-04 AAPL 181.91 49,301,234 ...
Reported financials — income statement, balance sheet, cash flow — back to 1950 for most listed US companies.
| param | type | default | description |
|---|---|---|---|
| ticker | str | list[str] | required | Ticker(s) to fetch. |
| period | str | "annual" | "annual" | "quarterly" |
| fields | list[str] | optional | Subset of 65 available fields. |
| start | str (ISO date) | optional | Earliest period_end. |
| end | str (ISO date) | optional | Latest period_end. |
df = xfl.fundamentals("AAPL", period_type="annual", fields=["revenue", "net_income"])
Full entity history for a ticker. Every company that ever used this ticker, including bankruptcies, renames, and M&A events.
| param | type | default | description |
|---|---|---|---|
| ticker | str | required | Ticker symbol to resolve. |
| as_of | str (ISO date) | optional | Resolve as of a specific date. |
| include | str | optional | lineage, all_identifiers, events, related_entities |
info = xfl.resolve("GM") for entity in info["data"]["GM"]["entities"]: print(entity["name"], entity["ticker_valid_from"], entity["ticker_valid_to"])
A curated list of the 92 fields across all three endpoints. See the Explorer on the home page for live values.
import xfinlink as xfl tickers = xfl.resolve("^GSPC")["data"]["^GSPC"]["constituents"] fund = xfl.fundamentals(tickers, period_type="ttm", fields=["eps_diluted"]) prices = xfl.prices(tickers, fields=["close"]).groupby("ticker").tail(1) pe = prices.merge(fund, on="ticker") pe["pe"] = pe["close"] / pe["eps_diluted"]
tickers = xfl.universe(gics_subindustry="Systems Software") df = xfl.fundamentals(tickers, period_type="ttm", fields=["return_on_equity", "revenue"]) df = df[df["return_on_equity"] > 0.30].sort_values("revenue", ascending=False)
# Universe = everyone who was in the S&P 500 on 2010-01-01, # including companies that were later acquired or went bankrupt. universe = xfl.constituents("^GSPC", as_of="2010-01-01") prices = xfl.prices(universe, start="2010-01-01", end="2025-01-01") # Bankrupt tickers get NaN after delisting — handle explicitly.
Paste this block into any LLM (Claude, ChatGPT, Cursor) as context. It teaches the model exactly what xfinlink can and can't do, so the code it writes actually runs.
# xfinlink — LLM context block
xfinlink is a free Python library for financial data.
Install: pip install xfinlink
Import: import xfinlink as xfl
Three functions:
xfl.prices(ticker, start=None, end=None, fields=None)
→ pandas.DataFrame of daily OHLCV + derived fields
→ fields: open, high, low, close, volume, return_daily,
vwap, split_factor, dividend, adjusted_close, ...
xfl.fundamentals(ticker, period_type="annual", fields=None, start=None, end=None)
→ pandas.DataFrame of reported financials
→ period_type: "annual" | "quarterly" | "ttm"
→ fields: revenue, net_income, eps_diluted, total_assets,
operating_margin, return_on_equity, free_cash_flow, ...
xfl.resolve(ticker)
→ dict with full entity history for a ticker symbol
→ every company that ever used this ticker, with dates + events
Coverage: 12,800+ tickers · 63,000+ entities · 80M+ prices · 75 years fundamentals.
Data is split-adjusted, point-in-time, survivorship-bias-free.
Rate limit: 300 req/hr, 200 unique tickers/day.
xfinlink is free. 300 req/hr, 200 unique tickers/day.
Need more? Email hello@xfinlink.com. IP addresses are hashed for rate limiting and never stored in raw form.
Prices — exchange-sourced, adjusted for splits and dividends, reconciled daily against consolidated tape.
Fundamentals — built from SEC EDGAR public filings, parsed from XBRL with manual QA on 2,400+ of the largest issuers.
Entities — built from SEC filings, corporate actions, and exchange delisting notices. Every entity carries point-in-time validity dates.
We read everything. Reply within one business day.
Questions, partnerships, or just want to say hi.
hello@xfinlink.com • BUGSFound a bug or want a new data field? Open an issue.
github.com/xfinlink/issues → • ENTERPRISENeed more throughput, custom data, or SLA guarantees? Let's talk.
hello@xfinlink.comData field missing? Endpoint slow? Something broken? Tell us — we prioritize by demand.