fin3
Financial time-series data tooling for downloading, normalizing, validating, storing, and retrieving OHLCV bars as pandas DataFrames. Built on ArcticDB and MinIO, with Databento, Binance, Yahoo Finance, and Massive (formerly Polygon.io) provider implementations.
Maintained by Nathan Peet. Nathan uses fin3 to download, normalize, and prepare market data for analysis in his automated portfolio workflow. This describes data preparation and analysis, not live trade execution or investment performance; no external adoption is claimed.
Implemented functionality
- Canonical OHLCV columns (
open,high,low,close,volume) with UTC timestamps. - Exchange-session and continuous calendars, gap detection, incremental fetching, and calendar alignment.
- ArcticDB storage backed by MinIO/S3-compatible storage; local LMDB support for tests.
- Raw-provider and post-alignment validation, metadata bootstrap, and per-symbol cross-process file locking.
- Integrity auditing, HTML inspection reports, defragmentation, and resource monitoring.
- Declarative YAML/JSON dataset manifests with an installed
fin3command (ensure,sync, and read-onlystatus), including dry-run previews and drift detection. - Standalone download, audit, inspection, and Databento normalization scripts.
These are implemented capabilities, not a guarantee of error-free data or universal provider/asset coverage. Data availability, licensing, entitlements, and rate limits remain subject to each source.
Provider status
All four providers are registered in the public implementation. Live-verification notes below refer to historical public PR evidence, not a fresh live-API test of every provider on each checkout.
| Provider key | Implemented scope | Verification and limitations |
|---|---|---|
| 1: @ours |
max_cost checks provider-reported estimates before fetching. Databento queries
its cost API; Binance and Yahoo report zero, while subscription-based Massive also
reports zero. A zero estimate does not make subscriptions or entitlements free,
and max_cost does not cap Massive subscription charges.
Quick start (from source)
Requires Python 3.11+ and uv. Use this repository checkout; these instructions do not assume that a published PyPI package is available.
git clone https://github.com/nathanpt/fin3.git
cd fin3
uv sync --extra databento
For Yahoo support, add --extra yfinance. Binance and Massive use stdlib HTTP and
need no provider-specific extra. ArcticDB storage still requires its core dependencies.
Configure
Start a local MinIO instance and supply its credentials plus your Databento key in
an uncommitted .env file (the credentials below are development placeholders):
FIN3_MINIO__ENDPOINT=localhost:9000
FIN3_MINIO__ACCESS_KEY=minioadmin
FIN3_MINIO__SECRET_KEY=minioadmin
FIN3_PROVIDERS__DATABENTO__PROVIDER_TYPE=databento
FIN3_PROVIDERS__DATABENTO__API_KEY=db-your-key-here
Do not use placeholder storage credentials in production. See the usage guide for storage configuration and other providers.
Fetch and analyze
The following performs network requests and may incur Databento charges. Choose symbols, dates, dataset, and entitlements appropriate to your account before running.
from datetime import datetime, timezone
from fin3 import AssetType, ClientConfig, MarketDataFetcher, Resolution
fetcher = MarketDataFetcher(ClientConfig.from_env())
df = fetcher.get_data(
asset_type=AssetType.EQUITY_US,
provider="databento",
resolution=Resolution.ONE_MINUTE,
symbols=["AAPL"],
start=datetime(2024, 1, 2, tzinfo=timezone.utc),
end=datetime(2024, 1, 2, 23, 59, tzinfo=timezone.utc),
)
aapl = df["AAPL"]
closes = df[("AAPL", "close")]
get_data() checks existing coverage, fetches missing ranges, validates raw data,
aligns bars to a calendar, validates again, and writes to ArcticDB before returning
a symbol/field MultiIndex DataFrame. Library names follow
{asset_prefix}-{resolution}-{provider}, for example equities-1m-databento or
crypto-1h-binance. Missing in-session bars are represented by NaN OHLC and zero
volume. Trading sessions depend on the asset calendar and daylight-saving time;
NYSE hours are not a fixed UTC interval year-round.
Standalone tools
The installed fin3 command drives the declarative manifest workflow
(fin3 ensure, fin3 sync, and read-only fin3 status; see docs/USAGE.md).
The scripts below remain standalone: run them from the checkout with
uv run python scripts/<name>.py --help before using them.
Some commands download paid data or modify storage; review their options first.
| Script | Purpose |
|---|---|
| download_symbols.py | Download data for multiple symbols with cost estimation |
| audit_library.py | Integrity checks and HTML dashboard |
| inspect_library.py | Per-symbol library overview and HTML reports |
| defragment_library.py | Compact ArcticDB segments, with dry-run support |
| normalize_databento.py | Convert raw Databento parquet to canonical schema |
| fix_meta_rename.py | Handle the FB-to-META symbol rename gap |
Unfinished / planned
- High-level
DataManagerretrieval, alignment, and multi-format output API. - Additional providers such as ThetaData; no ThetaData provider is in the public tree.
Binance, Yahoo, and Massive are implemented, not future provider stubs. The older
Massive implementation plan is historical context, not current status.
The internal .docs/ROADMAP.md referenced in repository conventions is not included
in the public checkout; this README summarizes public implemented/planned status.
Documentation and development
- Usage guide: configuration, fetching, concurrency, monitoring, exceptions, and adding providers. For installation, use the source instructions above.
- Provider comparison.
- API reference source.
- Resource monitoring notes.
- Repository guidelines.
uv sync --all-extras
uv run pytest tests/ -m "not integration"
uv run ruff check .
uv run mypy fin3/
Live integration tests require explicit opt-in and relevant keys/infrastructure.
Mocked tests alone do not establish live provider compatibility; see the live-test
requirements in AGENTS.md. Do not point validation runs at production stores.
License
Copyright 2026 Nathan Peet.
Licensed under the Apache License, Version 2.0. The license covers this repository's code; it does not grant rights to redistribute third-party market data or replace provider agreements.
Metadata
Release files for fin3 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fin3-0.4.0.tar.gz | 198.6 kB | With provenance | Details for fin3-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fin3-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for fin3-0.4.0-py3-none-any.whl |
Total release size: 333.2 kB
Release files / fin3-0.4.0.tar.gz
| Download URL | fin3-0.4.0.tar.gz |
|---|---|
| Size | 198.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6de15240f853f7596c135efd3ddf4eb5a994ba6b1130e46a4ce9e45ff74408dd
|
|
BLAKE2b-256 checksum How to use checksums |
accef0247712b03c21196b14ee5882fb9e0dda8e4c8074ce09ad5ebae20215d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / fin3-0.4.0-py3-none-any.whl
| Download URL | fin3-0.4.0-py3-none-any.whl |
|---|---|
| Size | 134.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df99fe3359c87e03e95ddb38a2b2f987a1cddd8c7bad39f06944cf9c04db3fba
|
|
BLAKE2b-256 checksum How to use checksums |
c6250328432111706f2b97fa973f17f230eff90b4789409d94bfe62f603bb31f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for fin3 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for fin3-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.