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
startdefaults to 1 year ago if omitted.- Pagination stops at
max_rows(default 10,000). Increase if you need more. dateandperiod_endare 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
- Docs: https://xfinlink.com/docs
- Signup: https://xfinlink.com/signup
- LLM context: https://xfinlink.com/llms.txt
Project details
Release history Release notifications | RSS feed
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.6.0.tar.gz
(23.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
xfinlink-0.6.0-py3-none-any.whl
(24.5 kB
view details)
File details
Details for the file xfinlink-0.6.0.tar.gz.
File metadata
- Download URL: xfinlink-0.6.0.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2a160b0558c5ad670035786f1500bf9b2cab7ae0c5a5c4420a8c3307a2974bc
|
|
| MD5 |
e85cd3ae67e0934b2ab340ccf45dbfb2
|
|
| BLAKE2b-256 |
5693b86c16acc34eab2a0a35ec92c05e0c59e92ca86c90c51d09404451c218ec
|
File details
Details for the file xfinlink-0.6.0-py3-none-any.whl.
File metadata
- Download URL: xfinlink-0.6.0-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4998652f969c89a121df0f936c96d254c44b32eace7e919deb9a5f869dfc172a
|
|
| MD5 |
ac389b949d4dccafdba7d24814d910db
|
|
| BLAKE2b-256 |
1bea335b9790befcbad0059c420326f1ffaa47b5224545f6c8b24140c9bcc505
|