Skip to content

Backtrader Setup

This page shows the recommended way to wire fyers-store into Backtrader.

Start with the quick scripts to validate credentials, cache, and live data flow:

  • examples/quick_scripts/quick_history_fetch.py
  • examples/quick_scripts/quick_live_trading.py

When you are ready to wire Backtrader directly, use the reference scripts under examples/ as detailed wiring examples (they intentionally show the full setup).

What NOT To Do

  • Do not create multiple Store instances for the same process.
  • Do not start the Order WS before reconciliation completes.
  • Do not ignore AuthError or ReconcileFailureError.

Scenario Example

Scenario: You start the data feed but orders never update. - Ensure the broker is created and started so the Order WS is running. - Use a heartbeat to drain order notifications (see docs/usage/order-heartbeat.md).