Skip to main content

Free financial data API client — prices, fundamentals, entity resolution for all US equities

Project description

xfinlink

Free financial data API for US equities — prices, fundamentals, metrics, entity resolution.

Install

pip install xfinlink

Quick start

import xfinlink as xfl

xfl.set_api_key("your-key")  # or set XFINLINK_API_KEY env var
# Get a free key at https://xfinlink.com/signup

# Historical prices
df = xfl.prices("AAPL", start="2024-01-01", end="2024-12-31")
print(df[["date", "close", "adj_close", "volume"]].head())

# Multi-ticker
df = xfl.prices(["AAPL", "MSFT", "GOOGL"], start="2024-01-01")

# Financial statements
df = xfl.fundamentals("AAPL", period_type="annual")

# Computed metrics (P/E, ROE, margins, etc.)
df = xfl.metrics("AAPL", fields=["pe_ratio", "roe", "market_cap"])

# Entity resolution
info = xfl.resolve("GM")

# Search
df = xfl.search(q="apple")

# S&P 500 constituents
df = xfl.index("sp500")

# Check usage
xfl.usage()

Defaults

  • start defaults to 1 year ago if omitted.
  • Pagination stops at max_rows (default 10,000). Increase if you need more.
  • date and period_end are regular DataFrame columns, not the index.

API endpoints

Endpoint Use case
GET /v1/prices/{ticker} Historical prices, volume, dividends, splits
GET /v1/fundamentals/{ticker} Financial statements (129 fields)
GET /v1/metrics/{ticker} 36 pre-computed ratios and per-share values
GET /v1/resolve/{ticker} Entity resolution, corporate history
GET /v1/search Find companies by name, sector, SIC, NAICS
GET /v1/index/{name} Index constituents (current or historical)

All endpoints accept multi-ticker: /v1/prices/AAPL,MSFT,GOOGL

Rate limits

5,000 requests/day, 500 requests/hour burst. Free.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xfinlink-0.5.13.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xfinlink-0.5.13-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page