Skip to main content

Python SDK for Finatic Server API

Project description

Finatic Server SDK (Python)

Python SDK for server-side Finatic integrations.

Use this package to authenticate with Finatic from Python services, generate client tokens, and retrieve standardized broker-domain data.

Version lines (FDX v1)

Version API surface Use when
1.0.0 /api/v1/* via FinaticServer.v1 New account-grant integrations

The 1.0 line does not ship generated beta broker/company clients, connection-first models, or inactive position-lot types. The generated transport source is maintained for the account-first v1/session surface used by the public facade.

Install

pip install finatic-server-python

Quick Start

from finatic_server_python import FinaticServer

finatic = await FinaticServer.init(api_key="your-api-key")
token = await finatic.get_token()
positions = await finatic.get_all_positions()

Package layout

Name Role
finatic-server-python PyPI package (pip install finatic-server-python)
finatic_server_python Public import path (from finatic_server_python import FinaticServer)
src Hand-written SDK (FinaticServer, v1.V1Client)
finatic_server Generated OpenAPI transport client (src/openapi/finatic_server)

Portal connect flows (institutions, auth-attempts, discovered accounts, grant UI) run in FinaticConnect, not the server SDK. The server SDK exposes session management, portal-links creation, and post-consent account/grant/webhook APIs.

Account-First v1 Preview

The v1 facade targets the SDK OpenAPI contract (spec-sdk.yaml) and sends X-Finatic-Environment on every request.

from finatic_server_python import FinaticServer

finatic = FinaticServer(
    api_key="fntc_live_your_key",
    sdk_config={"environment": "live"},
)

session = await finatic.v1.create_session()
portal_link = await finatic.v1.create_portal_link()
# Open portal_link URL in FinaticConnect for user auth + grant consent

accounts = await finatic.v1.list_accounts()
orders = await finatic.v1.list_account_orders("broker-account-id")
created = await finatic.v1.create_account_order(
    "broker-account-id",
    {"symbol": "AAPL", "quantity": 1, "side": "BUY", "type": "MARKET"},
    idempotency_key="partner-order-123",
)

Use sdk_config={"environment": "sandbox"} for Finatic synthetic sandbox data. Broker paper or simulated accounts remain live environment accounts.

OpenAPI Contract Artifact

The v1 facade is validated against artifacts/openapi/finaticapi-v1.json, which is exported from the FinaticAPI account-first branch. Refresh it with:

env PYTHONPATH=/home/claw/.openclaw/workspace/worktrees/FinaticAPI-pr174-openapi/src:/home/claw/.openclaw/workspace/worktrees/FinaticCore-pr171-openapi/src /home/claw/.openclaw/workspace/repos/FinaticAPI/.venv/bin/python /home/claw/.openclaw/workspace/worktrees/FinaticAPI-pr174-openapi/scripts/export_openapi.py --output /home/claw/.openclaw/workspace/repos/FinaticServerSDK-Python/artifacts/openapi/finaticapi-v1.json

PR #25 currently uses FinaticAPI PR #174 head 4ca17320 and finaticCore PR #171 head 0a126bed as branch-ready dependency inputs. The package version is prepared as 1.0.0 for the API v1 semver lane, but the coordinated FDX account-consent operator hold still controls merge and release timing.

Common Commands

Task Command
Install in editable mode uv pip install -e .
Run tests pytest
Build package python -m build
Lint ruff check .
Format ruff format .

Core Capabilities

  • API-key initialization and session management.
  • Portal URL generation for end-user authentication.
  • One-time token generation for client SDK sessions.
  • Typed access to orders, positions, accounts, and balances.
  • Consistent response/error structures across endpoints.

Documentation

Using Finatic with AI

Use this SDK in Python AI/data systems to:

  • query balances, positions, and orders across connected brokers
  • normalize broker interactions behind one SDK surface
  • feed structured brokerage data into analytics or model workflows

MCP support is coming soon.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finatic_server_python-1.0.2.tar.gz (323.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

finatic_server_python-1.0.2-py3-none-any.whl (667.1 kB view details)

Uploaded Python 3

File details

Details for the file finatic_server_python-1.0.2.tar.gz.

File metadata

  • Download URL: finatic_server_python-1.0.2.tar.gz
  • Upload date:
  • Size: 323.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for finatic_server_python-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7c7321acd89d5dfb2f16b11c70872b6c4cc0810ea7daca5a0bbff9cf074e7a63
MD5 48a79b870b69a9725d3976b2c2a3df23
BLAKE2b-256 20e5edd16b6c9cb16d1b43fdb12486ae129895232edab73c2c78ce4b6feb7519

See more details on using hashes here.

Provenance

The following attestation bundles were made for finatic_server_python-1.0.2.tar.gz:

Publisher: release.yml on FinaticORG/FinaticServerSDK-Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file finatic_server_python-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for finatic_server_python-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20d8f870ed391401e04c7116cc99fdb6263302eb47c7ce5c9b11115d2ea38c64
MD5 708dfd84a2abb552bdd93882bf791d41
BLAKE2b-256 ae51be831e7dc7e3966ed36357493a36d9c53a4d39317623756b146ad27d2ea8

See more details on using hashes here.

Provenance

The following attestation bundles were made for finatic_server_python-1.0.2-py3-none-any.whl:

Publisher: release.yml on FinaticORG/FinaticServerSDK-Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page