Documentation & FAQ

This page is a complete functional and technical guide for AlgoLumina: portal usage, tenant isolation, configuration model, data management, backtesting, optimization, AI-assisted workflows, API usage, and operations. It is designed to be readable on mobile while still being detailed enough for engineers.

Portal Tenancy Engine AI API Ops

Quick Start

Start

1) Access Your Portal

Sign in and open the tenant portal. Each tenant has an isolated dashboard where you manage configuration, view runtime status, and browse results (reports, logs, events).

2) Set Connector Credentials

Add exchange connector credentials using a private configuration file (recommended) or an encrypted secret store (deployment-dependent). Validate connectivity by loading account and market metadata via the portal health checks.

3) Define Scope

Define the market scope: instruments/pairs, timeframes, and required datasets. Start small: a limited allowlist is easier to validate and much easier to operate.

4) Download Data

If you will backtest or train models, download historical OHLCV datasets for your chosen scope. Use the default timeframes first, then expand as needed.

5) Run Backtesting

Run a backtest to validate logic, performance characteristics, and report outputs. Review drawdowns, trade frequency, and behavior during volatility spikes.

6) Start Engine

Start the engine with your chosen strategy, protections, and scope. Monitor the message feed and logs. If you enable AI workflows, start training with a conservative schedule and monitor model freshness.

Core Concepts

Fundamentals

Tenant Isolation

Every tenant is scoped by filesystem paths, runtime identity, and portal session context. Isolation means a tenant cannot read another tenant’s configuration, datasets, logs, or results.

Modes

  • Simulation: actions are computed and recorded without external execution.
  • Live: actions are submitted through connectors using tenant credentials and permissions.

Workflows

  • Data download and maintenance
  • Backtesting and analysis reports
  • Parameter optimization
  • AI training and prediction refresh
  • Runtime execution and monitoring

Architecture & Components

Technical

AlgoLumina typically runs as a portal + API gateway + engine workers. Tenants map to isolated data directories and isolated runtime instances (process or container). Heavy workflows (data download, backtests, optimization, AI training) can be scheduled to run outside the live runtime to keep latency stable.

Logical Flow

User → Portal UI → API Gateway → Tenant Resolver → Workflow Runner / Engine Control Plane ↘ Logs / Metrics / Storage (tenant-scoped)

Why Separation Matters

  • Portal stays responsive while workers handle heavy CPU/IO tasks.
  • Tenant isolation is simpler and more reliable.
  • Upgrades become safer: platform code upgrades do not require editing tenant data.

Tenancy & Isolation (Practical)

SaaS

Tenant Directory Layout (Recommended)

tenant/ config/ (config.json, private.json, strategy toggles) data/ (market datasets, caches) db/ (runtime db, results db) logs/ (engine logs, workflow logs) artifacts/ (reports, exports, optimization outputs) secrets/ (optional encrypted refs, not plaintext)

Provisioning

Provisioning is the act of creating tenant directories from templates, patching placeholders (domain, ports, connector keys), and registering the tenant in the portal identity store so the subdomain routes correctly.

Upgrade Strategy

Upgrades should be done by updating platform images/binaries and keeping tenant data intact. If config schema changes, migration should be additive and versioned.

CLI Reference

Commands

In many deployments, the portal triggers these workflows internally. In operator environments, the CLI is used directly. The command names below reflect the typical workflow set used by AlgoLumina deployments.

Create a Base Config

algolumina new-config --config user_data/config.json

Download Market Data (OHLCV)

algolumina download-data -c user_data/config.json --exchange binance algolumina download-data --exchange binance --pairs ETH/USDT BTC/USDT --days 30 --timeframes 1m 5m algolumina download-data --exchange binance --pairs ".*/USDT" --include-inactive-pairs --timerange 20200101-

Backtesting

algolumina backtesting -c user_data/config.json -s StrategyName -i 5m --timerange 20240101-20240601

Optimization

algolumina optimize -c user_data/config.json -s StrategyName --spaces roi stoploss trailing --epochs 200

Run Engine

algolumina run -c user_data/config.json -s StrategyName algolumina run -c user_data/config.json -s StrategyName --mode simulation algolumina run -c user_data/config.json -s StrategyName --mode live

Start Web/API Server

algolumina webserver -c user_data/config.json --listen 127.0.0.1 --port 8080

Configuration Model (Detailed)

Config

AlgoLumina uses JSON configuration files. Deployments commonly support inline comments and trailing commas to make configs maintainable. The engine validates config syntax on startup and reports problematic lines.

Config Composition (Merging)

Use a base config that contains non-sensitive settings, then merge a private config that contains connector credentials. A common pattern is referencing additional config files using add_config_files.

{ "add_config_files": ["config-private.json"], "stake_currency": "USDT", "max_open_trades": 3 }

Environment Overrides

Some deployments allow environment variables to override config values. The typical format is: ALGOLUMINA__SECTION__KEY.

export ALGOLUMINA__STAKE_AMOUNT=200 export ALGOLUMINA__API_SERVER__ENABLED=true

Common Sections

{ "tenant": { "id": "tenant01", "portal_subdomain": "tenant01" }, "connector": { "name": "binance", "key": "...", "secret": "...", "rate_limit": "auto" }, "market": { "pairs": ["BTC/USDT","ETH/USDT"], "timeframes": ["1m","5m"], "startup_candles": 400 }, "strategy": { "name": "StrategyName", "params": { "rsi_period": 14, "ema_fast": 12, "ema_slow": 26 } }, "risk": { "max_open_trades": 3, "stoploss": -0.10, "trailing": { "enabled": true, "positive": 0.01, "offset": 0.02 } }, "api_server": { "enabled": true, "listen_ip_address": "127.0.0.1", "listen_port": 8080, "username": "admin", "password": "strongpass", "ws_token": "..." }, "storage": { "db_path": "db/runtime.sqlite", "log_level": "info", "retention_days": 30 } }

