Skip to content

Releases: pmxt-dev/pmxt

v2.21.0

15 Mar 11:09

Choose a tag to compare

Added

  • Typed Error Classes (Python SDK): 14 error classes (BadRequest, AuthenticationError, RateLimitExceeded, NotFoundError, etc.) mirroring core/src/errors.ts. Server error responses are automatically parsed into typed exceptions via from_server_error(). All catch blocks in the client now raise specific PmxtError subclasses instead of generic Exception.
  • Typed Error Classes (TypeScript SDK): Matching error hierarchy with fromServerError() factory. handleResponse() and all HTTP error paths now throw typed PmxtError subclasses. All error classes exported from the package.

Fixed

  • Credential Logging (Security): Removed plaintext logging of API credentials in Polymarket auth flow.
  • Hardcoded Price Fallbacks: Replaced 0.5 fallback prices with 0 in Kalshi, Baozi, and Myriad normalizers. Missing price data now correctly indicates "no price" instead of silently fabricating a 50-cent midpoint.

Installation

npm:

npm install pmxtjs@2.21.0

PyPI:

pip install pmxt==2.21.0

Links

Full Changelog: v2.20.3f...v2.21.0f

v2.20.3

14 Mar 22:17

Choose a tag to compare

Fixed

  • Kalshi API v2 Compatibility: Handle renamed trade fields (yes_priceyes_price_dollars, countcount_fp). Normalizer now parses both old (cents int) and new (dollar string) formats, fixing NaN prices and undefined amounts in fetchTrades / fetchMyTrades.

Changed

  • Compliance Test Hardening: fetchOHLCV tries multiple resolutions (1d, 6h, 1h) coarsest-first across top markets by volume instead of giving up early. watchTrades filters for markets traded within the last 5 minutes and applies a 10-minute recency gate before attempting WebSocket watches.
  • Broader Skip Conditions: isSkippableError now handles AuthenticationError, PermissionDenied, missing credentials, and ESM import failures. Individual tests (createOrder, fetchPositions) cover additional expected rejection messages.
  • KalshiDemoExchange Excluded: Removed from compliance test matrix (redundant, no separate demo credentials).
  • SDK Integration Tests: Added server-availability guard so tests skip gracefully when the PMXT server is not running.

Installation

npm:

npm install pmxtjs@2.20.3

PyPI:

pip install pmxt==2.20.3

Links

Full Changelog: v2.20.2f...v2.20.3f

v2.20.2

14 Mar 21:29

Choose a tag to compare

Fixed

  • Probable Events API: Handle raw array response instead of expected { events: [] } wrapper.
  • Test Import: Remove vitest import from client-args test (project uses Jest).

Changed

  • 3-Layer Architecture: Introduced fetcher/normalizer/SDK layer separation across all exchanges (Myriad, Polymarket, Kalshi, Limitless, Baozi, Probable).
  • Stale File Cleanup: Removed superseded fetchX.ts files from all exchanges, rewired websocket modules to use the new fetcher layer.

Installation

npm:

npm install pmxtjs@2.20.2

PyPI:

pip install pmxt==2.20.2

Links

Full Changelog: v2.20.1f...v2.20.2f

v2.20.1

14 Mar 16:41

Choose a tag to compare

Fixed

  • Error Mapper: SDK Error Extraction (#56): Third-party SDK errors (e.g. @polymarket/clob-client) that attach HTTP metadata (.status, .statusCode, .response) to Error instances are now properly mapped to specific error classes (InsufficientFunds, AuthenticationError, InvalidOrder, etc.) instead of falling through to a generic BadRequest. The error mapper also extracts the real API error message from .response.data instead of using the SDK's generic .message.

Changed

  • Error Mapper: Deduplicated Status Code Mapping: Extracted shared mapByStatusCode() method to eliminate duplicated switch logic across axios, plain-object, and SDK error handling paths.

Installation

npm:

npm install pmxtjs@2.20.1

PyPI:

pip install pmxt==2.20.1

Links

Full Changelog: v2.20.0f...v2.20.1f

v2.20.0

14 Mar 16:23

Choose a tag to compare

Added

  • Address Watcher & Subscriber System: Introduced watchAddress() and unwatchAddress() methods on BaseExchange, along with a new subscriber infrastructure (core/src/subscriber/) for monitoring on-chain address activity. Supports optional address parameter for flexible subscription management.
  • GoldSky Integration: Added GoldSky GraphQL subscription implementation (core/src/subscriber/external/goldsky.ts) for real-time on-chain event streaming. Integrated into the Limitless exchange for live data feeds.
  • Whale Tracker Examples: Added Python and TypeScript example scripts (core/examples/social/) demonstrating how to track large-position holders using the SDK.
  • SDK: buildOrder / submitOrder Support: Both the Python and TypeScript SDKs now expose buildOrder() and submitOrder() methods, along with the BuiltOrder type, enabling the two-step order workflow introduced in v2.19.0.
  • Trade outcomeId Field: Added outcomeId (asset ID) to the Trade type for clearer asset-level trade identification.

Fixed

  • Kalshi Orderbook: Switched from the removed legacy orderbook field to orderbook_fp, fixing broken orderbook fetches on the Kalshi exchange.
  • Limitless baseUrl Parameter: Fixed incorrect base URL handling in the Limitless exchange configuration.
  • Exchange Imports: Fixed missing or incorrect index.ts imports across exchange modules.
  • Test Infrastructure: Replaced vitest imports with Jest globals in price tests to match the project's test runner.
  • Whale Tracker Examples & SDK Bugs: Fixed issues in example scripts and resolved minor SDK client bugs.
  • TypeScript SDK Merge Conflicts: Resolved merge conflicts in the TypeScript SDK client.

Changed

  • Polymarket WebSocket: Enriched the Polymarket websocket implementation with improved event handling and user position tracking.
  • Limitless WebSocket & GoldSky Integration: Refactored the Limitless exchange to integrate GoldSky watcher and subscriber, with improved websocket configuration.
  • Exchange Interfaces: Refactored BaseExchange interfaces, updated type names, and standardized exchange interface implementations across Polymarket, Limitless, Myriad, and others.
  • Price Helpers: Centralized exchange price helpers and standardized argument building across exchanges.
  • Watcher Dispatch Optimization: Updated the watcher to dispatch events only when there is an actual change, reducing unnecessary notifications.
  • OpenAPI & API Reference: Auto-regenerated openapi.yaml and API_REFERENCE.md to reflect all new endpoints and types.
  • SDK Models & Documentation: Updated Python and TypeScript SDK models, API reference docs, and added client example code.

Installation

npm:

npm install pmxtjs@2.20.0

PyPI:

pip install pmxt==2.20.0

Links

What's Changed

  • feat(ts-sdk): add buildOrder method and BuiltOrder type by @Aboudjem in #57
  • feat: add 'watchAddress' and 'unwatchAddress' for a real-time address watching system by @psyberck in #55
  • feat: raw mode preserve original formats by @alexandretrotel in #49

New Contributors

Full Changelog: v2.19.6f...v2.20.0f

v2.19.6

06 Mar 09:17

Choose a tag to compare

Added

  • TypeScript SDK Auto-Generation: Upgraded sdks/typescript/scripts/generate-client-methods.js to derive return types and patterns directly from the BaseExchange.ts AST, mirroring the Python generator. The manual METHOD_RETURN_CONFIG has been eliminated, permanently removing the risk of documentation and signature drift.

Fixed

  • CI/CD: SDK Drift Guards: Removed the paths filter from python-client-check.yml and typescript-client-check.yml. These drift guards now run on every pull request. Previously, manual edits to client.py or client.ts would bypass the check if the PR didn't also touch BaseExchange.ts or the generator scripts.

Installation

npm:

npm install pmxtjs@2.19.6

PyPI:

pip install pmxt==2.19.6

Links

Full Changelog: v2.19.5f...v2.19.6f

v2.19.5

06 Mar 08:43

Choose a tag to compare

Fixed

  • SDK: Resilient Authentication (Python & TypeScript): Eliminated "Unauthorized: Invalid or missing access token" errors caused by sidecar server restarts. Both the Python and TypeScript SDKs now read the access token fresh from the ~/.pmxt/server.lock file on every request via a new getAuthHeaders helper. This ensures that if the server rebooted and rotated tokens, existing Exchange instances (like Polymarket) automatically pick up the new valid token on their next call, removing the need for developers to manually re-instantiate clients.
  • SDK: Generator Persistence (Python & TypeScript): Updated both sdks/python/scripts/generate-client-methods.js and sdks/typescript/scripts/generate-client-methods.js to emit the live header retrieval pattern, ensuring authentication resilience is maintained in all future auto-generated methods.

Installation

npm:

npm install pmxtjs@2.19.5

PyPI:

pip install pmxt==2.19.5

Links

Full Changelog: v2.19.4f...v2.19.5f

v2.19.4

06 Mar 08:18

Choose a tag to compare

Fixed

  • Compliance Tests: Resilient Exchange Availability Checks: Compliance tests no longer fail when an exchange's API is temporarily unavailable (e.g., Myriad returning a Heroku 503 error page). Previously, any ExchangeNotAvailable or NetworkError exception would propagate as a test failure, making CI fragile against external service outages. A new isSkippableError(error) helper in core/test/compliance/shared.ts returns true for these error types (plus the existing "not implemented" and "not supported" string checks), and all 18 compliance test files now call it uniformly instead of ad-hoc string comparisons. Tests now log a skip message and return instead of failing.

  • generate-openapi.test.ts Spec Leak: The OpenAPI auto-generation test temporarily injects a testDummyMethod into BaseExchange.ts and regenerates the spec to verify the generator works. However, afterAll only restored BaseExchange.ts — not openapi.yaml — leaving the testDummyMethod endpoint permanently in the committed spec and silently dropping the close endpoint's description. afterAll now also restores openapi.yaml to its pre-test state.


Installation

npm:

npm install pmxtjs@2.19.4

PyPI:

pip install pmxt==2.19.4

Links

Full Changelog: v2.19.3f...v2.19.4f

v2.19.3

04 Mar 18:09

Choose a tag to compare

Fixed

  • TypeScript build failure due to missing buildOrder and submitOrder in exchange has objects: When the new build-only order methods were added to the ExchangeHas interface, several exchange implementations were not updated to include these properties. Added buildOrder: false and submitOrder: false to BaoziExchange, LimitlessExchange, MyriadExchange, and ProbableExchange to match the interface requirements.

Installation

npm:

npm install pmxtjs@2.19.3

PyPI:

pip install pmxt==2.19.3

Links

What's Changed

  • docs: move total downloads badge logic to seperate repo by @veehz in #51

New Contributors

  • @veehz made their first contribution in #51

Full Changelog: v2.18.1f...v2.19.3f

v2.9.3

04 Mar 17:46

Choose a tag to compare

Fixed

  • TypeScript build failure due to missing buildOrder and submitOrder in exchange has objects: When the new build-only order methods were added to the ExchangeHas interface, several exchange implementations were not updated to include these properties. Added buildOrder: false and submitOrder: false to BaoziExchange, LimitlessExchange, MyriadExchange, and ProbableExchange to match the interface requirements.

Installation

npm:

npm install pmxtjs@2.9.3

PyPI:

pip install pmxt==2.9.3

Links

What's Changed

  • docs: move total downloads badge logic to seperate repo by @veehz in #51

New Contributors

  • @veehz made their first contribution in #51

Full Changelog: v2.18.1f...v2.9.3f