babel_exchange 1.4.0
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 assetgetDepositHistory()- View deposit history with filteringwithdraw(asset, address, amount, network, tag)- Request withdrawalsgetWithdrawalHistory()- View withdrawal history with filteringgetAssetInfo()- Get asset/coin information including networks
-
Wallet Models: New models for wallet operations
DepositAddress- Deposit address with network and tag supportDeposit- Deposit history entry with status trackingWithdrawal- Withdrawal request/history with fee and statusDepositStatusenum - pending, success, creditedWithdrawalStatusenum - emailSent, cancelled, awaitingApproval, rejected, processing, failure, completedNetworkInfo- 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
signedflag 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
BabelDebugclass 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
- Enable via factory:
- 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
- Create pairs:
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
- Helper getters:
- SymbolInfo.canBuy / canSell: New getters to check if buying/selling is allowed based on symbol status
Changed #
- SymbolInfo.status: Changed from
StringtoSymbolStatusenum for type safety - AccountInfo.accountType: Changed from
StringtoAccountTypeenum for type safety - Test Suite: Now includes 74 unit tests (up from 73)
Internal #
- Removed 28 unused Binance internal files, reducing codebase size
- Extracted
ExchangeUtilsmixin for shared exchange functionality - Improved exception translation in
BinanceExchange - Fixed Kraken timestamp handling bugs
- Fixed
MexcExchange.baseUrlproperty
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 exchangesexample/trading_example.dart- Order placement and managementexample/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
numberOfTradesinstead oftrades - MEXC Order model uses
origQtyinstead ofquantity - AggTrade timestamp parsing fixed for proper DateTime conversion
1.0.0 #
- Initial release
- Unified
ExchangeApiinterface 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