The BitMart API SDK is a production-ready Node.js and TypeScript library for integrating with BitMart’s full trading platform. It covers every public and private REST endpoint across spot and futures markets, a unified WebSocket client with automatic reconnection, and ships with complete TypeScript type declarations for every request and response.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tiagosiebler/bitmart-api/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Install the SDK and make your first API call in minutes
Authentication
Set up API keys and understand HMAC signing
REST Clients
Explore RestClient for spot and FuturesClientV2 for futures
WebSocket Client
Subscribe to real-time market data and account updates
What’s included
The SDK exports three primary classes and a full set of TypeScript types:RestClient
Spot trading, margin, account management, and earn products
FuturesClientV2
USD-M perpetual futures with V2 domain and demo trading support
WebsocketClient
Unified real-time client for all spot and futures streams
Get started
Key features
Full TypeScript Support
Strongly-typed requests and responses for every endpoint. Autocomplete and compile-time safety out of the box.
Auto-Reconnecting WebSockets
Smart WebSocket persistence with heartbeat detection, automatic reconnection, and topic resubscription.
Browser Compatible
HMAC signing via the Web Crypto API works in both Node.js and browser environments without native modules.
ESM & CJS
Dual-build output. Import with
import or require — the correct entry point is resolved automatically.Demo Trading
Simulate futures strategies against BitMart’s demo environment using the same API keys.
Custom HMAC Signing
Inject a faster Node.js
createHmac implementation instead of Web Crypto for high-throughput scenarios.