API documentation for tradeexecutor.testing.synthetic_universe_data.create_synthetic_single_pair_universe Python function.

create_synthetic_single_pair_universe(candles, chain_id, exchange, time_bucket, pair, lending_candles=None)[source]#

Creates a synthetic universe with a single pair and a single chain.

  • candles (DataFrame) –

    A pandas DataFrame containing the candles for the pair.

    Must have the following columns:
    • timestamp

    • open

    • high

    • low

    • close

    • pair_id

    Can be generated using generate_ohlcv_candles from tradeexecutor/testing/

  • chain_id (ChainId) – Chain ID to use for the universe.

  • exchange (Exchange) – Exchange to use for the universe. Can be generated using generate_exchange from tradeexecutor/testing/

  • time_bucket (TimeBucket) – Time bucket to use for the universe.

  • pair (TradingPairIdentifier) – Pair to use for the universe.

  • lending_candles (Optional[LendingCandleUniverse]) –

Return type: