These three adapters persist the audit trail of a running strategy. Storage accumulates every signal that has been created, updated, or closed. Notification collects timestamped event messages surfaced in the UI. Log records freeform strategy log entries. Storage and Notification are both partitioned by aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-kit-redis-mongo-docker/llms.txt
Use this file to discover all available pages before exploring further.
backtest: boolean flag, which separates historical backtest data from live or paper-trading data within the same MongoDB instance. Log has no constructor arguments and shares a single global collection.
The backtest Flag
Both Storage and Notification accept backtest: boolean in their constructors. When true, all reads and writes target the backtest partition; when false, they target the live/paper partition. This allows a single deployment to maintain isolated signal histories for backtests and live runs without separate databases.
Storage Adapter
The Storage adapter persists the full set of open and closed signals. It is the primary audit log for signal lifecycle events. Reads return all records for the current mode via alistByMode query (up to 1000 rows).
Constructor
true to target the backtest partition; false for live/paper trading.readStorageData
Returns all stored signal payloads for the current mode, in insertion order.StorageData — an array of signal payload objects. Returns an empty array when no records exist.
listByMode applies an internal limit of up to 1000 rows. For deployments that accumulate
large signal histories, consider paginating or archiving older records.writeStorageData
Upserts each signal in the array individually, keyed bysignal.id.
Array of signal objects. Each must have an
id field used as the document key.Notification Adapter
The Notification adapter stores timestamped event messages. Unlike Storage, the read path returns records in reverse chronological order so that the most recent notifications appear first.Constructor
true for the backtest partition; false for live/paper trading.readNotificationData
Returns all notification payloads for the current mode, in reverse chronological order.NotificationData — an array of notification objects, newest first.
writeNotificationData
Upserts each notification in the array individually, keyed bynotification.id.
Array of notification objects. Each must have an
id field used as the document key.Log Adapter
The Log adapter has no constructor arguments. It uses a singlelog-items collection shared across all modes. Reads also return entries in reverse chronological order.
Constructor
The Log adapter takes no constructor arguments:readLogData
Returns all log entry payloads, in reverse chronological order.LogData — an array of log entry objects, newest first.
writeLogData
Upserts each log entry individually, keyed byentry.id.
Array of log entry objects. Each must have an
id field used as the document key.Collection Summary
| Adapter | Collection | Context Key | Read Order | Backtest Partition |
|---|---|---|---|---|
| Storage | storage-items | (backtest, signalId) | Insertion order | Yes |
| Notification | notification-items | (backtest, notificationId) | Newest first | Yes |
| Log | log-items | (entryId) | Newest first | No |