Documentation Index
Fetch the complete documentation index at: https://mintlify.com/backtest-kit/uzse-backtest-app/llms.txt
Use this file to discover all available pages before exploring further.
TradeModel is the Mongoose model that stores every raw trade record fetched from the UZSE exchange API. Each document represents a single executed transaction and is persisted in the trade-results collection of the backtest database. The schema is designed for idempotent imports: a SHA1 hash field carries a fingerprint of the trade’s key attributes, and a unique index on that field prevents duplicate records from being written no matter how many times the same data is collected.
Collection Details
| Property | Value |
|---|---|
| Collection | trade-results |
| Database | backtest |
| Timestamps | createDate, updatedDate (auto-managed by Mongoose) |
TypeScript Interface
TheITradeDto interface describes the shape of a trade document as it is inserted and queried. Comments are preserved from the original source and reflect the Russian-language UZSE API field descriptions.
ITradeRow extends ITradeDto with the document’s id string and the Mongoose timestamp fields createDate and updatedDate.
Field Reference
Transaction datetime parsed from the UZSE API response, e.g.
"17 апреля 2026, 16:02". Stored as a native BSON Date in UTC. Carries a single-field index to support range queries over time windows.ISIN code of the security, e.g.
"UZ7011340005". Indexed individually and as part of the compound { symbol, time } index. Note that symbol in trade-results holds the ISIN, while the candle-items collection stores the shorter display ticker.Human-readable name of the security issuer as returned by the UZSE API, e.g.
"<Hamkorbank> ATB".Category of the security. Common values include
"Простые акции" (ordinary shares) and "Привилегированные акции" (preferred shares).Trading sector code.
"STK" denotes the equities market; "BON" denotes the bond market.Trading session identifier, e.g.
"G1" or "G2", as assigned by the UZSE.Price per unit of the security at the time of the trade, denominated in Uzbekistani som (UZS).
Number of individual securities (units) exchanged in this trade.
Total monetary value of the trade in UZS, equal to
tradePrice × quantity.SHA1 deduplication key. Carries a unique index — any attempt to insert a document with an existing
hash is rejected with a MongoDB duplicate-key error (code 11000). See the Hash Formula section below.Indexes
| Index | Type | Purpose |
|---|---|---|
time | Single | Fast range queries on trade datetime |
symbol | Single | Filter trades by ISIN |
{ symbol, time } | Compound | Efficient per-symbol time-range queries |
hash | Unique | Prevents duplicate imports (idempotency guard) |
SHA1 Hash Formula
Thehash field is computed at import time from the following pipe-delimited concatenation of trade attributes and pagination context:
pageIndex, rowIndex, and urlKey ensures that two trades with identical prices, quantities, and timestamps appearing at different positions in the API response still produce distinct hashes, which correctly prevents false-positive deduplication.
urlKey encodes the query parameters used to fetch the page — specifically begin|end|search_key extracted from the page URL — making the hash stable across re-runs with the same request parameters.