babel_binance 0.5.2
babel_binance: ^0.5.2 copied to clipboard
A comprehensive Dart wrapper for the Binance API, covering all major endpoints including Spot, Futures, Margin, and more.
Binance Dart #
A comprehensive, unofficial Dart wrapper for the public Binance API. It covers all 25 API collections, including Spot, Margin, Futures, Wallet, and more.
Features #
- Complete Coverage: Implements all 25 official Binance API collections.
- Type-Safe: Clean, readable, and type-safe Dart code.
- Authenticated & Unauthenticated: Access both public and private endpoints.
- Well-Structured: Each API collection is organized into its own class for clarity.
Installation #
Add this to your package's pubspec.yaml file:
dependencies:
babel_binance: ^0.5.2
Usage #
Import the main library and instantiate the API class for the collection you want to use.
import 'package:babel_binance/babel_binance.dart';
void main() async {
// Example: Get server time from the Spot API
final spot = Spot();
final serverTime = await spot.getServerTime();
print('Server Time: ${serverTime['serverTime']}');
// Example: Using an authenticated endpoint (replace with your keys)
final apiKey = 'YOUR_API_KEY';
final apiSecret = 'YOUR_API_SECRET';
final wallet = Wallet(apiKey: apiKey, apiSecret: apiSecret);
final accountInfo = await wallet.getAccountInformation();
print('Account Info: $accountInfo');
}
API Collections Included #
- Spot
- Margin
- Wallet
- Websockets
- Futures Coin
- Futures USD
- Sub-Account
- Fiat
- Mining
- BLVT
- Portfolio Margin
- Staking
- Savings
- C2C
- Pay
- Convert
- Rebate
- NFT
- Gift Card
- Loan
- Simple Earn
- Auto-Invest
- VIP-Loan
- Futures Algo
- Copy Trading