These 9 adapters persist the live, mutable state of running strategies. Unlike the Candle adapter, which is insert-only, each of these adapters performs a simple idempotentDocumentation 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.
PUT on every write — no read-before-write is needed because every object key is a pure function of its context (symbol/strategy/exchange/…). S3’s strong read-after-write consistency guarantee means that once writeXData(…) returns, the very next readXData(…) will see the new value.
All 9 adapters call
await waitForInfra() on first initialization — the same
shared singleshot function used by every other adapter. This gates the first
write or read on Redis being ready without duplicating connection logic across
instances.Signal
The Signal adapter stores the live signal state for a single(symbol, strategyName, exchangeName) context — the running position or last-known action that backtest-kit uses to decide what to do next.
Constructor arguments
signal-items/<symbol>/<strategy>/<exchange>
ISignalRow inside a document envelope (ISignalRowDoc) that adds id, createDate, and updatedDate. On read, only row.payload is returned to backtest-kit. Writing null clears the signal state by persisting null as the payload.
Schedule
The Schedule adapter stores a pending scheduled signal for a context — a signal that has been queued for execution at a future time but has not yet fired. Constructor argumentsschedule-items/<symbol>/<strategy>/<exchange>
schedule-items/ prefix in the backtest-kit bucket. Writing null clears any pending schedule.
Strategy
The Strategy adapter persists a snapshot of the deferred commit queue — internalbacktest-kit strategy state that must survive process restarts.
Constructor arguments
strategy-items/<symbol>/<strategy>/<exchange>
StrategyData is an opaque type owned by backtest-kit; the adapter stores and retrieves it verbatim. Writing null resets the deferred queue to empty.
Risk
The Risk adapter stores an array of active risk positions for a named risk manager on a given exchange. The key usesriskName rather than symbol because a risk manager may span multiple symbols simultaneously.
Constructor arguments
risk-items/<riskName>/<exchange>
RiskData is a positions array. readPositionData returns an empty array [] when no stored row exists — callers never receive null.
Partial
The Partial adapter stores the partial profit/loss levels for a specific open signal. Because multiple signals may be open simultaneously for the same context, the key includessignalId as a fourth segment.
Constructor arguments
partial-items/<symbol>/<strategy>/<exchange>/<signalId>
readPartialData returns an empty object {} when no stored row exists.
Breakeven
The Breakeven adapter stores a flag (or metadata) indicating whether the breakeven level has been reached for a specific open signal. Like Partial, the key includessignalId.
Constructor arguments
breakeven-items/<symbol>/<strategy>/<exchange>/<signalId>
readBreakevenData returns an empty object {} when no stored row exists.
Recent
The Recent adapter stores the last public signal emitted for a context. It includesframeName and backtest in its key because the same symbol/strategy pair may run in multiple frames and in both backtest and live modes simultaneously.
Constructor arguments
recent-items/<symbol>/<strategy>/<exchange>/<frame>/<backtest>
readRecentData returns null (via row ? row.payload : null) when no stored row exists.
State
The State adapter provides per-signal state buckets — arbitraryStateData keyed by (signalId, bucketName). A single signal may have many independent state buckets. The adapter includes a dispose() method as required by the interface.
Constructor arguments
state-items/<signalId>/<bucket>
Session
The Session adapter stores one session object per running strategy instance. Sessions includeframeName and backtest in their key to distinguish concurrent runs of the same strategy across different frames or modes. The adapter includes a dispose() method as required by the interface.
Constructor arguments
session-items/<strategy>/<exchange>/<frame>/<symbol>/<backtest>
The
dispose() methods on both State and Session are intentional
no-ops — dispose(): void { void 0; }. Lifecycle cleanup (flushing open
sessions, releasing state buckets) is managed externally by backtest-kit
at the framework level. The MinIO objects themselves persist until explicitly
overwritten by the next writeXData call or deleted manually.