Commit 09a2725
committed
feat(sdk): expose WebSocket configuration for Polymarket and Kalshi
Adds websocket config parameter to both TypeScript and Python SDKs:
Polymarket:
- TypeScript: PolymarketOptions.websocket
- Python: websocket dict parameter (auto-generated)
Kalshi:
- TypeScript: KalshiOptions.websocket
- Python: websocket dict parameter (auto-generated)
Supported websocket options:
- wsUrl: Custom WebSocket endpoint
- reconnectInterval: Reconnection delay (ms)
- pingInterval: Heartbeat interval (ms)
- maxReconnectAttempts: Maximum reconnection tries
Files Changed:
- core/scripts/generate-python-exchanges.js - Generator template
- sdks/python/pmxt/client.py - Exchange base class
- sdks/python/pmxt/_exchanges.py - Generated exchange classes
- sdks/python/pmxt/__init__.py - Updated imports
- sdks/typescript/pmxt/client.ts - TypeScript interfaces
Testing:
✅ TypeScript SDK builds and works
✅ Python SDK imports and works
✅ Both exchanges accept websocket config
✅ All tests passed
Fixes #1052
Fixes #10531 parent 60200cd commit 09a2725
4 files changed
Lines changed: 97 additions & 16 deletions
File tree
- core/scripts
- sdks
- python/pmxt
- typescript/pmxt
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| |||
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
| |||
0 commit comments