Releases: pmxt-dev/pmxt
v2.11.0
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 onthis.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.
- Unified Throttling: All REST requests (both explicit and via
- Throttler Utility: New
Throttlerclass incore/src/utils/throttler.tsproviding a standalone, exchange-agnostic token bucket implementation for queue-based async throttling.
Changed
- BaseExchange: Added
rateLimitproperty (default 1000ms) andenableRateLimitproperty (default true) to match CCXT conventions.
Installation
npm:
npm install pmxtjs@2.11.0PyPI:
pip install pmxt==2.11.0Links
Full Changelog: v2.10.0f...v2.11.0f
v2.10.0
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 OpenAPIoperationId. 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'})
- TypeScript:
- 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.0PyPI:
pip install pmxt==2.10.0Links
Full Changelog: v2.9.2f...v2.10.0f
v2.9.2
Documentation
- Pagination Stability Guidance: Clarified that repeated
fetchMarkets()calls with differentoffsetvalues do not guarantee stable ordering. Added guidance and examples on usingloadMarkets()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.2PyPI:
pip install pmxt==2.9.2Links
What's Changed
- feat: Add cursor-based pagination to fetchMarkets by @CrispyyBaconx in #45
Full Changelog: v2.9.1f...v2.9.2f
v2.9.1
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.1PyPI:
pip install pmxt==2.9.1Links
Full Changelog: v2.9.0f...v2.9.1f
v2.9.0
Fixed
- TypeScript SDK (Windows): Fixed a crash when spawning
pmxt-ensure-serveron Windows where the.jslauncher must be invoked vianodeexplicitly. The SDK now detects the platform and spawnsnode <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
ApiDescriptorinterface andparseOpenApiSpecutility. - 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
PolymarketExchangefor all three services (CLOB, Gamma, Data APIs).
- Added
Changed
- Centralized Request Handling (
callApi): Refactored all major exchange implementations (Kalshi, Polymarket, Limitless, Probable, Myriad) to route API calls through a unifiedcallApimethod onBaseExchange. 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). Thefetch-openapi-specsscript now supports both remote URL fetching and local file reading. - Myriad: Inlined
fetchTradeslogic directly into WebSocket polling and migrated tocallApi. 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
fetchMarketsandfetchEvents(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.mdto reflect the newcallApi-based implementation approach.
Installation
npm:
npm install pmxtjs@2.9.0PyPI:
pip install pmxt==2.9.0Links
Full Changelog: v2.8.0f...v2.9.0f
v2.8.0
Added
- CCXT-Style Market Caching (
loadMarkets): Implemented stateful market caching inBaseExchangeto improve performance and enable synchronous-like metadata lookups.- New
loadMarkets(reload: boolean)method fetches and caches all market definitions (by ID and slug). - Updated
fetchMarketto check the local cache first, enabling 0ms lookups for frequently accessed markets. - Added
slugproperty toUnifiedMarketfor consistent multi-identifier caching.
- New
- 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
fetchMarketslimit from 10,000 to 250,000 results across Polymarket, Kalshi, and Limitless.
Installation
npm:
npm install pmxtjs@2.8.0PyPI:
pip install pmxt==2.8.0Links
Full Changelog: v2.7.0f...v2.8.0f
v2.7.0
Changed
- Centralized HTTP Architecture: Refactored all major exchange clients (Polymarket, Kalshi, Limitless, Probable, Myriad) to route API requests through a shared
this.httpinstance inBaseExchange. - Enhanced Verbose Logging: The
exchange.verbose = trueflag 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.createmocking patterns.
Installation
npm:
npm install pmxtjs@2.7.0PyPI:
pip install pmxt==2.7.0Links
Full Changelog: v2.6.0f...v2.7.0f
v2.6.0
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:
createOrdervia on-chain Solana instructions (place_bet_sol/bet_on_race_outcome_sol). - Account Management:
fetchBalance(SOL),fetchPositions(PDA-based position lookup). - Real-time Data:
watchOrderBookvia SolanaonAccountChangesubscriptions. - Note: No
fetchOHLCV,fetchTrades, orcancelOrder(pari-mutuel bets are irrevocable).
- Market Data:
-
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
watchOrderBookandwatchTrades. - 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.
- Market Data:
-
fetchMarket/fetchEventSingular Lookup Methods: Convenience methods for fetching a single market or event by ID, slug, or ticker. ThrowsMarketNotFound/EventNotFoundif not found.- Extended
MarketFilterParamswithmarketId,outcomeId,eventIdfor direct lookups. - Extended
EventFetchParamswitheventId,slugfor direct lookups. - Exchange-specific implementations for Kalshi, Probable, and Limitless.
- Extended
-
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
initExchangehelper. - Generated SDK Code: Now gitignored instead of committed.
Installation
npm:
npm install pmxtjs@2.6.0PyPI:
pip install pmxt==2.6.0Links
Full Changelog: v2.5.0f...v2.6.0f
v2.5.0
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:
createOrdervia on-chain Solana instructions (place_bet_sol/bet_on_race_outcome_sol). - Account Management:
fetchBalance(SOL),fetchPositions(PDA-based position lookup). - Real-time Data:
watchOrderBookvia SolanaonAccountChangesubscriptions. - Note: No
fetchOHLCV,fetchTrades, orcancelOrder(pari-mutuel bets are irrevocable).
- Market Data:
-
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
watchOrderBookandwatchTrades. - 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.
- Market Data:
-
fetchMarket/fetchEventSingular Lookup Methods: Convenience methods for fetching a single market or event by ID, slug, or ticker. ThrowsMarketNotFound/EventNotFoundif not found.- Extended
MarketFilterParamswithmarketId,outcomeId,eventIdfor direct lookups. - Extended
EventFetchParamswitheventId,slugfor direct lookups. - Exchange-specific implementations for Kalshi, Probable, and Limitless.
- Extended
-
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
initExchangehelper. - Generated SDK Code: Now gitignored instead of committed.
Installation
npm:
npm install pmxtjs@2.5.0PyPI:
pip install pmxt==2.5.0Links
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
- @CrispyyBaconx made their first contribution in #38
- @bolivian-peru made their first contribution in #40
Full Changelog: v2.4.0f...v2.5.0f
v2.4.0
Added
- Probable Exchange Integration: Initial release of the Probable exchange integration, bringing full support for the Probable prediction market platform.
- Market & Event Discovery: Implemented
fetchMarketsandfetchEventsfor comprehensive market discovery. - Trading: Full trading support including
createOrder,cancelOrder,fetchOrder, andfetchOpenOrders. - Market Data: Access to
fetchOrderBook,fetchTrades, andfetchOHLCVfor historical and real-time market analysis. - Account Management: Implemented
fetchBalanceandfetchPositionsto track portfolio performance. - Real-time Data: Added WebSocket support for live order book updates via
watchOrderBook. (Note:watchTradesis not yet supported). - Examples: Added comprehensive examples in
core/examples/api-referencecovering all major functionality.
- Market & Event Discovery: Implemented
Installation
npm:
npm install pmxtjs@2.4.0PyPI:
pip install pmxt==2.4.0Links
Full Changelog: v2.3.0f...v2.4.0f