Skip to content

Migration: custom_fyers_2 to fyers-store

This guide explains how to move an existing setup into the fyers-store structure.

Steps

  1. Copy existing config files into config/ under the new repo.
  2. Add version: 1 to each YAML file.
  3. Move historical cache DB to the path in config/cache.yaml.
  4. Move runtime state DB to the path in config/state.yaml (separate from cache).
  5. Copy tokens into secrets/fyers_token.json if you want to reuse them.

Assisted Migration

Use the CLI helper to copy templates and known DB paths:

fyers-store migrate

Safety Notes

  • Do not reuse a cache DB as the state DB.
  • Validate account_id in config/state.yaml.

Scenario Example

Scenario: You have a cache DB in a custom folder. - Set db_path in config/cache.yaml to that location. - Run a backtest to confirm cache reads succeed.