Go to file
kroutony ce88afdb96 Add cost basis sync, fix stop-loss reliability, improve reporting
- New sync_cost_basis.py: recalculate entry_price from order history,
  sync amounts/balances from wallet (cron every 30 min)
- Fix stop-loss ID staleness: update stop_orders_by_sym in step 2b
  after placing new stops, preventing SELL failures from stale IDs
- Fix position limit inconsistency: use same total_balance in
  validate_trade instead of calling check_position_limit
- Skip stop-loss for positions below MIN_ORDER_AMOUNT
- Add API response body logging for 500 errors
- Cancel "Order not found" treated as success (not error)
- Post-trade wallet refresh to ensure fresh balances
- Report: show total value, total return %, exclude dust positions
- Crontab offset +1 min from candle close for complete data
- Handle PARTIALLY FILLED order status in cost calculation
- Sort orders by mts_create in Python (Bitfinex sort unreliable)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:18:49 +00:00
.env.example Initial commit: LLM-driven crypto trading bot 2026-03-13 03:25:18 +00:00
.gitignore Initial commit: LLM-driven crypto trading bot 2026-03-13 03:25:18 +00:00
config.py Add cost basis sync, fix stop-loss reliability, improve reporting 2026-03-13 11:18:49 +00:00
cost_tracking.json Add cost basis sync, fix stop-loss reliability, improve reporting 2026-03-13 11:18:49 +00:00
data_fetcher.py Add cost basis sync, fix stop-loss reliability, improve reporting 2026-03-13 11:18:49 +00:00
indicators.py Initial commit: LLM-driven crypto trading bot 2026-03-13 03:25:18 +00:00
llm_analyzer.py Initial commit: LLM-driven crypto trading bot 2026-03-13 03:25:18 +00:00
main.py Add cost basis sync, fix stop-loss reliability, improve reporting 2026-03-13 11:18:49 +00:00
portfolio.py Initial commit: LLM-driven crypto trading bot 2026-03-13 03:25:18 +00:00
requirements.txt Initial commit: LLM-driven crypto trading bot 2026-03-13 03:25:18 +00:00
risk_manager.py Add cost basis sync, fix stop-loss reliability, improve reporting 2026-03-13 11:18:49 +00:00
slack_notifier.py Initial commit: LLM-driven crypto trading bot 2026-03-13 03:25:18 +00:00
sync_cost_basis.py Add cost basis sync, fix stop-loss reliability, improve reporting 2026-03-13 11:18:49 +00:00
trade_logger.py Initial commit: LLM-driven crypto trading bot 2026-03-13 03:25:18 +00:00
trader.py Add cost basis sync, fix stop-loss reliability, improve reporting 2026-03-13 11:18:49 +00:00