API documentation for tradeexecutor.strategy.pandas_trader.decision_trigger.wait_for_universe_data_availability_jsonl Python function.

wait_for_universe_data_availability_jsonl(timestamp, client, current_universe, required_history_period=datetime.timedelta(days=90), max_wait=datetime.timedelta(seconds=1800), max_poll_cycles=None, poll_delay=datetime.timedelta(seconds=15))[source]#

Wait for the data to be available for the latest strategy cycle.

  • Used in live execution only

  • Uses Trading Strategy oracle real-time JSONL API for the data.

  • Uses simple polling appraoch

  • timestamp (datetime) –

    The current strategy decision timestamp.

    The latest available data we can have is the previous full candle.

  • current_universe (TradingStrategyUniverse) – The current trading universe with old candles.

  • required_history_period

    How much historical data we need to load.

    Depends on the strategy. Defaults to 90 days.

    If there is current_universe.required_history_period ignore this argument and use the value from the trading universe instead.

  • max_wait – Unless data is seen, die with an exception after this period.

  • max_poll_cycles (Optional[int]) –

    Can be set in integration testing.

    Return after this many cycles despite new data being incomplete.

  • client (Client) –


An updated trading universe

Return type: