Skip to main content

Financial Data Protocol

Financial Data Protocol (FDP) is infrastructure for registering and tracing exact financial source materials across business systems.

FDP answers questions such as:

  • What exact bytes were registered?
  • Which business Artifact refers to those bytes?
  • Which immutable Package Revision was used?
  • Which system declared a transfer, disclosure, or use?
  • Can the retrieved bytes still be verified against their registered identity?

FDP records structure, identity, integrity, provenance, visibility, and immutable history. The business system that declares a material remains responsible for its business meaning and truth.

Current deployment profile

The current FDP product provides Central FDP: a shared service with Registry Spaces, PostgreSQL Registry storage, S3-compatible Content custody, authenticated transports, and a typed client. The previously described Embedded/local warehouse profile is not part of the current product surface.

The Central capability milestones are incremental:

C0 protocol records and schemas
  -> C1 custody and transaction contract
  -> C2 durable Registry, object custody, and typed client
  -> C3 immutable finance handoffs
  -> C4 disclosure and evidence references
  -> C5 one-writer Space authority cutover
  -> C6 global physical Blob deduplication

See docs/central-capabilities.md for the implementation details of these milestones. Version history belongs in CHANGELOG.md.

Current Central interface

The current packaged command is fdp-central. Its commands are:

fdp-central serve
fdp-central init-db
fdp-central blob-sweep --month 2026-08

The Central HTTP service exposes health/readiness/version endpoints, Content staging and finalization, verified Content retrieval, Artifact and Package Revision registration, declarations, finance handoffs, disclosure operations, and authority operations.

Start the configured service with:

uv sync --locked --extra dev
uv run fdp-central init-db
uv run fdp-central serve

init-db initializes the configured MongoDB Registry and is intentionally limited to a database without application collections; collections whose names start with _ are ignored. If application collections already exist, delete the database manually before initialization. blob-sweep reconciles final Blob objects for one UTC month, for example --month 2026-08; it runs as a dry-run unless --apply is supplied.

The service reads the root config.yaml. Configure PostgreSQL, S3-compatible storage, HTTP settings, and machine-token bindings there. Protect this file because it contains deployment credentials. Deployment prerequisites and examples are documented in docs/central-deployment.md.

Python client

CentralClient sends strict typed requests through a CentralTransport. For an in-process test, use deterministic in-memory custody implementations:

from financial_data_protocol import (
    CentralClient,
    CentralService,
    ContextSpaceAuthorizer,
    InMemoryContentCustody,
    InMemoryRegistryCustody,
    InProcessCentralTransport,
    StaticMachineTokenAuthenticator,
    StaticMachineTokenBinding,
)

transport = InProcessCentralTransport(
    CentralService(
        registry=InMemoryRegistryCustody(),
        content_custody=InMemoryContentCustody(),
        authorizer=ContextSpaceAuthorizer(),
    ),
    StaticMachineTokenAuthenticator((
        StaticMachineTokenBinding(
            "legal-api", "development-token", frozenset({"legal"})
        ),
    )),
)
client = CentralClient(
    transport,
    machine_token="development-token",
    caller_id="legal-api",
    registry_space_id="legal",
)

For a deployed service, use the same CentralClient API with HttpCentralTransport:

from financial_data_protocol import CentralClient, HttpCentralTransport

client = CentralClient(
    HttpCentralTransport("https://central.example", "machine-token", "legal-api"),
    machine_token="machine-token",
    caller_id="legal-api",
    registry_space_id="legal",
)

All writes require a stable idempotency key. Repeating the same canonical request replays its original result; reusing a key for a different request returns a conflict. Content uploads and retrievals verify the declared size and SHA-256.

Central schema revision 6 separates Space-local Content registration from global physical Blob custody. central_contents keeps each Space's Content identity, while content_blobs stores one physical object for each global (sha256, size_bytes) identity and tracks its reference count. The upload/finalize path performs Blob discovery internally, so clients never need cross-Space catalog access. Identical bytes registered in different Spaces share one object-store key:

central/<UTC creation date>/<blob_id>

Temporary staged objects are removed after successful finalization, and provisional Blob objects are removed if the Registry transaction rejects the finalize request. PostgreSQL and MongoDB both support the C6 model. Deployments should initialize a new revision 6 database rather than upgrade an older database revision. See the C6 section in docs/central-capabilities.md for the complete identity, idempotency, and migration semantics.

Scope

FDP does not decide whether a contract is approved or compliant, whether a payment is allowed, whether an invoice is valid, or whether an accounting entry is correct. It does not provide IAM, Registry federation, a queue, a general RAG system, or downstream workflow and output management. See docs/product-definition.md for the complete product boundary.

Documentation

Development checks

uv sync --locked --extra dev
uv run python -m pytest -q
uv run python -m ruff check .
uv run python -m mypy
uv run python -m build

Metadata

Release files for financial-data-protocol 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for financial-data-protocol 0.3.1
File Size Uploaded
financial_data_protocol-0.3.1.tar.gz 115.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for financial-data-protocol 0.3.1
File Interpreter ABI Platform
financial_data_protocol-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 220.2 kB

Release files / financial_data_protocol-0.3.1.tar.gz

Download URL financial_data_protocol-0.3.1.tar.gz
Size 115.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a70807e317f48bf99f4cba0eba016f792b982390cf47d936233796c67d015859
BLAKE2b-256 checksum
How to use checksums
5d4e916e151ce80523aa082c9975f42eed7b98f2fe1a22af2da7f46528e53f8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / financial_data_protocol-0.3.1-py3-none-any.whl

Download URL financial_data_protocol-0.3.1-py3-none-any.whl
Size 104.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
357280f9bba75437ebe13b866986a85e3317634ca8119737928fc6fef8a8bd3f
BLAKE2b-256 checksum
How to use checksums
500c73a67b8689d1635115f7c04cc4eeebac52aece236bb70b793e539a973857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.3.2

2 release files

This release

0.3.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page