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
- Product docs: https://finatic.dev/docs
- API reference: https://finatic.dev/docs/api-reference
- LLM context doc: https://finatic.dev/llms.txt
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
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 finatic_server_python-1.0.3.tar.gz.
File metadata
- Download URL: finatic_server_python-1.0.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fa376e21c167bb61e6a5af6bb71c320ec4ecc3efbe328c00c1a61b19377fb8d
|
|
| MD5 |
09c574964fb02bdedf712f0bb7594e20
|
|
| BLAKE2b-256 |
9aef197327ffacc952e4433331fb8a9d475442ac75b6516185dad5717eceaccb
|
Provenance
The following attestation bundles were made for finatic_server_python-1.0.3.tar.gz:
Publisher:
release.yml on FinaticORG/FinaticServerSDK-Python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
finatic_server_python-1.0.3.tar.gz -
Subject digest:
1fa376e21c167bb61e6a5af6bb71c320ec4ecc3efbe328c00c1a61b19377fb8d - Sigstore transparency entry: 2209646024
- Sigstore integration time:
-
Permalink:
FinaticORG/FinaticServerSDK-Python@bdc237bcfc54837c641e52e28b7883f7c51ec4b6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FinaticORG
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bdc237bcfc54837c641e52e28b7883f7c51ec4b6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file finatic_server_python-1.0.3-py3-none-any.whl.
File metadata
- Download URL: finatic_server_python-1.0.3-py3-none-any.whl
- Upload date:
- Size: 667.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebc88200f167b6ec9123d75db89d363b2cdd2c0256f49e07d2f320e0b0ad6aec
|
|
| MD5 |
e86cd3a5db1e20145983050f00e060da
|
|
| BLAKE2b-256 |
a9fdce0226a52104b02047b417cc7fcc621f621751ad02b6c52459cde0d9cd30
|
Provenance
The following attestation bundles were made for finatic_server_python-1.0.3-py3-none-any.whl:
Publisher:
release.yml on FinaticORG/FinaticServerSDK-Python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
finatic_server_python-1.0.3-py3-none-any.whl -
Subject digest:
ebc88200f167b6ec9123d75db89d363b2cdd2c0256f49e07d2f320e0b0ad6aec - Sigstore transparency entry: 2209646049
- Sigstore integration time:
-
Permalink:
FinaticORG/FinaticServerSDK-Python@bdc237bcfc54837c641e52e28b7883f7c51ec4b6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FinaticORG
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bdc237bcfc54837c641e52e28b7883f7c51ec4b6 -
Trigger Event:
push
-
Statement type: