Exchange.py:
- Add get_trading_fees(symbol) - fetches fees from market data
- Tries user-specific fees for authenticated users (fetch_trading_fees)
- Falls back to market data (public)
- Returns maker/taker rates with source indicator
- Add get_margin_info(symbol) - returns margin trading availability
ExchangeInterface.py:
- Add get_trading_fees() - routes to appropriate exchange
- Add get_margin_info() - routes to appropriate exchange
- Both methods handle user/exchange lookup with fallback to defaults
trade.py:
- Update new_trade() to fetch actual fees from exchange
- Uses taker fee for market orders, maker fee for limit orders
- Falls back to exchange_fees defaults if fetch fails
Fees now come from actual exchange data (0.1% for Binance spot)
instead of hardcoded defaults.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>