MockTradingDataSource class

Highly realistic deterministic Geometric Brownian Motion & micro-structure market simulator.

Implemented types

Constructors

MockTradingDataSource({double initialPrice = 24500.0, double volatility = 0.0015})

Properties

hashCode → int
The hash code for this object.
no setterinherited
initialPrice ↔ double
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
volatility → double
final

Methods

dispose() → void
Disposes any active connections or timers.
override
getHistoricalData({required String symbol, required Timeframe timeframe, int count = 500, DateTime? before}) → Future<List<Candle>>
Fetches historical OHLCV bars for the specified symbol and timeframe. Optionally pass before to fetch candles older than that timestamp (for pagination).
override
getLiveTicks(String symbol) → Stream<Tick>
Real-time stream of live trades/ticks for the given symbol.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

defaultPrices → const Map<String, double>