Official collection of auto-generated Rust SDK modules for Binance APIs.
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.
Before using the connector, ensure you have:
- Rust (version 1.86.0 or later)
- cargo (comes with Rust)
Install or update Rust via rustup:
rustup install 1.86.0
rustup default 1.86.0
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 connectorc2c
– C2C connectorconvert
– Convert connectorcopy_trading
– Copy Trading connectorcrypto_loan
– Crypto Loan connectorderivatives_trading_coin_futures
– Derivatives Trading (COIN-M Futures) connectorderivatives_trading_options
– Derivatives Trading (Options) connectorderivatives_trading_portfolio_margin
– Derivatives Trading (Portfolio Margin) connectorderivatives_trading_portfolio_margin_pro
– Derivatives Trading (Portfolio Margin Pro) connectorderivatives_trading_usds_futures
– Derivatives Trading (USDS-M Futures) connectordual_investment
– Dual Investment connectorfiat
– Fiat connectorgift_card
– Gift Card connectormargin_trading
– Margin Trading connectormining
– Mining connectornft
– NFT connectorpay
– Pay connectorrebate
– Rebate connectorsimple_earn
– Simple Earn connectorspot
– Spot Trading connectorstaking
– Staking connectorsub_account
– Sub Account connectorvip_loan
– VIP Loan connectorwallet
– Wallet connector
- Crate documentation: docs.rs/binance_sdk
- Official Binance API docs: Binance API Documentation
Add binance-sdk
to your Cargo.toml
, enabling only the features you need. For example, to include Spot
and USDS-M Futures
modules:
[dependencies]
binance-sdk = { version = "1.0.0", features = ["derivatives_trading_usds_futures", "spot"] }
If you require all available connectors:
[dependencies]
binance-sdk = { version = "1.0.0", features = ["all"] }
This repository contains auto-generated code using OpenAPI Generator. To contribute or request changes:
- Open a GitHub issue to discuss new features, bugs, or enhancements.
- Fork the repository, make your changes, and submit a pull request.
- 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.
This project is licensed under the MIT License. See the LICENCE file for details.