Function dumpRecord

  • Dumps a flat key-value record scoped to the current signal.

    Resolves the active pending or scheduled signal automatically from execution context. Automatically detects backtest/live mode from execution context.

    Parameters

    • dto: {
          bucketName: string;
          description: string;
          dumpId: string;
          record: Record<string, unknown>;
      }
      • bucketName: string

        Bucket name grouping dumps by strategy or agent name

      • description: string

        Human-readable label describing the record contents; included in the BM25 index for Memory search

      • dumpId: string

        Unique identifier for this dump entry

      • record: Record<string, unknown>

        Arbitrary flat object to persist

    Returns Promise<void>

    Promise that resolves when the dump is complete

    Error if no pending or scheduled signal exists

    import { dumpRecord } from "backtest-kit";

    await dumpRecord({ bucketName: "my-strategy", dumpId: "context", record: { price: 42000, signal: "long" }, description: "Signal context at entry" });