Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/backtest-kit/backtest-kit-minio-s3-docker/llms.txt

Use this file to discover all available pages before exploring further.

All runtime configuration is supplied through environment variables — there are no config files. For local development, copy .env.example to .env and adjust the values as needed. For containerized deployments, pass the variables through your docker-compose.yaml environment: block or a .env file mounted alongside the service. The variables are read once at process start by src/config/params.ts; changing them after the process is running has no effect.
The default credentials (minioadmin / minioadmin for MinIO and mysecurepassword for Redis) are intentionally weak and exist only for zero-configuration local development. Replace every credential variable before deploying to any network-accessible environment.

Infrastructure variables

These nine variables are consumed by src/config/params.ts and forwarded to the MinIO, Redis, and MongoDB client factories. They must be reachable from every container or process that imports backtest-kit-minio-s3-docker.
CC_MINIO_ENDPOINT
string
default:"localhost"
Hostname or IP address of the MinIO S3 API server. In Docker Compose deployments this is typically host.docker.internal (to reach the host) or the service name of the MinIO container on a shared network.
CC_MINIO_PORT
number
default:"9000"
TCP port on which MinIO exposes its S3-compatible API. The MinIO default is 9000; change this only if your MinIO instance is configured to listen on a different port.
CC_MINIO_ACCESSKEY
string
default:"minioadmin"
MinIO access key (equivalent to an AWS access key ID). Must match the value configured in your MinIO server’s MINIO_ROOT_USER or the credentials of a dedicated IAM user.
CC_MINIO_SECRETKEY
string
default:"minioadmin"
MinIO secret key (equivalent to an AWS secret access key). Must match MINIO_ROOT_PASSWORD or the IAM user’s secret.
CC_REDIS_HOST
string
default:"127.0.0.1"
Hostname or IP address of the Redis server used as the time-ordered index. In Docker Compose deployments use host.docker.internal or the Redis service name.
CC_REDIS_PORT
number
default:"6379"
TCP port on which Redis listens. Matches the Redis default; only change if your Redis instance is bound to a non-standard port.
CC_REDIS_USER
string
default:"default"
Redis ACL username. The built-in default user is used when Redis is configured without explicit ACLs. Set this to a dedicated user in production deployments.
CC_REDIS_PASSWORD
string
default:"mysecurepassword"
Redis password for the user identified by CC_REDIS_USER. Must match the requirepass setting (or ACL user password) in your Redis configuration.
CC_MONGO_CONNECTION_STRING
string
MongoDB connection URI used by components that persist backtest metadata to MongoDB. The default points to a local MongoDB instance; override this with a full Atlas URI or Docker service address for production deployments.

Runtime variables

These variables are consumed by the @backtest-kit/cli container that runs the strategy bundle. They control which mode is active, which strategy file is loaded, and which optional features (UI, Telegram, verbose logging) are enabled.
MODE
string
required
Execution mode. Must be one of backtest, live, or paper. Required when running inside the Docker container; omitting it causes the CLI to exit immediately.
STRATEGY_FILE
string
default:"./build/index.cjs"
Path to the compiled strategy bundle inside the container. The default assumes you have mounted your build output to ./build/index.cjs. Override this when your build pipeline outputs to a different path or filename.
ENTRY
string
Safety guard that must be set to 1 for the strategy to actually execute. When absent the CLI performs a dry-run startup and exits. This prevents accidentally running a strategy without confirming all configuration is correct.
SYMBOL
string
Overrides the symbol context declared inside the strategy (e.g. BTCUSDT). Useful for running the same strategy file against multiple symbols without recompiling.
STRATEGY
string
Overrides the strategy name context. Used to tag persisted data under a different name when running the same strategy logic with different parameters.
EXCHANGE
string
Overrides the exchange name context (e.g. binance). Useful when the same strategy file is deployed against multiple exchanges.
FRAME
string
Overrides the frame name context. Allows the same strategy to be run at different time-frame granularities without changing the strategy source.
UI
string
Set to 1 to enable the built-in web UI on port 60050. The UI provides a live dashboard for monitoring open positions, recent signals, and equity curves.
TELEGRAM
string
Set to 1 to enable Telegram notifications. Requires that the strategy or the CLI has been configured with a bot token and chat ID via additional strategy-level configuration.
VERBOSE
string
Set to 1 to enable verbose logging. Increases the log level to include debug-grade output from every service and persist adapter.
NO_CACHE
string
Set to 1 to disable candle caching. By default the CLI caches fetched candles to MinIO; setting this flag forces a fresh fetch from the exchange on every run.
NO_FLUSH
string
Set to 1 to disable the flush-on-shutdown behaviour. By default the CLI writes any buffered state to MinIO before exiting; setting this flag skips the flush, which is useful during development to avoid polluting persistent storage with incomplete runs.

.env.example

The repository ships an .env.example file that documents the infrastructure variables with inline comments. Copy it to .env for local development:
cp .env.example .env
# Infrastructure endpoints as seen from the backtest-kit container
# (docker-compose.yaml maps host.docker.internal to the host gateway).
# For a host-node run replace host.docker.internal with 127.0.0.1.

# MinIO (S3) — source of truth, see docker/minio/docker-compose.yaml
CC_MINIO_ENDPOINT=host.docker.internal
CC_MINIO_PORT=9000
CC_MINIO_ACCESSKEY=minioadmin
CC_MINIO_SECRETKEY=minioadmin

# Redis — time-ordered index, see docker/redis/docker-compose.yaml
CC_REDIS_HOST=host.docker.internal
CC_REDIS_PORT=6379
CC_REDIS_USER=default
CC_REDIS_PASSWORD=mysecurepassword

Build docs developers (and LLMs) love