MCPcopy Index your code
hub / github.com/Igosuki/binance-rs-async

github.com/Igosuki/binance-rs-async @v1.2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.1 ↗ · + Follow
457 symbols 798 edges 26 files 149 documented · 33%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

binance-rs-async

Unofficial Rust Library for the Binance API

This is a fully async api using tokio.

Current state

The current beta aims at implementing every single endpoint on the binance docs. Currently, futures and savings have been implemented but not thoroughly tested.

Usage

Add this to your Cargo.toml

[dependencies]
binance-rs-async = "1.2.1"

Roadmap

  • 1.0.0 Completely tested margin sapi endpoints
  • 1.0.* Changelog check to detect binance API changes
  • 1.1.* Wallet API
  • 1.2.* Complete tested futures (m-coin and usd-m futures)

Risk Warning

It is a personal project, use at your own risk. I will not be responsible for your investment losses. Cryptocurrency investment is subject to high market risk. Nonetheless, this crate is aimed at high performance and production use, I have been using this to target Binance successfully for several years now.

Using TLS

By default, the crate uses native-tls for tungstenite and reqwest because I believe it's simpler and faster to let the user switch LibreSSL or OpenSSL versions rather than rebuild the program.

You can however disable default-features and use rust-tls, which might be helpful in certain situations such as CI or dev box.

Rust >= 1.37

rustup install stable

Contribution

Simply create a pull request. Properly documented code and tests (using binance testnet) are a must.

Extension points exported contracts — how you extend this code

Binance (Interface)
(no doc) [10 implementers]
src/api.rs

Core symbols most depended-on inside this repo

get_signed_p
called by 50
src/client.rs
post_signed_p
called by 17
src/client.rs
to_f64
called by 16
src/util.rs
get
called by 14
src/client.rs
get_d
called by 12
src/client.rs
build_signed_request
called by 11
src/util.rs
build_signed_request_p
called by 10
src/util.rs
get_signed
called by 9
src/client.rs

Shape

Method 186
Class 176
Function 52
Enum 42
Interface 1

Languages

Rust100%

Modules by API surface

src/rest_model.rs147 symbols
src/margin.rs49 symbols
src/futures/rest_model.rs33 symbols
src/futures/market.rs25 symbols
src/wallet.rs24 symbols
src/ws_model.rs20 symbols
src/websockets.rs20 symbols
src/client.rs20 symbols
src/account.rs19 symbols
src/futures/account.rs18 symbols
src/market.rs12 symbols
src/util.rs10 symbols

For agents

$ claude mcp add binance-rs-async \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page