Complete Node.js & JavaScript SDK for Bitget V2 REST APIs and WebSockets, plus V3/UTA REST APIs and WebSockets. Version 3.1.8 is actively maintained (released weekly, over 100 e2e tests per release). It is an officially listed SDK in Bitget API docs. Supports HMAC and RSA authentication, proxy, browser usage via webpack, and full TypeScript types. Differentiators: robust WebSocket auto-reconnect, promise-driven interface, extensive automated testing, and active community on Telegram.
npm install bitget-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the Bitget REST client with credentials and fetches account assets. Uses environment variables for keys.
Subscribe in the 'login' callback: client.on('login', () => { client.subscribe(...); });Migrate to V2 or V3 endpoints. See migration guide in repo.
Use import statements instead of require for TypeScript; if using CommonJS, use named destructuring.
Change default import to named import, e.g., import { BitgetRestClient } from 'bitget-api';Always provide apiPass when using V3 clients; for V2 check Bitget documentation.
Use RSA keys without passphrase.
Monitor reconnect event and re-subscribe with idempotent message IDs.
Add apiPass: 'your-passphrase' when creating V3 client.
Use named import: import { BitgetRestClient } from 'bitget-api';Verify credentials and timestamp. Ensure apiPass is provided for V3 WebSocket.
Run: npm install bitget-api
Use V3 WebSocket client for order placement: new BitgetWsClient({ wsUrl: USDT_FUTURES_PROD })