Official Python SDK for the Valuein US Core Fundamentals dataset — SEC EDGAR financials via API.
Project description
Valuein Financial Data Essentials (FDE)
Institutional-grade SEC fundamental data. Point-in-Time accurate, survivorship-bias free.
Standardized US Core Fundamentals (10-K, 10-Q, 8-K) from 1990 to present. 20,000+ active and delisted entities. ~105M facts. Zero look-ahead bias.
Installation
# Set your API key (get one at valuein.biz)
export VALUEIN_API_KEY="your_api_key"
# Install
uv add valuein-sdk
# or: pip install valuein-sdk
Quickstart
from valuein_sdk import ValueinClient
client = ValueinClient() # reads VALUEIN_API_KEY from env
# Run any SQL against the data warehouse
df = client.query("""
SELECT s.symbol, f.report_date, fa.standard_concept, fa.numeric_value
FROM security s
JOIN filing f ON s.entity_id = f.entity_id
JOIN fact fa ON f.accession_id = fa.accession_id
WHERE s.symbol = 'AAPL' AND s.is_active = TRUE
ORDER BY f.report_date DESC
LIMIT 20
""")
print(df)
That's it. No downloads — DuckDB streams only the rows your query needs from Cloudflare R2.
Core Concepts
Point-in-Time (PIT) Backtesting
Every fact has a filing_date (when the SEC received the filing) and a report_date (the fiscal period end). Always filter by filing_date <= your_trade_date to avoid look-ahead bias.
# Correct PIT backtest — only use data the market had on 2024-01-15
df = client.query("""
SELECT fa.standard_concept, fa.numeric_value
FROM fact fa
JOIN filing f ON fa.accession_id = f.accession_id
JOIN security s ON f.entity_id = s.entity_id
WHERE s.symbol = 'MSFT'
AND f.filing_date <= '2024-01-15' -- ← PIT gate
ORDER BY f.report_date DESC
LIMIT 10
""")
Available Tables
| Table | Description |
|---|---|
entity |
Legal company entities (CIK, name, sector, SIC) |
security |
Ticker symbols with date ranges (valid_from, valid_to, is_active) |
filing |
SEC filing metadata (form type, filing date, report date) |
fact |
Standardized financial facts (standard_concept, numeric_value, unit) |
taxonomy_guide |
Human-readable definitions of all standard concepts |
index_membership |
Historical S&P 500 and other index membership |
Pre-built SQL Templates
40+ ready-to-run templates for common quant workflows:
df = client.run_template(
"01_fundamentals_by_ticker",
ticker="NVDA",
form_types=["10-K"],
metrics=["Revenues", "NetIncomeLoss"],
start_date="2020-01-01",
end_date="2026-01-01",
)
See valuein_sdk/queries/ for the full list (Altman Z-score, DuPont, TTM, FCF, and more).
API Reference
client = ValueinClient(api_key="...", gateway_url="...") # gateway_url optional
client.query(sql) # Run arbitrary DuckDB SQL → DataFrame
client.get(table) # Download full table → DataFrame
client.run_template(name, **kwargs) # Run a named .sql template → DataFrame
client.tables() # List available table names
client.me() # Token details (plan, status, email)
client.manifest() # Snapshot metadata (current data date)
Resources
- Examples:
examples/getting_started.py,examples/usage.py - Schema:
docs/schema.json - Methodology:
docs/METHODOLOGY.md - Data Quality issues: Open a ticket
⚠️ For educational and research purposes only. Not financial advice.
Apache-2.0 License — see LICENSE.
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 valuein_sdk-0.2.0.tar.gz.
File metadata
- Download URL: valuein_sdk-0.2.0.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95f6a1cd79eb9532cf4ee6995211b8eeb6cdda31111ba161b48df0e568ffb002
|
|
| MD5 |
576fa87678e4f8546b5e6af078e5bf43
|
|
| BLAKE2b-256 |
c76fda65a0c5148a48ec4e2fcdb6f1c8c372cf34476177537e9b395641999b0e
|
Provenance
The following attestation bundles were made for valuein_sdk-0.2.0.tar.gz:
Publisher:
publish.yml on valuein/quants
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
valuein_sdk-0.2.0.tar.gz -
Subject digest:
95f6a1cd79eb9532cf4ee6995211b8eeb6cdda31111ba161b48df0e568ffb002 - Sigstore transparency entry: 1077322313
- Sigstore integration time:
-
Permalink:
valuein/quants@96dd5969f30e64e8305d4e3c4e882704862efeea -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/valuein
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@96dd5969f30e64e8305d4e3c4e882704862efeea -
Trigger Event:
push
-
Statement type:
File details
Details for the file valuein_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: valuein_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 40.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a7309253739c6f85e8b614f0d0ce9072133a3b2b7439526d12e29c007aa6595
|
|
| MD5 |
6f5ce2918886130eae786e24ae9b5b25
|
|
| BLAKE2b-256 |
f5f0ac3ed340caa7dae2fc38fd54c67347bcb17c068e7689bf126a6041b6701c
|
Provenance
The following attestation bundles were made for valuein_sdk-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on valuein/quants
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
valuein_sdk-0.2.0-py3-none-any.whl -
Subject digest:
7a7309253739c6f85e8b614f0d0ce9072133a3b2b7439526d12e29c007aa6595 - Sigstore transparency entry: 1077322350
- Sigstore integration time:
-
Permalink:
valuein/quants@96dd5969f30e64e8305d4e3c4e882704862efeea -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/valuein
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@96dd5969f30e64e8305d4e3c4e882704862efeea -
Trigger Event:
push
-
Statement type: