一个全面的Node.js SDK,用于Binance REST和WebSocket API,支持现货、保证金、期货和交割交易,具备自动重连和代理支持。

Stars

142

7 天增长

暂无数据

Fork 数

1,054

开放 Issue

0

开源协议

MIT

最近更新

2026-07-14

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

拥有超过630个GitHub星标和727个依赖项目,活跃维护,提供类型化的TypeScript支持,完整的API覆盖(包括算法订单),以及健壮的WebSocket处理系统。

适合谁使用

  • 构建交易机器人的Node.js开发者
  • 加密货币量化分析师
  • 集成Binance交易所API的开发人员
  • 开发投资组合管理工具的程序员

典型使用场景

  • 自动化的现货、期货和保证金交易策略
  • 实时市场数据流和图表绘制
  • 带有止损和冰山订单的订单管理
  • 使用Binance历史数据进行回测的基础架构

项目优势

  • 覆盖现货、保证金、期货和交割的完整API
  • 内置WebSocket自动重连和代理支持
  • 现代化的async/await语法,提供TypeScript类型,支持ESM和CJS
  • 活跃的社区(Telegram群组),频繁更新,丰富的示例代码

使用前须知

  • 测试网支持已弃用;投资组合保证金API尚未支持
  • 需要Binance API密钥,并受交易所速率限制
  • 1.0.0主版本引入了破坏性更改,从旧版本迁移需要调整

README 快速开始

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

项目描述

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

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

TanStack
精选
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 开发前端框架
14,861
vercel-labs
精选
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.

开发者工具代码质量与构建
1,985
Jakubantalik
精选
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 与机器学习AI 智能体
1,191