Method TryFastForwardToAsync
- Namespace
- WhalesSecret.TradeScriptLib.API.TradingV1
- Assembly
- WhalesSecret.TradeScriptLib.dll
TryFastForwardToAsync(DateTime, CancellationToken)
Changes time of the simulation to the given time.
Task<bool> TryFastForwardToAsync(DateTime time, CancellationToken cancellationToken)
Parameters
timeDateTimeUTC time to jump to. This timestamp must be greater than the current simulation time and it must not be greater than the simulation's end time.
cancellationTokenCancellationTokenCancellation token that allows the caller to cancel the operation.
Returns
- Task<bool>
trueif the simulation advanced to the given time,falseif the end of simulation has been reached or if the operation was cancelled.
Exceptions
- InvalidArgumentException
Thrown if the
timeis not greater than the current simulation time or if it is greater than the simulation's end time.