Skip to content

Releases: pmxt-dev/pmxt

v2.11.0

22 Feb 07:48

Choose a tag to compare

Added

  • CCXT-Style Rate Limiting: Implemented automatic rate limiting across all exchanges using a token bucket (leaky bucket) algorithm, preventing 429 errors and request throttling.
    • Unified Throttling: All REST requests (both explicit and via callApi) automatically respect exchange rate limits through a single axios request interceptor on this.http.
    • Per-Exchange Configuration: Each exchange sets its own rate limit (e.g., Polymarket: 200ms, Kalshi: 100ms, Myriad/Baozi/Probable: 500ms).
    • User Control: Developers can override rate limits per-instance (exchange.rateLimit = 50) or disable entirely (exchange.enableRateLimit = false).
    • Leaky Bucket Implementation: Queue-based token refill with no busy spinning, maintaining simplicity while ensuring fair request spacing.
  • Throttler Utility: New Throttler class in core/src/utils/throttler.ts providing a standalone, exchange-agnostic token bucket implementation for queue-based async throttling.

Changed

  • BaseExchange: Added rateLimit property (default 1000ms) and enableRateLimit property (default true) to match CCXT conventions.

Installation

npm:

npm install pmxtjs@2.11.0

PyPI:

pip install pmxt==2.11.0

Links

Full Changelog: v2.10.0f...v2.11.0f

v2.10.0

19 Feb 11:58

Choose a tag to compare

Added

  • Low-Level API Access (callApi / call_api): Exposed a new method on all exchange instances that allows direct invocation of any exchange-specific REST endpoint by its OpenAPI operationId. This gives advanced users full access to every underlying API endpoint (Polymarket CLOB/Gamma/Data, Kalshi, Limitless, Probable, Myriad) without leaving the unified SDK interface.
    • TypeScript: await exchange.callApi('operationName', { param: 'value' })
    • Python: exchange.call_api('operation_name', {'param': 'value'})
  • Low-Level API Reference Documentation: Both Python and TypeScript API reference docs now include a comprehensive "Low-Level API Reference" section listing every available endpoint per exchange, with method, path, parameters, and auth requirements.

Documentation

  • API Reference Templates: Updated Handlebars templates and the doc generation pipeline to render per-exchange endpoint tables and detailed parameter listings from OpenAPI specs.

Installation

npm:

npm install pmxtjs@2.10.0

PyPI:

pip install pmxt==2.10.0

Links

Full Changelog: v2.9.2f...v2.10.0f

v2.9.2

19 Feb 07:58

Choose a tag to compare

Documentation

  • Pagination Stability Guidance: Clarified that repeated fetchMarkets() calls with different offset values do not guarantee stable ordering. Added guidance and examples on using loadMarkets() as the correct approach for stable iteration over the entire market catalog. (Closes #41)
  • Automatic Statistics: Updated specific total download badges and metadata.

Installation

npm:

npm install pmxtjs@2.9.2

PyPI:

pip install pmxt==2.9.2

Links

What's Changed

Full Changelog: v2.9.1f...v2.9.2f

v2.9.1

18 Feb 16:14

Choose a tag to compare

Documentation

  • Internal Links in API Reference: Return types and complex parameters in the Python and TypeScript API reference documentation are now linkified. Clicking on a data model (e.g., Order, UnifiedMarket) now jumps directly to its detailed field definition at the bottom of the page.

Installation

npm:

npm install pmxtjs@2.9.1

PyPI:

pip install pmxt==2.9.1

Links

Full Changelog: v2.9.0f...v2.9.1f

v2.9.0

18 Feb 15:49

Choose a tag to compare

Fixed

  • TypeScript SDK (Windows): Fixed a crash when spawning pmxt-ensure-server on Windows where the .js launcher must be invoked via node explicitly. The SDK now detects the platform and spawns node <path> when the resolved launcher ends in .js. (Closes #29)

Added

  • Implicit API Generation: Implemented automatic HTTP method generation from OpenAPI specifications in BaseExchange. Exchange classes can now register an OpenAPI spec and have typed HTTP methods created dynamically, significantly reducing boilerplate when adding new exchanges or API endpoints.
    • Added ApiDescriptor interface and parseOpenApiSpec utility.
    • Added initAuth() method for credential initialization and HMAC-SHA256 signing for Polymarket L2 API authentication.
    • API credentials are cached for synchronous signing operations.
    • Full implicit API support added to PolymarketExchange for all three services (CLOB, Gamma, Data APIs).

Changed

  • Centralized Request Handling (callApi): Refactored all major exchange implementations (Kalshi, Polymarket, Limitless, Probable, Myriad) to route API calls through a unified callApi method on BaseExchange. This ensures consistent error mapping, logging, and interceptor behavior across all exchanges.
  • Consolidated Exchange Methods: Moved standalone per-feature files (fetchPositions.ts, fetchOrderBook.ts, fetchTrades.ts, fetchOHLCV.ts) into their respective exchange class files. Deleted the now-redundant standalone files.
  • Centralized OpenAPI Specs: Migrated API specifications from the root directory into structured core/specs/ subdirectories (kalshi, limitless, myriad, polymarket, probable). The fetch-openapi-specs script now supports both remote URL fetching and local file reading.
  • Myriad: Inlined fetchTrades logic directly into WebSocket polling and migrated to callApi. Fixed outcomeId parsing for composite IDs.
  • OpenAPI Utility: Operations without explicit security definitions now correctly inherit top-level security settings.

Documentation

  • SubParams in API Reference: Sub-parameters for methods like fetchMarkets and fetchEvents (e.g., query, slug, limit, offset, sort, searchIn) are now rendered as nested bullet points directly under the method in both Python and TypeScript API reference docs.
  • Implicit API Pattern: Added detailed documentation of the Implicit API pattern to ARCHITECTURE.md.
  • Exchange Integration Guide: Refactored core/ADDING_AN_EXCHANGE.md to reflect the new callApi-based implementation approach.

Installation

npm:

npm install pmxtjs@2.9.0

PyPI:

pip install pmxt==2.9.0

Links

Full Changelog: v2.8.0f...v2.9.0f

v2.8.0

17 Feb 17:23

Choose a tag to compare

Added

  • CCXT-Style Market Caching (loadMarkets): Implemented stateful market caching in BaseExchange to improve performance and enable synchronous-like metadata lookups.
    • New loadMarkets(reload: boolean) method fetches and caches all market definitions (by ID and slug).
    • Updated fetchMarket to check the local cache first, enabling 0ms lookups for frequently accessed markets.
    • Added slug property to UnifiedMarket for consistent multi-identifier caching.
  • Testing Infrastructure: Added comprehensive unit tests and a cross-exchange manual verification script for the market caching system.

Changed

  • Increased Default Market Limits: Raised the default fetchMarkets limit from 10,000 to 250,000 results across Polymarket, Kalshi, and Limitless.

Installation

npm:

npm install pmxtjs@2.8.0

PyPI:

pip install pmxt==2.8.0

Links

Full Changelog: v2.7.0f...v2.8.0f

v2.7.0

17 Feb 09:56

Choose a tag to compare

Changed

  • Centralized HTTP Architecture: Refactored all major exchange clients (Polymarket, Kalshi, Limitless, Probable, Myriad) to route API requests through a shared this.http instance in BaseExchange.
  • Enhanced Verbose Logging: The exchange.verbose = true flag now provides consistent, detailed logging for all HTTP requests and responses, including parameters, status codes, and error bodies across all exchanges.
  • Improved Internal Reliability:
    • Standardized error mapping and request interceptors across the library.
    • Fixed syntax errors and prop-drilling issues in Myriad and Probable exchange implementations.
    • Updated Kalshi unit tests to support robust axios.create mocking patterns.

Installation

npm:

npm install pmxtjs@2.7.0

PyPI:

pip install pmxt==2.7.0

Links

Full Changelog: v2.6.0f...v2.7.0f

v2.6.0

17 Feb 09:04

Choose a tag to compare

Added

  • Baozi Exchange Integration: New exchange adapter for baozi.bet, a decentralized pari-mutuel prediction market on Solana. NOTE: Not fully working.

    • Market Data: fetchMarkets, fetchEvents, fetchOrderBook (synthetic from pool ratios).
    • Trading: createOrder via on-chain Solana instructions (place_bet_sol / bet_on_race_outcome_sol).
    • Account Management: fetchBalance (SOL), fetchPositions (PDA-based position lookup).
    • Real-time Data: watchOrderBook via Solana onAccountChange subscriptions.
    • Note: No fetchOHLCV, fetchTrades, or cancelOrder (pari-mutuel bets are irrevocable).
  • Myriad Markets Integration: Full support for Myriad Markets, an AMM-based prediction market platform.

    • Market Data: fetchMarkets, fetchEvents, fetchOHLCV, fetchOrderBook (synthetic from AMM), fetchTrades.
    • Trading: createOrder (returns quote + calldata for on-chain execution), fetchPositions, fetchBalance.
    • Real-time Data: Poll-based watchOrderBook and watchTrades.
    • Multi-chain Support: Abstract (2741), Linea (59144), BNB (56) with composite IDs ({networkId}:{marketId}:{outcomeId}).
    • Key difference from CLOB exchanges: AMM-based, no limit orders or open order cancellation.
  • fetchMarket / fetchEvent Singular Lookup Methods: Convenience methods for fetching a single market or event by ID, slug, or ticker. Throws MarketNotFound / EventNotFound if not found.

    • Extended MarketFilterParams with marketId, outcomeId, eventId for direct lookups.
    • Extended EventFetchParams with eventId, slug for direct lookups.
    • Exchange-specific implementations for Kalshi, Probable, and Limitless.
  • Improved Market Search: Deduplication logic and exact-match fetching in parallel for Kalshi, Limitless, and Polymarket. Queries resembling tickers or slugs now prioritize exact matches.

Fixed

  • Baozi: Improved robustness of order parsing and position data.
  • Probable: Added fallback lookup logic for slug search in fetchMarkets.

Changed

  • Windows Compatibility: Cross-platform process checking in LockFile and Python SDK.
  • Compliance Tests: Enhanced with authentication support for Myriad and Baozi; refactored to use initExchange helper.
  • Generated SDK Code: Now gitignored instead of committed.

Installation

npm:

npm install pmxtjs@2.6.0

PyPI:

pip install pmxt==2.6.0

Links

Full Changelog: v2.5.0f...v2.6.0f

v2.5.0

16 Feb 21:04

Choose a tag to compare

Added

  • Baozi Exchange Integration: New exchange adapter for baozi.bet, a decentralized pari-mutuel prediction market on Solana. NOTE: Not fully working.

    • Market Data: fetchMarkets, fetchEvents, fetchOrderBook (synthetic from pool ratios).
    • Trading: createOrder via on-chain Solana instructions (place_bet_sol / bet_on_race_outcome_sol).
    • Account Management: fetchBalance (SOL), fetchPositions (PDA-based position lookup).
    • Real-time Data: watchOrderBook via Solana onAccountChange subscriptions.
    • Note: No fetchOHLCV, fetchTrades, or cancelOrder (pari-mutuel bets are irrevocable).
  • Myriad Markets Integration: Full support for Myriad Markets, an AMM-based prediction market platform.

    • Market Data: fetchMarkets, fetchEvents, fetchOHLCV, fetchOrderBook (synthetic from AMM), fetchTrades.
    • Trading: createOrder (returns quote + calldata for on-chain execution), fetchPositions, fetchBalance.
    • Real-time Data: Poll-based watchOrderBook and watchTrades.
    • Multi-chain Support: Abstract (2741), Linea (59144), BNB (56) with composite IDs ({networkId}:{marketId}:{outcomeId}).
    • Key difference from CLOB exchanges: AMM-based, no limit orders or open order cancellation.
  • fetchMarket / fetchEvent Singular Lookup Methods: Convenience methods for fetching a single market or event by ID, slug, or ticker. Throws MarketNotFound / EventNotFound if not found.

    • Extended MarketFilterParams with marketId, outcomeId, eventId for direct lookups.
    • Extended EventFetchParams with eventId, slug for direct lookups.
    • Exchange-specific implementations for Kalshi, Probable, and Limitless.
  • Improved Market Search: Deduplication logic and exact-match fetching in parallel for Kalshi, Limitless, and Polymarket. Queries resembling tickers or slugs now prioritize exact matches.

Fixed

  • Baozi: Improved robustness of order parsing and position data.
  • Probable: Added fallback lookup logic for slug search in fetchMarkets.

Changed

  • Windows Compatibility: Cross-platform process checking in LockFile and Python SDK.
  • Compliance Tests: Enhanced with authentication support for Myriad and Baozi; refactored to use initExchange helper.
  • Generated SDK Code: Now gitignored instead of committed.

Installation

npm:

npm install pmxtjs@2.5.0

PyPI:

pip install pmxt==2.5.0

Links

What's Changed

  • feat: support exact ticker/ID matches in searchMarkets across exchanges by @CrispyyBaconx in #38
  • feat: add Baozi exchange (Solana pari-mutuel prediction markets) by @bolivian-peru in #40

New Contributors

Full Changelog: v2.4.0f...v2.5.0f

v2.4.0

15 Feb 14:46

Choose a tag to compare

Added

  • Probable Exchange Integration: Initial release of the Probable exchange integration, bringing full support for the Probable prediction market platform.
    • Market & Event Discovery: Implemented fetchMarkets and fetchEvents for comprehensive market discovery.
    • Trading: Full trading support including createOrder, cancelOrder, fetchOrder, and fetchOpenOrders.
    • Market Data: Access to fetchOrderBook, fetchTrades, and fetchOHLCV for historical and real-time market analysis.
    • Account Management: Implemented fetchBalance and fetchPositions to track portfolio performance.
    • Real-time Data: Added WebSocket support for live order book updates via watchOrderBook. (Note: watchTrades is not yet supported).
    • Examples: Added comprehensive examples in core/examples/api-reference covering all major functionality.

Installation

npm:

npm install pmxtjs@2.4.0

PyPI:

pip install pmxt==2.4.0

Links

Full Changelog: v2.3.0f...v2.4.0f