Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/theonetrade/uzse-backtest-app/llms.txt

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

The UZSE Backtest App is configured through a small set of environment variables and two static configuration files. The main connection setup lives in config/setup.ts, which is imported by every pipeline script that touches the database. Symbol metadata — used by the analysis editor UI — is defined in config/symbol.config.cjs. Understanding these two files is enough to fully configure the application for any environment.

Database Connection — config/setup.ts

config/setup.ts is the single entry point for all MongoDB connectivity. Importing this file in any script is sufficient to open the database connection — no further setup is needed. The file reads the MONGO_URI environment variable and falls back to a sensible local default:
import mongoose from "mongoose";

const MONGO_URI = process.env.MONGO_URI || "mongodb://localhost:27017/backtest";

mongoose.connect(MONGO_URI);
The database name (backtest) is embedded in the URI path. To use a different database or a remote cluster, simply change MONGO_URI — no code modifications are required.

Environment Variables

VariableDefaultDescription
MONGO_URImongodb://localhost:27017/backtestMongoDB connection string including the target database name. Supports all URI options (auth, replica sets, TLS, etc.).
Create a .env file in the project root to avoid exporting variables manually in each shell session:
MONGO_URI=mongodb://localhost:27017/backtest
The project reads from process.env directly, so you will need either a shell export or a dotenv loader to make .env values available at runtime. A common approach is to prefix your command with dotenv or use the --env-file flag available in recent Node.js versions:
node --env-file=.env your-script.ts

Symbol Configuration — config/symbol.config.cjs

config/symbol.config.cjs defines the list of trading symbols available in the analysis editor UI. Each entry provides display metadata used for chart rendering and symbol selection. The file exports a plain CommonJS array so it can be consumed by both ESM and CJS tooling. Each symbol object has the following shape:
FieldTypeDescription
symbolstringTrading pair or ticker identifier (e.g. HMKB, BTCUSDT)
displayNamestringHuman-readable name shown in the UI (e.g. Bitcoin, Hamkorbank)
colorstringHex color code used for the chart line and UI accents
prioritynumberDisplay order — lower values appear first in the symbol list
iconstringPath to the small icon image (e.g. /icon/btc.png)
logostringPath to the larger logo image (e.g. /icon/128/btc.png)
descriptionstringMulti-line description of the asset, built with str.newline()

Priority Tiers

Symbols are grouped into six priority tiers that control the order they appear in the editor’s symbol picker:
PriorityTierSymbols
50PremiumBTCUSDT, ETHUSDT, UNIUSDT
100HighBNBUSDT, SOLUSDT, LTCUSDT, BCHUSDT, NEOUSDT, FILUSDT, XMRUSDT
150MediumXRPUSDT, AVAXUSDT, LINKUSDT, DOTUSDT, MATICUSDT, AAVEUSDT, SUSDT
200LowDOGEUSDT, TRXUSDT, ADAUSDT, EOSUSDT, XLMUSDT, KSMUSDT, COMPUSDT
250ExtendedATOMUSDT, ALGOUSDT, IOTAUSDT, VETUSDT, BATUSDT
300ArchiveETCUSDT, DASHUSDT, ZECUSDT
To add a UZSE equity symbol, append a new entry to the array following the same structure and assign an appropriate priority.

Market Sector (mktId) Options

When running the download-trades pipeline script, you specify a market sector to filter which instruments are fetched from the UZSE. The market field on every trade record reflects this value.
mktIdSectorDescription
STKEquitiesCommon and preferred stock listed on the UZSE (default)
BONBondsFixed-income securities traded on the exchange
Pass the desired sector as a CLI argument or environment variable when invoking the download script. The default is STK if no value is provided.

Infrastructure Configuration

Each infrastructure service is configured independently via its own Docker Compose file. See the dedicated pages for full details:

MongoDB

Primary data store for trades and OHLCV candles. Configured via MONGO_URI.

MinIO

Optional S3-compatible object storage for exports and backups.

Redis

Caching and pub/sub for the agent-swarm-kit AI layer.

Build docs developers (and LLMs) love