How polymarket/real-time-data-client works
This small TypeScript library wraps a WebSocket service: applications create and connect a client, subscribe or unsubscribe over that connection, and receive parsed messages and connection callbacks. The client also manages pinging and automatic reconnection. The README documents topic-based streams and authentication options; the sampled implementation shows the client and message types, but not service-side behavior.
Main entry points: client.ts WebSocket Client · index.ts Public API · model.ts Message Types
Components 5
Other components
- Application
- Public API
src/index.ts - WebSocket Client
src/client.ts - Message Types
src/model.ts - Data Service
Connections 10
- Application → Public API: imports
src/index.ts - Public API → WebSocket Client: exports
src/index.ts - Public API → Message Types: exports
src/index.ts - WebSocket Client → Message Types: uses types
src/client.ts - Application → WebSocket Client: connects
README.md - WebSocket Client → Data Service: opens connection
src/client.ts - Application → WebSocket Client: subscribes
README.md - WebSocket Client → Data Service: sends requests
src/client.ts - Data Service → WebSocket Client: streams messages
README.md - WebSocket Client → Application: calls callbacks
src/client.ts