aggregate_ohlcv#

API documentation for tradingstrategy.utils.aggregate_ohlcv Python module in Trading Strategy.

Module description#

Aggregated candles.

  • Create aggregated price OHLCV and liquidity candles across all available DEX trading pairs

  • See aggregate_ohlcv() for usage

Classes#

AggregateId

AggregateId(chain_id: int, base_token_symbol: str, base_token_address: str)

Functions#

aggregate_ohlcv_across_pairs(pair_universe, ...)

Builds an aggregates dataframe for trading data.

build_aggregate_map(pair_universe)

Generate a dict of pairs that trade the same token.

calculate_volume_weighted_ohlcv(df)

Calculate volume weighted average prices (vwap) on OHLCV.

make_aggregate_id(pair)

For each aggregated pair, identify them