Stop and Trailing Logic (Typical)

Trailing behavior usually activates after a positive offset is reached. Until then, the stop remains at the configured stop value. This prevents trailing from immediately tightening before any upside movement exists.

Protections

Protections are temporary blocks that pause actions for a pair or for the whole tenant after adverse events. Protection windows are commonly rounded to the next candle boundary to avoid inconsistent mid-candle transitions.

Data Download & Management

Data

Default Behavior

If you run download-data without specifying timeframes or range, a common default is downloading 1m and 5m for the last 30 days, using exchange and pairs from the active config when available.

Incremental Updates

When data already exists, the downloader can calculate missing ranges and only fetch the gap to “now”. When you add new pairs, use a dedicated “new pairs days” setting to avoid downloading full history for everything.

Pairs Selection

# use allowlist from config: algolumina download-data -c user_data/config.json # specify pairs: algolumina download-data --exchange binance --pairs ETH/USDT BTC/USDT # regex for all pairs with a quote currency: algolumina download-data --exchange binance --pairs ".*/USDT"

Timerange

Use a relative range --days 20 for incremental growth, or an absolute start --timerange 20200101- for full history.

Backtesting & Reporting

Backtest

Backtesting replays historical OHLCV data through strategy logic to generate trades/actions and compute results. Backtesting can also be exposed via the webserver mode so users can run tests from the portal.

Core Options

algolumina backtesting -c user_data/config.json -s StrategyName -i 5m --timerange 20240101-20240601

Outputs

  • Summary: total actions, win/loss distribution, drawdowns, expectancy.
  • Breakdowns: daily/weekly/monthly splits.
  • Artifacts: JSON reports, exports, and optional chart datasets.

Accuracy Notes

For realistic results, model fees, spreads, and trading precision. If you can’t explain assumptions, the result is a pretty chart, not an operational decision.

Optimization & Parameter Search

Optimize

Optimization searches parameter combinations (ROI rules, stops, trailing, indicator thresholds, filters) to improve objective metrics. A typical default stop search space used by many engines spans negative ratios roughly between -0.35 and -0.02.

Typical Run

algolumina optimize -c user_data/config.json -s StrategyName --spaces roi stoploss trailing --epochs 200

Overfitting Controls

  • Use multiple time ranges and market regimes.
  • Validate with walk-forward splits.
  • Prefer stable performance over a single “best” run.

AI Module (Training, Predictions, Expiration)

AI

The AlgoLumina AI module trains models over rolling windows and produces predictions that can be consumed by strategies as signals. A common configuration pattern uses a training window (e.g., 30 days) and a backtest window (e.g., 7 days) that slides forward until the end of the selected timerange. Short backtest windows can create a large number of models, especially across many pairs.

Core AI Settings (Typical)

"ai": { "identifier": "strategy_ai_v1", "model_type": "lightgbm", "task": "regression", "lookahead_candles": 6, "train_period_days": 30, "backtest_period_days": 7, "prediction_interval_minutes": 30, "refresh_model": true, "expiration_hours": 6, "features": ["rsi","adx","macd","ema_fast","ema_slow","roc","volume","obv"] }

Model Freshness (Expiration)

When training many pairs, models are produced sequentially. That means the oldest model can become stale by the time the last one finishes. An expiration threshold helps prevent entries if the model age exceeds a defined limit.

Operational Guidance

  • Start with fewer pairs and expand gradually.
  • Track training duration per pair and overall cycle time.
  • Log prediction inputs/outputs for auditing and debugging.
  • Use confidence gating and protections, not blind execution.

API & WebSocket Messages

API

The API server exposes endpoints for status and control, and can optionally provide a WebSocket message stream for real-time events (entries/exits, scope changes, indicators, and more). Access to the WebSocket stream typically requires a ws_token passed as a query parameter.

WebSocket Endpoint (Typical)

http://localhost:8080/api/v1/message/ws?ws_token=YOUR_TOKEN

API Server Config (Typical)

"api_server": { "enabled": true, "listen_ip_address": "127.0.0.1", "listen_port": 8080, "verbosity": "error", "enable_openapi": false, "jwt_secret_key": "somethingrandom", "CORS_origins": [], "username": "PortalAdmin", "password": "StrongSecret1!", "ws_token": "YOUR_TOKEN" }

JWT (Token Auth) Patterns

Many deployments support JWT-based login for API clients. The client authenticates once, then uses an access token for subsequent calls. Production deployments should enforce HTTPS and strict CORS rules.

Health Check

GET /api/v1/version

Operations (Logs, Metrics, Upgrades)

Ops

Logs

Logs should include tenant ID, workflow name, correlation ID, and connector name. Secrets must be masked. Keep separate logs for: engine runtime, worker workflows, API server, and reverse proxy.

Metrics to Watch

  • Engine loop latency and error rate
  • Connector rate-limit events and timeouts
  • Model training cycle duration (AI)
  • Disk growth for datasets, logs, and artifacts
  • Login failures and suspicious request spikes

Upgrade Practice

Upgrade platform code independently from tenant data. Validate changes in a staging tenant first, then roll forward with pinned versions and rollback capability.

FAQ (100 Questions)

FAQ

Expand a question to view the answer. Search filters across question + answer + keywords.

Support

Help

For fast resolution, include your tenant identifier, timestamps (with timezone), steps to reproduce, screenshots, and sanitized logs (never include secrets).