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

binance-connector-rust

> 编程语言
Open source

Simple Rust connector to Binance API

325 stars0 likes0 views
WebsiteGitHub

About

Simple Rust connector to Binance API

Binance Rust Connector

Official collection of auto-generated Rust SDK modules for Binance APIs.

Migration Guide

If you're upgrading from the previous connector, refer to our Migration Guide for detailed steps on transitioning to the new modular structure. The legacy connector will still be available for a limited time. You can find the code for the old connector in the legacy branch.

Prerequisites

Before using the connector, ensure you have:

  • Rust (version 1.86.0 or later)
  • cargo (comes with Rust)

Install or update Rust via rustup:

bash
rustup install 1.86.0
rustup default 1.86.0

Available Modules

All connectors are bundled within the single binance-sdk crate. Enable only the modules you need by specifying feature flags. Available features are:

  • algo – Algo Trading connector
  • alpha – Alpha connector
  • c2c – C2C connector
  • convert – Convert connector
  • copy_trading – Copy Trading connector
  • crypto_loan – Crypto Loan connector
  • derivatives_trading_coin_futures – Derivatives Trading (COIN-M Futures) connector
  • derivatives_trading_options – Derivatives Trading (Options) connector
  • derivatives_trading_portfolio_margin – Derivatives Trading (Portfolio Margin) connector
  • derivatives_trading_portfolio_margin_pro – Derivatives Trading (Portfolio Margin Pro) connector
  • derivatives_trading_usds_futures – Derivatives Trading (USDS-M Futures) connector
  • dual_investment – Dual Investment connector
  • fiat – Fiat connector
  • gift_card – Gift Card connector
  • margin_trading – Margin Trading connector
  • mining – Mining connector
  • pay – Pay connector
  • rebate – Rebate connector
  • simple_earn – Simple Earn connector
  • spot – Spot Trading connector
  • staking – Staking connector
  • stocks – Stocks connector
  • sub_account – Sub Account connector
  • vip_loan – VIP Loan connector
  • w3w_prediction – W3W Prediction connector
  • wallet – Wallet connector

Documentation

  • Crate documentation: docs.rs/binance_sdk
  • Official Binance API docs: Binance API Documentation

Installation

Add binance-sdk to your Cargo.toml, enabling only the features you need. For example, to include Spot and USDS-M Futures modules:

toml
[dependencies]
binance-sdk = { version = "1.0.0", features = ["derivatives_trading_usds_futures", "spot"] }

If you require all available connectors:

toml
[dependencies]
binance-sdk = { version = "1.0.0", features = ["all"] }

TLS Backend Selection

This library supports both OpenSSL (default) and Rustls backends.

Default (OpenSSL): Standard installation uses OpenSSL. This requires OpenSSL development headers to be installed on your system.

toml
[dependencies]
binance-sdk = { version = "1.0.0", features = ["spot"] }

Using Rustls (Pure Rust): To use rustls (useful for cross-compilation or avoiding C-dependencies), you must disable default features and enable rustls-tls.

Note: Private key signing features currently require the openssl-tls feature.

toml
[dependencies]
binance-sdk = { version = "1.0.0", default-features = false, features = ["rustls-tls", "spot"] }

Contributing

This repository contains auto-generated code using OpenAPI Generator. To contribute or request changes:

  1. Open a GitHub issue to discuss new features, bugs, or enhancements.
  2. Fork the repository, make your changes, and submit a pull request.
  3. Respect the code generation workflow — manual edits to generated files will be overwritten.

Please ensure all new code is covered by existing or new tests. We follow Rust API Guidelines for naming and documentation.

Disclaimer

This SDK is provided by Binance on an "as is" and "as available" basis for use at your own risk. Binance makes no representations or warranties of any kind, whether express or implied, as to the operation of the SDK, its accuracy, reliability, completeness, or fitness for any particular purpose.

To the fullest extent permitted by law, Binance shall not be liable for any losses, damages, or expenses of any kind arising from or in connection with your use of, or inability to use, this SDK, including but not limited to any financial losses resulting from errors, bugs, interruptions, or inaccuracies in the SDK.

Your use of this SDK to access the Binance Platform is subject to the Binance API Key Terms and the Binance Terms of Use, which shall prevail in the event of any conflict with this disclaimer. You are solely responsible for any orders or transactions executed through the Binance Platform using this SDK.

This SDK is not intended to constitute investment advice or a recommendation to buy, sell, or hold any digital asset. You should independently evaluate and verify all information before acting.

  • Binance Terms of Use
  • Binance API Key Terms

License

This project is licensed under the MIT License. See the LICENCE file for details.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustbinance-apiconnectorcryptolibrary

No comments yet. Be the first to share.

> Details

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

> Related tools

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