Metadata-Version: 2.5
Name: mfx-sdk
Version: 0.0.0
Summary: Typed client for the MFX API — the only way a tenant talks to MFX (MFX-CLAUDE §9.6)
License: Proprietary
Keywords: market-data,mfx,mt5,trading
Requires-Python: >=3.12
Requires-Dist: anyio>=4.6
Requires-Dist: httpx>=0.28
Requires-Dist: pydantic>=2.9
Requires-Dist: structlog>=24.4
Description-Content-Type: text/markdown

# mfx-sdk-python

The typed Python client for the MFX v1 API. **This is the contract** — FabricX and every other
tenant consume MFX only through this library.

> **MFX is hard-isolated from FabricX (ADR-02).** No code here imports or references anything
> named `fabricx*`. FabricX is Tenant 0 and consumes the public API like any other tenant.
> Governance: [`mfx-docs/MFX-CLAUDE.md`](https://github.com/mfx-platform/mfx-docs/blob/develop/MFX-CLAUDE.md)

## Design rules (MFX-CLAUDE.md §9.6 — binding)

1. Total coverage of §9.1 — if a tenant needs `httpx` to call MFX, the SDK is incomplete.
2. **Execution methods never raise.** Transport faults, timeouts and broker rejections are all *results*.
3. Granular MT5 reasons, not buckets — `{mt5_retcode, retcode_text, reason, comment_raw}`.
4. Structured JSON logging; credentials unloggable by type.
5. `idempotency_key` is mandatory on every write — no silent defaults.
6. `broker_latency_ms` and `agent_latency_ms` reported separately, always.
7. Pydantic v2, `py.typed`, mypy --strict, generated from `openapi.yaml`.
8. Async-first; thin sync facade for scripts only.
9. SDK semver independent of API version.
10. The conformance suite is the spec.

## Completeness gate

`MFX-MetaAPI-Consumption-Inventory.md` §2 — every row needs a typed method before G1.

