binance-api-client
Async Rust client for Binance Spot REST and WebSocket APIs.
- Async REST client for market, account, wallet, and margin endpoints.
- WebSocket support for market streams and user data streams.
- Auth support for HMAC-SHA256, RSA-SHA256, and Ed25519 signatures.
- Production, testnet, and Binance.US configuration.
- Typed request builders and typed response models.
Usage
use Binance;
async
Authenticated usage:
use Binance;
async
Configuration
Config::default()for Binance production.Config::testnet()for Binance Spot testnet.Config::binance_us()for Binance.US.
Security
- Do not commit real API keys or secrets.
- Use environment variables, for example
BINANCE_API_KEYandBINANCE_SECRET_KEY. - Start from
.env.examplefor local development.
Examples
Run examples with: