Skip to content

Bitget API SDK ​

bitget-api provides JavaScript and TypeScript clients for Bitget Unified Trading Account (UTA) V3 and Classic V2 APIs. Read Spot and futures prices, subscribe to private account updates and manage orders with typed REST and WebSocket methods.

JavaScript & TypeScript · v3.2.8 · MIT license

Installation ​

TypeScript definitions are included.

Install the npm package with your preferred tool:

sh
npm install bitget-api
sh
pnpm add bitget-api
sh
yarn add bitget-api
sh
bun add bitget-api
sh
deno add npm:bitget-api
text
Package: bitget-api
npm: https://www.npmjs.com/package/bitget-api

For other npm-compatible tools, use the same package from npm. Runtime-specific setup is covered below.

Choose your setup ​

Follow the guide for your runtime or framework. Each includes a complete project with commands to install dependencies and run it.

SetupGuides
Node.jsJavaScript or TypeScript
Alternative runtimesBun or Deno
Browser appsReact with Vite or Vite with plain JavaScript
Next.jsNode.js server Route Handler
Cloudflare WorkersPublic prices and authenticated orders
Mobile appsReact Native / Expo for iOS and Android

Browser and Expo guides include SDK-specific bundler configuration and polyfills where needed. See Runtime setup for project recipes and required configuration.

First request ​

Start with the Node.js quickstart, which uses V3 to read a public Bitcoin ticker without credentials. The guides use UTA V3, with Classic V2 alternatives for existing Classic accounts. Examples use production services by default. To use simulated funds, configure demo trading.

Choose a client ​

  • RestClientV3: UTA public market data, account reads and trading, plus the V3 product APIs exposed by the SDK.
  • WebsocketClientV3: UTA V3 subscriptions and low-level WebSocket API requests.
  • WebsocketAPIClient: promise-based UTA V3 order commands over WebSockets.
  • RestClientV2: Classic Spot, futures, margin and related account/product REST APIs.
  • WebsocketClientV2: Classic V2 public and private subscriptions.

Next steps ​

Built by Siebly. Open source SDKs for exchange APIs.