Every runtime behaviour ofDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-ollama-crontab/llms.txt
Use this file to discover all available pages before exploring further.
backtest-ollama-crontab is controlled through environment variables loaded from .env files at the root of each package. The monorepo ships two example files — packages/core/.env.example for the shared core library and a root-level .env.example that supplies Docker-friendly overrides — so you can get up and running by copying and editing rather than configuring from scratch.
Package layout
The monorepo splits configuration across two packages:| Package | File | Scope |
|---|---|---|
packages/core | packages/core/.env.example | MongoDB, Redis, Telegram API, Ollama token |
packages/main | packages/main/src/config/params.ts | Symbol watchlist |
process.env and fall back to hard-coded defaults defined in each package’s src/config/params.ts file, so the application always boots even without a .env present.
Core package variables
These variables are declared inpackages/core/src/config/params.ts and consumed by the crawler, Ollama client, Redis queue, and MongoDB persistence layer.
Full MongoDB connection URI. The database name (
backtest-pro by default) is
part of the URI. The wtimeoutMS=15000 timeout prevents hung write operations
from blocking the crontab indefinitely. When running the application outside
Docker while MongoDB runs inside a container, replace localhost with
host.docker.internal.Numeric MTProto application ID obtained from
my.telegram.org. The default value is a public
development credential included for convenience — replace it with your own
before going to production. Used by both the QR-code auth flow
(
packages/main/src/main/session.ts) and the live TelegramClient singleton
in getTelegram.Alphanumeric MTProto application hash that pairs with
CC_TELEGRAM_API_ID.
Obtain it from the same my.telegram.org dashboard.
Treat this value like a password.Bearer token forwarded as the
Authorization header when connecting to a
hosted Ollama instance. Leave empty (the default) when Ollama is running
locally without authentication. The getOllama singleton in
packages/core/src/config/ollama.ts always sets the header, so an empty
string simply sends Authorization: Bearer which most local Ollama servers
ignore.Hostname or IP address of the Redis server. When the application runs on the
host machine and Redis runs inside Docker, set this to
host.docker.internal.TCP port that the Redis server listens on. Matches the default port exposed by
the bundled
docker/redis/docker-compose.yaml.Redis ACL username. The Docker Compose setup uses the built-in
default user
with a password, so this value rarely needs to change unless you configure
custom ACL rules.Password for the Redis ACL user defined by
CC_REDIS_USER. Must match the
--requirepass argument passed to redis-server in
docker/redis/docker-compose.yaml. Change this before exposing Redis to any
network other than localhost.Main package variables
The following variable is declared inpackages/main/src/config/params.ts and controls which trading pairs the crawler and crontab fetch data for.
Comma-separated list of Binance-style symbol strings. The value is split on
commas and each entry is trimmed of whitespace before use, so both
BTCUSDT,ETHUSDT and BTCUSDT, ETHUSDT are valid. Add or remove symbols to
narrow or broaden the set of signals the crawler processes on each 15-minute
tick.Example .env files
.env inside the appropriate directory:
The root
.env.example uses host.docker.internal instead of 127.0.0.1
for both CC_REDIS_HOST and the MongoDB connection string. Use these values
whenever MongoDB and Redis are running inside Docker containers while the
Node.js process runs directly on your host machine. On Linux you may need to
add --add-host=host.docker.internal:host-gateway to your Docker run command
if host.docker.internal is not automatically resolved.