JesusRS1 GitHub avatar

binance-trade-api

JesusRS1

A comprehensive Node.js SDK for Binance REST and WebSocket APIs, supporting spot, margin, futures, and delivery trading with automatic reconnection and proxy support.

Stars

142

7-day growth

No data

Forks

1,054

Open issues

0

License

MIT

Last updated

2026-07-14

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

Actively maintained with over 630 GitHub stars and 727 dependents, it offers typed TypeScript support, full API coverage including algo orders, and a robust WebSocket handling system.

Who it is for

  • Node.js developers building trading bots
  • Crypto quantitative analysts
  • Integrators of Binance exchange APIs
  • Developers of portfolio management tools

Use cases

  • Automated spot, futures, and margin trading strategies
  • Real-time market data streaming and charting
  • Order management with stop-losses and iceberg orders
  • Backtesting infrastructure using Binance historical data

Strengths

  • Complete API coverage across spot, margin, futures, and delivery
  • Built-in WebSocket auto-reconnection and proxy support
  • Modern async/await syntax with TypeScript types for ESM and CJS
  • Strong community with Telegram chat, frequent updates, and extensive examples

Considerations

  • Testnet support is deprecated; Portfolio Margin API is not yet available
  • Requires Binance API keys and is subject to exchange rate limits
  • Major version 1.0.0 introduced breaking changes requiring migration from older versions

README quick start

Binance Trade API

This project is designed to help you make your own projects that interact with the Binance API. You can stream candlestick chart data, market depth, or use other advanced features such as setting stop losses and iceberg orders. This project seeks to have complete API coverage including WebSockets.

Futures API & Streams • Spot Trading API & Streams • Margin API • Lending API Examples • Troubleshooting • Changelog • Support

Installation

npm install node-binance-api

Community Telegram Chat

https://t.me/nodebinanceapi

This project is powered by

Actively maintained, typed, and safe SDK for the Binance REST APIs and Websockets. Supports ESM and CJS out of the box.

Features

  • Spot, Margin, Futures and Delivery API (including the new algoOrder service)
  • Demo trading support
  • Testnet support (deprecated)
  • Proxy support (REST and WS, including the new WS-API)
  • Customizable HTTP headers
  • Customizable request parameters
  • RSA/ECDSA support
  • Portfolio Margin API *soon*
  • Websocket handling with automatic reconnection
  • RecvWindow and automatic timestamps generation
  • Ability to call any endpoint, even if not supported directly by the library
  • Overridable hostnames (.us, .jp, etc)
  • Verbose mode to debug http requests/responses

Upgrading to v1.0.0+

We highly advise you to update from 0.0.X but minor adjustments might be needed.

The library was fully refactored to use a modern and typed JavaScript/Typescript version, using the built-in await/async syntax and unifying some methods' signatures. Some important changes include the removal of callbacks as parameters of REST methods, adaptation of signatures to directly receive some important request values (symbol, orderId, ...), among others.

Getting started (ESM)

import Binance from 'node-binance-api';
async function run() {
    const exchange = new Binance();
    const res = await exchange.futuresTime();
    console.log( res );
}

Getting started (CJS)

const Binance = require('node-binance-api');
const binance = new Binance({
  APIKEY: '',
  APISE

Description

Node Trade API for Binance designed to be easy to use.

Related repositories

Similar projects matched by category, topics, and programming language.

TanStack
Featured
TanStack GitHub avatar

router

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.

Web DevelopmentFrontend Frameworks
14,861
vercel-labs
Featured
vercel-labs GitHub avatar

scriptc

scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.

Developer ToolsCode Quality & Build
1,985
Jakubantalik
Featured
Jakubantalik GitHub avatar

thinking-orbs

A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.

AI & Machine LearningAI Agents
1,191