{"repo":"nevuamarkets/poly-websockets","free":true,"listed":false,"github":"https://github.com/nevuamarkets/poly-websockets","clone":"git clone https://github.com/nevuamarkets/poly-websockets.git","description":"Plug-and-play Polymarket WebSocket price alerts","language":"TypeScript","stars":76,"topics":["alerts","polymarket","polymarket-api","price","real-time","trading","websocket","prediction-markets"],"license":"MIT","category":"trading","readme_excerpt":"Poly-WebSockets A TypeScript library for real-time Polymarket market data over WebSocket with automatic reconnections and easy subscription management . Powering Nevua Markets Installation Features - 📊 Real-time Market Updates : Get book , price change , tick size change and last trade price events from Polymarket WebSocket - 🎯 Derived Price Event : Implements Polymarket's price calculation logic (midpoint vs last trade price based on spread) - 🔗 Dynamic Subscriptions : Subscribe and unsubscribe to assets without reconnecting - 🔄 Automatic Reconnection : Handles connection drops with automatic reconnection - 💪 TypeScript Support : Full TypeScript definitions for all events and handlers - 🔒 Independent Instances : Each manager instance is fully isolated with its own WebSocket connection Quick Start API Reference WSSubscriptionManager Constructor Parameters: - handlers - Event handlers for WebSocket events - options - Optional configuration: - reconnectAndCleanupIntervalMs?: number - Reconnection check interval (default: 5000ms) - pendingFlushIntervalMs?: number - How often to flush pending subscriptions (default: 100ms) Methods Method Description -------- ------------- addSubscriptions(assetIds: string[]) Add assets to monitor removeSubscriptions(assetIds: string[]) Stop monitoring assets getAssetIds(): string[] Get all monitored asset IDs (subscribed + pending) getStatistics() Get connection and subscription statistics clearState() Clear all subscriptions and close conn","default_branch":null,"files":null,"tree":[],"storefront":"/r/nevuamarkets","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nevuamarkets/poly-websockets/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}