babel_exchange 1.4.0 copy "babel_exchange: ^1.4.0" to clipboard
babel_exchange: ^1.4.0 copied to clipboard

A unified multi-exchange API client for Binance, MEXC, and Kraken. Supports REST, WebSocket, and provides a common interface across all exchanges.

Changelog #

1.4.0 #

Added #

  • Wallet Features: Full deposit and withdrawal support across all exchanges

    • getDepositAddress(asset, network) - Get deposit address for any asset
    • getDepositHistory() - View deposit history with filtering
    • withdraw(asset, address, amount, network, tag) - Request withdrawals
    • getWithdrawalHistory() - View withdrawal history with filtering
    • getAssetInfo() - Get asset/coin information including networks
  • Wallet Models: New models for wallet operations

    • DepositAddress - Deposit address with network and tag support
    • Deposit - Deposit history entry with status tracking
    • Withdrawal - Withdrawal request/history with fee and status
    • DepositStatus enum - pending, success, credited
    • WithdrawalStatus enum - emailSent, cancelled, awaitingApproval, rejected, processing, failure, completed
    • NetworkInfo - Network/chain information (fees, limits, confirmations)
    • AssetInfo - Asset information including all supported networks

Fixed #

  • Binance -1104 Error: Fixed "Not all sent parameters were read" error by adding explicit signed flag to authenticated requests
    • Public endpoints no longer receive authentication parameters
    • Proper separation of public vs private API calls

Changed #

  • Test Suite: Now includes 104 unit tests (up from 87)

1.3.0 #

Added #

  • Debug Logging: New BabelDebug class for debugging API interactions
    • Enable via factory: BabelExchange.create(Exchange.binance, debug: true)
    • Log levels: verbose, debug, info, warning, error
    • Logs HTTP requests/responses, WebSocket events, and exceptions
    • Custom log handler support for integration with logging frameworks
  • Coin Enum: Type-safe cryptocurrency asset selection with 50+ coins
    • Major coins: BTC, ETH, SOL, XRP, ADA, AVAX, DOGE, DOT, LINK, etc.
    • Stablecoins: USDT, USDC, BUSD, DAI, FRAX, etc.
    • Exchange tokens: BNB, MX, CRO, etc.
    • Helper methods: isStablecoin, isQuoteAsset, fromString()
  • TradingPair Class: Type-safe trading pair construction
    • Create pairs: TradingPair(Coin.btc, Coin.usdt)'BTCUSDT'
    • 30+ predefined pairs: TradingPair.btcUsdt, TradingPair.ethBtc, etc.
    • Equality and hashCode support for use in collections

Changed #

  • Test Suite: Now includes 87 unit tests (up from 74)

Internal #

  • Added debug logging to MEXC, Binance, and Kraken HTTP clients
  • All API errors now logged when debug mode is enabled

1.2.0 #

Added #

  • SymbolStatus Enum: New enum for symbol trading status with values: trading, break_, halt, haltBuyOnly, haltSellOnly, auctionMatch, preTrading, postTrading, endOfDay
    • Helper getters: isActive, canBuy, canSell
  • SymbolInfo.canBuy / canSell: New getters to check if buying/selling is allowed based on symbol status

Changed #

  • SymbolInfo.status: Changed from String to SymbolStatus enum for type safety
  • AccountInfo.accountType: Changed from String to AccountType enum for type safety
  • Test Suite: Now includes 74 unit tests (up from 73)

Internal #

  • Removed 28 unused Binance internal files, reducing codebase size
  • Extracted ExchangeUtils mixin for shared exchange functionality
  • Improved exception translation in BinanceExchange
  • Fixed Kraken timestamp handling bugs
  • Fixed MexcExchange.baseUrl property

1.1.0 #

Added #

  • Binance Exchange Support: Full integration of Binance Spot API

    • Market data (tickers, klines, order book, trades, prices)
    • Trading (market/limit orders, order management, trade history)
    • Account information and balances
    • WebSocket streams for real-time data
  • Kraken Exchange Support: Complete Kraken Spot API implementation

    • Market data endpoints with Kraken symbol normalization
    • Trading endpoints with Kraken's unique authentication scheme
    • Account and balance queries
    • WebSocket token management (scaffolding for WebSocket streams)
  • Comprehensive Test Suite

    • Core enum tests (OrderSide, OrderType, OrderStatus, TimeInForce, KlineInterval, Exchange, AccountType)
    • Core model tests (Candle, OrderBook, Ticker, AggTrade, Balance, Order, Fill, Trade, AccountInfo, ExchangeInfo, SymbolInfo)
    • 73+ unit tests with full coverage
  • Example Files

    • example/market_data_example.dart - Market data fetching across exchanges
    • example/trading_example.dart - Order placement and management
    • example/websocket_example.dart - Real-time streaming data
  • Enhanced Documentation

    • Comprehensive dartdoc comments for all enums
    • Detailed API documentation with examples
    • Improved code comments throughout

Changed #

  • Factory now supports all three exchanges (Binance, MEXC, Kraken)
  • Fixed MEXC model parsing to align with core models
  • Updated library exports to include all exchange implementations

Fixed #

  • MEXC Candle model now uses correct numberOfTrades instead of trades
  • MEXC Order model uses origQty instead of quantity
  • AggTrade timestamp parsing fixed for proper DateTime conversion

1.0.0 #

  • Initial release
  • Unified ExchangeApi interface for all exchanges
  • Full MEXC Spot API support
    • Market data (tickers, klines, order book, trades)
    • Trading (market/limit orders, order management)
    • Account (balances, trade history)
    • WebSocket streams
  • Core models with toJson()/fromJson() support
  • Comprehensive exception hierarchy
  • Fee calculation utilities
0
likes
150
points
34
downloads

Documentation

API reference

Publisher

verified publishermaycloud.uk

Weekly Downloads

A unified multi-exchange API client for Binance, MEXC, and Kraken. Supports REST, WebSocket, and provides a common interface across all exchanges.

Repository (GitHub)

Topics

#cryptocurrency #trading #api-client #binance #kraken

License

MIT (license)

Dependencies

crypto, http, web_socket_channel

More

Packages that depend on babel_exchange