babel_binance 0.5.2 copy "babel_binance: ^0.5.2" to clipboard
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.

example/babel_binance_example.dart

import 'package:babel_binance/babel_binance.dart';

void main() async {
  final binance = Binance(
    apiKey: 'YOUR_API_KEY',
    apiSecret: 'YOUR_API_SECRET',
  );

  // Get server time
  try {
    final serverTime = await binance.spot.market.getServerTime();
    print('Server Time: $serverTime');
  } catch (e) {
    print('Error getting server time: $e');
  }

  // Get exchange info
  try {
    final exchangeInfo = await binance.spot.market.getExchangeInfo();
    print('Exchange Info: $exchangeInfo');
  } catch (e) {
    print('Error getting exchange info: $e');
  }

  // Get order book
  try {
    final orderBook =
        await binance.spot.market.getOrderBook('BTCUSDT', limit: 10);
    print('Order Book: $orderBook');
  } catch (e) {
    print('Error getting order book: $e');
  }
}
1
likes
0
points
87
downloads

Publisher

verified publishermaycloud.uk

Weekly Downloads

A comprehensive Dart wrapper for the Binance API, covering all major endpoints including Spot, Futures, Margin, and more.

Repository (GitHub)
View/report issues

Topics

#api #binance #dart #cryptocurrency #trading

License

unknown (license)

Dependencies

crypto, http, web_socket_channel

More

Packages that depend on babel_binance