fix(python-sdk): add wallet signer exchange options
Summary
- Add
wallet_addressandsignerto the Python SDKExchangeOptionsTypedDict. - Aligns the Python public option type with the TypeScript
ExchangeOptionsfields for hosted wallet/signer flows.
Fixes #1132
Test Plan
python3 -m py_compile sdks/python/pmxt/models.pypython3 - <<'PY' ...import-by-path smoke check assertingExchangeOptionsincludeswallet_addressandsigner
Note: python3 -m pytest sdks/python/tests/test_public_exports.py could not run in this cron environment because pytest is not installed.
This focused PR is locally validated but currently blocked by repository-wide generated-sync drift that is unrelated to the touched file.
Local validation run by this cron:
python3 -m py_compile sdks/python/pmxt/models.py✅- import-by-path smoke check asserting
ExchangeOptionsincludeswallet_addressandsigner✅
CI blockers observed:
Verify client.py methods are up-to-datewants afetch_order_book(... params: Optional[dict])generated change insdks/python/pmxt/client.pyunrelated to this PR.Verify client.ts methods are up-to-datewants afetchMatchedMarkets(params?: any)generated change insdks/typescript/pmxt/client.tsunrelated to this PR.Verify API_REFERENCE.md files are up-to-datewants removal ofquestionfromsdks/typescript/API_REFERENCE.md, unrelated to this Python TypedDict fix.
Per the PMXT focused-PR generated-drift rule, I am keeping this PR scoped instead of folding broad unrelated generated churn into it.
PR Review: PASS (NOT VERIFIED)
What This Does
Adds wallet_address and signer to the Python SDK ExchangeOptions TypedDict so typed constructor-option dictionaries can include the hosted wallet/signing options already accepted by Exchange.__init__. This matters for Python SDK consumers using typed options around hosted trading flows.
Blast Radius
Python SDK type surface only: sdks/python/pmxt/models.py. No server, exchange normalizer, OpenAPI schema, or generated SDK transport changes.
Consumer Verification
Before (base branch):
Static inspection/import of ExchangeOptions.__annotations__ on origin/main showed only signature_type among these related keys:
{'signature_type': 'typing.Union[str, int]'}
A typed options dict containing wallet_address / signer would therefore be invisible to type checkers even though the runtime constructor accepts those kwargs.
After (PR branch):
Static inspection/import of ExchangeOptions.__annotations__ on this PR showed:
{'signature_type': 'typing.Union[str, int]', 'wallet_address': "<class 'str'>", 'signer': 'typing.Any'}
No hosted API credential-backed runtime call was performed because this is a type-surface-only change.
Test Results
- Build: NOT VERIFIED (
npm run build --workspace=pmxt-coreis blocked in this checkout by pre-existing Rain SDK/tooling errors: missing@buidlrrr/rain-sdkplus Rain implicit-anyerrors) - Unit tests: NOT VERIFIED (not applicable to this type-only Python change; no focused Python type-check suite was found/run)
- Server starts: NOT VERIFIED (not needed for this type-only change)
- E2E smoke: NOT VERIFIED (not observable through sidecar HTTP API)
- Python syntax: PASS (
python3 -m py_compile sdks/python/pmxt/client.py sdks/python/pmxt/models.py sdks/python/pmxt/router.py sdks/python/pmxt/_exchanges.py)
Findings
No blocking findings.
PMXT Pipeline Check
- Field propagation (3-layer): N/A — option typing only; no market/event/order response field added
- OpenAPI sync: N/A
- Financial precision: N/A
- Type safety: OK — adds missing option keys and
Anyis already imported inmodels.py - Auth safety: OK — no credential logging/transport behavior changed
Semver Impact
patch -- Python SDK typing fix for already-supported constructor options.
Risk
Runtime behavior was not exercised because the PR only changes a TypedDict; a dedicated static type-check fixture would make this fully verifiable in CI.