resample_multi_pair#
API documentation for tradeexecutor.strategy.pandas_trader.alternative_market_data.resample_multi_pair Python function.
- resample_multi_pair(df, bucket, pair_id_column='pair_id', copy_columns=('pair_id', 'base_token_symbol', 'quote_token_symbol', 'exchange_slug', 'chain_id', 'fee', 'token0_address', 'token1_address', 'token0_symbol', 'token1_symbol', 'token0_decimals', 'token1_decimals'))[source]#
Upsample a OHLCV trading pair data to a lower time bucket.
Slower than
resample_single_pair()
Resample in OHLCV manner
Forward fill any gaps in data
- Parameters:
pair_id_column – DataFrame column to group the data by pair
copy_columns –
Columns we simply copy over.
We assume every pair has the same value for these columns.
df (DataFrame) –
bucket (TimeBucket) –
- Returns:
Concatenated DataFrame of individually resampled pair data
- Return type:
DataFrame