UNPKG

@nevuamarkets/poly-websockets

Version:

Plug-and-play Polymarket WebSocket price alerts

19 lines (18 loc) 765 B
import { WebSocketHandlers } from './types/PolymarketWebSocket'; import { SubscriptionManagerOptions } from './types/WebSocketSubscriptions'; declare class WSSubscriptionManager { private handlers; private burstLimiter; private groupRegistry; private bookCache; private reconnectAndCleanupIntervalMs; private maxMarketsPerWS; constructor(userHandlers: WebSocketHandlers, options?: SubscriptionManagerOptions); clearState(): Promise<void>; private actOnSubscribedEvents; addSubscriptions(assetIdsToAdd: string[]): Promise<void>; removeSubscriptions(assetIdsToRemove: string[]): Promise<void>; private reconnectAndCleanupGroups; private createWebSocketClient; } export { WSSubscriptionManager, WebSocketHandlers };