AuditsControls › Fees and funding in the accounting

Accounting and reconciliation · control 11 of 21

Fees and funding in the accounting: does your trading bot have it?

Does it subtract maker and taker fees and, on perpetuals, funding payments when computing profit and position size?

Why it matters

Without them the profit shown is inflated and the real position is larger than the sizing assumed.

How to check it in the code

  1. Search for fee, commission, funding, taker, maker.
  2. Check the profit calculation includes the fees the exchange returned for the fill.
  3. On perpetuals, check funding is read from the exchange and applied.

This is what the audit does for every bot in the list, on public code, without installing or running anything. Verdict values: present, partial, absent, not applicable, not verified. See the method.

Results across audited bots

Across 10 audited bots: 4 present, 5 partial, 0 absent, 0 not applicable, 1 not verified.

BotVerdictEvidenceNote
HKUDS/Vibe-TradingNot verifiedagent/src/live/enforcement.py exposure math uses raw market_value from broker position rows; agent/backtest/factor_costs.py models fees but is backtest-onlyNot confirmed whether the live gate deducts fees/funding when sizing/valuing exposure.
hummingbot/hummingbotPresenthummingbot/core/utils/estimate_fee.py (maker/taker fee estimation); hummingbot/model/funding_payment.py (perpetual funding payment record)Both trading fees and perpetual funding payments are modeled and recorded.
Drakkar-Software/OctoBotPartialtelegram_bot.py exposes a /fees command ('Displays the total amount of fees I paid since I started'), confirming fee tracking/reporting exists.Fee accounting for reporting is confirmed; whether fees (and, for perpetuals, funding) are deducted when SIZING new orders was not verified due to time budget.
freqtrade/freqtradePresentdocs/exchanges.md (Gate.io 'unknown_fee_rate' for POINT fee currency, Binance/Kucoin fee-currency notes); freqtrade/freqtradebot.py update_funding_fees()/get_funding_fees() for futures trades; per-exchange fee overrides in freqtrade/exchange/gate.py and freqtrade/exchange/bitpanda.py (code search hit for get_trades_for_order, 2026-09-17)Maker/taker fees are fetched per exchange from real fills where possible, with a manual fallback rate for unsupported fee currencies; funding fees for futures positions are recalculated on a schedule.
jesse-ai/jessePartialjesse/models/FuturesExchange.py (charge_fee() computes fee_rate * amount, but starts with 'if jh.is_livetrading(): return', so it is skipped in live) + jesse/models/Position.py (funding_rate / next_funding_timestamp properties read from '_funding_rate'/'_next_funding_timestamp' fields that must be populated externally)Fee/funding accounting is fully modeled for backtest/paper; for live trading it depends on data pushed by jesse_live's stream, which cannot be inspected here.
chrisleekr/binance-trading-botPresentpackages/db/migrations/0093_trade_archive_fee_basis.sql; apps/worker/src/queues/pipeline-handlers/reconcile-fees.ts; LIVE_DEMO description in docs/_generated/config/env.md (blocks the "fee-reconciliation" route)A dedicated fee-basis column/migration and a fee-reconciliation worker job exist. Funding-rate handling for perpetuals is not applicable: every source read this session (deploy prerequisites, exchanges_soportados) points to Binance Spot only, no futures/perp endpoints found.
alsk1992/CloddsBotPartialsrc/trading/logger.ts defines PLATFORM_FEES and calculateTradeFees(), applying documented maker/taker bps for polymarket/kalshi/betfair/smarkets/manifold and logging fees/isMaker/makerRebate per trade. src/execution/futures.ts declares a FundingRate type for perpetuals, but funding-rate deduction from realized PnL or position sizing was not confirmed within budget.Prediction-market fees are modeled and logged; futures funding-rate accounting is unverified.
Lumiwealth/lumibotPartiallumibot/example_strategies/agent_news_sentiment.py passes `TradingFee(percent_fee=0.001)` as buy/sell fees into `.backtest(...)`, showing a fee-modeling entity (`lumibot.entities.TradingFee`) exists for backtesting.
YizhiSong/FriesTraderPresentInstrument is US equities via Robinhood only (no perpetuals/funding). PHASE_B_TASK.md's loss-limit section and scripts/pnl_pct.py source P&L from the broker's own get_realized_pnl/get_portfolio calls rather than recomputing it from raw fills, so any fee the broker applies is already reflected in those figures.Robinhood's exact current equity commission schedule was not independently re-verified against robinhood.com in this pass; relies on broker-reported P&L being fee-inclusive, which was not directly tested.
c9s/bbgoPartialpkg/types/position.go (Position.TotalFee, FeeAverageCosts, FeeRate, NewProfit() computing NetProfit net of trade fee)Trading fees are deducted when computing PnL, but no explicit funding-rate field or accumulator for perpetual futures funding payments was found in the code reviewed.

If your bot does not have it

The watchdog enforces daily loss, drawdown, position size and heartbeat limits from outside the bot, with a read-only key, whatever the bot's own code does.