Implements TSessionAdapter
Live trading session adapter with pluggable storage backend.
Features:
constructor();
SessionFactory: any
getInstance: any
getData: <Value extends object = object>(symbol: string, context: { strategyName: string; exchangeName: string; frameName: string; }) => Promise<Value>
Read the current session value for a live run.
setData: <Value extends object = object>(symbol: string, value: Value, context: { strategyName: string; exchangeName: string; frameName: string; }) => Promise<void>
Update the session value for a live run.
useLocal: () => void
Switches to in-memory adapter. All data lives in process memory only.
usePersist: () => void
Switches to file-system backed adapter (default). Data is persisted to disk via PersistSessionAdapter.
useDummy: () => void
Switches to dummy adapter that discards all writes.
useSessionAdapter: (Ctor: TSessionInstanceCtor) => void
Switches to a custom session adapter implementation.
clear: () => void
Clears the memoized instance cache. Call this when process.cwd() changes between strategy iterations so new instances are created with the updated base path.