Gap
The TypeScript SDK re-exports its entire hosted-trading error module from the package root, so every hosted error class is directly importable. The Python SDK's top-level __init__.py has zero references to the hosted error module or any of its classes — they're only reachable through a lazy module.__getattr__ fallback in errors.py, or by reaching into the underscore-prefixed private module directly. This is the same class of gap as issue #1804 (NotSupported not exported from Python's top level), but for the entire hosted-error family (HostedTradingError + 9 leaf classes) rather than a single base error.
Core
Not a core/src gap — this is a hosted-trading-service error taxonomy that both SDKs independently implement client-side to classify trade.pmxt.dev error responses (per docs/api-reference/errors.mdx). Referenced here as the shared contract both SDKs are expected to expose identically.
TypeScript SDK
sdks/typescript/index.ts:51: export * from "./pmxt/hosted-errors.js"; — a wildcard re-export making every class in sdks/typescript/pmxt/hosted-errors.ts directly importable from the package root: HostedTradingError (line 23), InsufficientEscrowBalance (44), OrderSizeTooSmall (57), InvalidApiKey (70), OutcomeNotFound (83), CatalogUnavailable (96), BuiltOrderExpired (109), InvalidSignature (122), NoLiquidity (135), MissingWalletAddress (152). E.g. import { InsufficientEscrowBalance } from 'pmxtjs' works.
Python SDK
sdks/python/pmxt/__init__.py — grep -n "Hosted\|hosted_errors\|InsufficientEscrowBalance" sdks/python/pmxt/__init__.py returns nothing; none of the 10 classes defined in sdks/python/pmxt/_hosted_errors.py (HostedTradingError line 24, InsufficientEscrowBalance 43, OrderSizeTooSmall 50, InvalidApiKey 57, OutcomeNotFound 64, CatalogUnavailable 71, BuiltOrderExpired 79, InvalidSignature 86, NoLiquidity 93, MissingWalletAddress 100) are imported or re-exported from the package root. They're reachable only via sdks/python/pmxt/errors.py:193-197's module-level __getattr__, which lazily proxies attribute lookups to _hosted_errors (i.e. pmxt.errors.InsufficientEscrowBalance works, but only because of dynamic fallback, and only via the errors submodule — not import pmxt; pmxt.InsufficientEscrowBalance), or by importing the private _hosted_errors module directly.
Evidence
export * from "./pmxt/hosted-errors.js" in sdks/typescript/index.ts:51 vs. no corresponding import/re-export anywhere in sdks/python/pmxt/__init__.py. Confirmed by grepping both files for the hosted error class names.
Impact
TypeScript users can import { InsufficientEscrowBalance } from 'pmxtjs' directly, matching the pattern in docs/api-reference/errors.mdx's TS code samples. Python users following the equivalent Python code sample in the same doc (except InsufficientEscrowBalance:) must know to import from pmxt.errors (relying on undocumented lazy __getattr__ behavior) or pmxt._hosted_errors (a private module) instead of the top-level pmxt package — an inconsistent, harder-to-discover import path for the exact same error-handling pattern the docs present as identical across both SDKs.
Found by automated Core-to-SDK surface coverage audit
Gap
The TypeScript SDK re-exports its entire hosted-trading error module from the package root, so every hosted error class is directly importable. The Python SDK's top-level
__init__.pyhas zero references to the hosted error module or any of its classes — they're only reachable through a lazymodule.__getattr__fallback inerrors.py, or by reaching into the underscore-prefixed private module directly. This is the same class of gap as issue #1804 (NotSupportednot exported from Python's top level), but for the entire hosted-error family (HostedTradingError+ 9 leaf classes) rather than a single base error.Core
Not a
core/srcgap — this is a hosted-trading-service error taxonomy that both SDKs independently implement client-side to classifytrade.pmxt.deverror responses (perdocs/api-reference/errors.mdx). Referenced here as the shared contract both SDKs are expected to expose identically.TypeScript SDK
sdks/typescript/index.ts:51:export * from "./pmxt/hosted-errors.js";— a wildcard re-export making every class insdks/typescript/pmxt/hosted-errors.tsdirectly importable from the package root:HostedTradingError(line 23),InsufficientEscrowBalance(44),OrderSizeTooSmall(57),InvalidApiKey(70),OutcomeNotFound(83),CatalogUnavailable(96),BuiltOrderExpired(109),InvalidSignature(122),NoLiquidity(135),MissingWalletAddress(152). E.g.import { InsufficientEscrowBalance } from 'pmxtjs'works.Python SDK
sdks/python/pmxt/__init__.py—grep -n "Hosted\|hosted_errors\|InsufficientEscrowBalance" sdks/python/pmxt/__init__.pyreturns nothing; none of the 10 classes defined insdks/python/pmxt/_hosted_errors.py(HostedTradingErrorline 24,InsufficientEscrowBalance43,OrderSizeTooSmall50,InvalidApiKey57,OutcomeNotFound64,CatalogUnavailable71,BuiltOrderExpired79,InvalidSignature86,NoLiquidity93,MissingWalletAddress100) are imported or re-exported from the package root. They're reachable only viasdks/python/pmxt/errors.py:193-197's module-level__getattr__, which lazily proxies attribute lookups to_hosted_errors(i.e.pmxt.errors.InsufficientEscrowBalanceworks, but only because of dynamic fallback, and only via theerrorssubmodule — notimport pmxt; pmxt.InsufficientEscrowBalance), or by importing the private_hosted_errorsmodule directly.Evidence
export * from "./pmxt/hosted-errors.js"insdks/typescript/index.ts:51vs. no corresponding import/re-export anywhere insdks/python/pmxt/__init__.py. Confirmed by grepping both files for the hosted error class names.Impact
TypeScript users can
import { InsufficientEscrowBalance } from 'pmxtjs'directly, matching the pattern indocs/api-reference/errors.mdx's TS code samples. Python users following the equivalent Python code sample in the same doc (except InsufficientEscrowBalance:) must know to import frompmxt.errors(relying on undocumented lazy__getattr__behavior) orpmxt._hosted_errors(a private module) instead of the top-levelpmxtpackage — an inconsistent, harder-to-discover import path for the exact same error-handling pattern the docs present as identical across both SDKs.Found by automated Core-to-SDK surface coverage audit