1.5 KiB
1.5 KiB
Data layout and formats
This section describes the _data/ directory and the important files used by the scripts.
Important files
_data/market_data.db— SQLite database that stores candle tables. Tables are typically named<COIN>_<INTERVAL>(e.g.,BTC_1m,ETH_5m)._data/coin_precision.json— Mapping of coin names to their size precision (created bylist_coins.py)._data/current_prices.json— Latest market prices thatmarket.pywrites._data/fetcher_status.json— Last run metadata fromdata_fetcher.py._data/market_cap_data.json— Market cap summary saved bymarket_cap_fetcher.py._data/strategies.json— Configuration for strategies (enabled flag, parameters)._data/strategy_status_<name>.json— Per-strategy runtime status including last signal and price._data/executor_managed_positions.json— Which strategy is currently managing which live position (used bytrade_executor).
Candle schema
Each candle table contains columns similar to:
timestamp_ms(INTEGER) — milliseconds since epochopen,high,low,close(FLOAT)volume(FLOAT)number_of_trades(INTEGER)
Trade logs
- Persistent trade history is stored in
_logs/trade_history.csvwith the following columns:timestamp_utc,strategy,coin,action,price,size,signal,pnl.
Backups and maintenance
- Periodically back up
_data/market_data.db. The WAL and SHM files are also present when SQLite uses WAL mode. - Keep JSON config/state files under version control only if they contain no secrets.