binary-live-api (v29.0.1) is a high-level promise-based WebSocket client for the Binary.com trading API. It provides automatic reconnection with resubscription, an event system for real-time data, and an optional RxJS observable mode. The library targets both browser and Node.js environments, but requires a WebSocket polyfill in Node. Development is active with regular releases. Compared to direct WebSocket usage, it adds request-response mapping, subscription management, and a cleaner API.
npm install binary-live-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to Binary.com WebSocket API, authorizes with token, fetches portfolio, and listens for real-time updates.
Install 'ws' and pass it to constructor: new LiveApi({ websocket: require('ws') })Do not mix api.events listeners with useRx: true. Use only observables.
Consider using the standard Promise-based API or a newer wrapper.
Install 'ws' and pass it to LiveApi constructor: new LiveApi({ websocket: require('ws') })Use const { LiveApi } = require('binary-live-api') or import { LiveApi } from 'binary-live-api'