Skip to content

fyers-store Documentation

fyers-store is a safety-focused FYERS Store/Broker/DataFeed integration for Backtrader, plus a set of adapters and helpers for non-Backtrader workflows. It is built for live trading reliability, deterministic recovery, and operator clarity.

Who This Is For

  • Algo traders who want a production-grade FYERS integration.
  • Operators who need clear runbooks and failure recovery steps.
  • Developers and infrastructure engineers who need deterministic behavior and auditability.
  • Code reviewers and auditors who require explicit safety constraints.
  • New contributors who need a clear architecture and module map.

What Problems It Solves

  • Reliable market data ingestion with bounded queue drains and cache-first history.
  • Safe order routing with explicit failure modes and reconciliation rules.
  • Crash-safe runtime state persistence separate from historical cache.
  • Consistent path resolution for configs, secrets, and logs across dev and installs.
  • Operator-friendly logging and health checks.

Safety-First Philosophy

  • Live order retries are dangerous because FYERS does not support client idempotency keys.
  • Reconciliation is fail-fast by default to prevent trading on stale state.
  • Tokens expire daily and can be invalidated by multi-device logins; the system detects and surfaces this quickly.
  • Environment guards prevent accidental live orders in DEV/PAPER modes.

Documentation Map

Start here based on your role: - Quickstart: docs/QUICKSTART.md - Architecture: docs/architecture/system-overview.md - Operations: docs/ops/daily-operations.md - Configuration: docs/config/overview.md - Usage patterns: docs/usage/backtrader-setup.md - Developer deep dive: docs/dev/store.md - FYERS mapping: docs/fyers/mapping.md - Troubleshooting: docs/troubleshooting/common-errors.md - Visual diagrams: docs/visuals/README.md - Testing: docs/testing/strategy.md - Migration: docs/migration/from-custom-fyers-2.md

Scenario-Based Examples (Quick Index)

  • Backtest on multiple symbols: examples/portfolio_backtest_two_symbols.py
  • Backtest to live handoff: examples/backtest_to_live.py
  • DIY backtest without Backtrader: examples/diy_backtest_no_backtrader.py
  • Guarded live signal loop: examples/live_signal_loop.py
  • Overview narrative: docs/overview.md
  • Legacy mapping reference: docs/fyers_mapping.md
  • Decision log: docs/Architecture.md