Skip to main content
Version: 2.0.1

simulation_state_helper

SimulationStateHelperInterface Objects

class SimulationStateHelperInterface(ABC)

SimulationStateHelperInterface The SimulationStateHelperInterface is used to provide access to the simulation's state

current_step

@property
@abstractmethod
def current_step() -> int

Get the current step of the simulation

Returns

int: The current step of the simulation

current_time

@property
@abstractmethod
def current_time() -> int

Get the current time of the simulation

Returns

int: The current time of the simulation

steps

@property
@abstractmethod
def steps() -> int

Get the total number of steps of the simulation

Returns

int: The total number of steps of the simulation

price_feeds

@property
@abstractmethod
def price_feeds() -> dict[tuple[str, str], PriceFeedInterface]

Get the price feeds of the simulation

Returns

Dict[tuple[str, str], PriceFeedInterface]: The price feeds of the simulation

get_price_feed

@abstractmethod
def get_price_feed(token: tuple[str, str]) -> PriceFeedInterface | None

Get a price feed by its token

Arguments:


  • token tuple[str, str] - The token pair of the price feed

Returns:


PriceFeedInterface | None: The price feed or None if it does not exist