Free financial data API client — prices, fundamentals, entity resolution for all US equities
Project description
xfinlink
Validate and fix financial data merges. Catches silent identifier errors — ticker recycling, bankruptcies, renames, spin-offs — that corrupt research datasets.
Install
pip install xfinlink
That's it. No Docker. No database setup. Works immediately.
Quick start
import pandas as pd
from xfinlink import validate_dataframe
panel = pd.read_csv("my_research_data.csv")
report = validate_dataframe(panel, id_column="ticker", date_column="date")
print(report.summary)
# "1247 rows checked. 828 clean. 419 issues found."
Fix errors automatically
from xfinlink import fix_dataframe
fixed = fix_dataframe(panel, id_column="ticker", date_column="date")
# Adds _entity_id, _canonical_name, _cik, _xfinlink_flag columns
What it catches
- Ticker recycling: GM before 2009 vs GM after 2010 — different companies, different CIKs
- Ticker hijacking: META was an ETF before Facebook claimed it in 2022
- Corporate renames: GHC was WPO (Washington Post) before 2013
- Spin-offs: HPE didn't exist before the HP split in 2015
- Take-privates: DELL went private 2013-2018, different legal entity before and after
Single identifier lookup
from xfinlink import resolve
result = resolve("ticker", "GM", date="2008-06-15")
# Returns: General Motors Corporation (pre-bankruptcy)
result = resolve("ticker", "GM", date="2012-01-15")
# Returns: General Motors Company (post-bankruptcy)
CLI
xfinlink status # Database stats
xfinlink resolve ticker AAPL # Look up any identifier
xfinlink validate data.csv --id-column ticker --date-column date
xfinlink fix data.csv --id-column ticker --date-column date
xfinlink serve # Local API server
xfinlink mcp # AI agent interface
Want WRDS identifiers? (PERMNOs, GVKEYs)
pip install xfinlink[wrds]
xfinlink enrich --wrds
One command, ~5 minutes. Uses your WRDS credentials. Data stays on your machine.
For AI agents
xfinlink mcp
See CLAUDE.md for integration details.
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
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
File details
Details for the file xfinlink-0.5.1.tar.gz.
File metadata
- Download URL: xfinlink-0.5.1.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2cdcd7a49a1d150dfe51b952307c6e5c9f40b8c18f39fa3a1cedf539da2c929
|
|
| MD5 |
fcc4ee0449e955b48cdf8d3791a0da6b
|
|
| BLAKE2b-256 |
d5c4bc76e1ca0ba2445bd05cb344775166e825fa4ef54439a3892f447cb2b613
|
File details
Details for the file xfinlink-0.5.1-py3-none-any.whl.
File metadata
- Download URL: xfinlink-0.5.1-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e982d3f9f685c03a8e392f3f6a21a23b869aa240ab93e1bf5a68c04f4189dcc0
|
|
| MD5 |
43b6f9525a2137ca279871e9932032e0
|
|
| BLAKE2b-256 |
1c5f64393acb5c7acc9aba5fc31180ba9542c6bc95a4981c9a6bc7f21c721b24
|