Table of Contents

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

time DateTime

UTC 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.

cancellationToken CancellationToken

Cancellation token that allows the caller to cancel the operation.

Returns

Task<bool>

true if the simulation advanced to the given time, false if the end of simulation has been reached or if the operation was cancelled.

Exceptions

InvalidArgumentException

Thrown if the time is not greater than the current simulation time or if it is greater than the simulation's end time.