Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

binance-rs

> 编程语言
Open source

Rust Library for the Binance API

860 stars0 likes0 views
WebsiteGitHub

About

Rust Library for the Binance API

binance-rs

Unofficial Rust Library for the Binance API and Binance Futures API (Under development with upcoming breaking changes) Documentation on docs.rs

Binance API Telegram

Usage

Add this to your Cargo.toml

toml
[dependencies]
binance = { git = "https://github.com/ccxt/binance-rs.git" }

Rust >= 1.56.1

rust
rustup install stable

Table of Contents

  • MARKET DATA
  • ACCOUNT DATA
  • ERROR HANDLING
  • TESTNET AND API CLUSTERS
  • USER STREAM CONFIGURATION
  • WEBSOCKETS
    • USER STREAM
    • TRADES
    • KLINE
    • MULTIPLE STREAMS

MARKET DATA

…

ACCOUNT DATA

…

ERROR HANDLING

Provides more detailed error information

You can check out the Binance Error Codes

…

TESTNET AND API CLUSTERS

You can overwrite the default binance api urls if there are performance issues with the endpoints.

You can check out the Binance API Clusters.

The same is applicable for Testnet and Binance.US support. See example below:

rust
let general: General = if use_testnet {
    let config = Config::default().set_rest_api_endpoint("https://testnet.binance.vision");
                                  // .set_ws_endpoint("wss://testnet.binance.vision/ws")
                                  // .set_futures_rest_api_endpoint("https://testnet.binancefuture.com/api")
                                  // .set_futures_ws_endpoint("https://testnet.binancefuture.com/ws")
    Binance::new_with_config(None, None, &config)
} else {
    Binance::new(None, None)
};

USER STREAM CONFIGURATION

…

USER STREAM

…

TRADES

…

KLINE

…

MULTIPLE STREAMS

…

Other Exchanges

If you use Bitfinex check out my Rust library for bitfinex API

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustbinancebinance-apibinance-exchangebinance-futures

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言