Unofficial TypeScript SDK for the IQOption WebSocket API, currently at version 1.1.4. This package provides a typed, promise-based interface for real-time trading on IQOption, supporting binary and digital options, candle/tick streaming, and session management. It is actively maintained with monthly releases. Key differentiators include strict TypeScript support, auto-reconnect, a circuit breaker for failed trades, and enforced WSS security. Unlike other community SDKs, it uses a modern ESM-only design and requires Node.js >= 18. Caution: relies on reverse-engineered proprietary protocol that may break without notice.
npm install iqoptionapi-nodeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates connection, authentication, candle retrieval, binary option trading, and disconnection using environment variables for credentials.
Use import syntax and ensure Node.js >= 18 with type:"module" in package.json.
Pass accountType: 'REAL' in the login options for real trading.
Handle errors gracefully and consider resetting the client state if needed.
Monitor release notes for changes; the API is stable but under development.
Keep the SDK updated; subscribe to GitHub releases for compatibility fixes.
Upgrade Node.js to >=18 and verify package.json contains 'type': 'module' or use .mjs extension.
Ensure await client.connect() completes before calling client.login().
Call await client.login() before any trading or data methods.
Check trade parameters, handle errors, and create a new client instance if needed.
Renew the SSID by calling client.login() with email/password.