filter_for_quote_tokens#

filter_for_quote_tokens(pairs, quote_token_addresses)[source]#

Filter dataset so that it only contains data for the trading pairs that have a certain quote tokens.

Useful as a preprocess step for creating tradingstrategy.candle.GroupedCandleUniverse or tradingstrategy.liquidity.GroupedLiquidityUniverse.

You might, for example, want to construct a trading universe where you have only BUSD pairs.

Parameters:
  • quote_token_addresses (Union[List[str], Set[str]]) – List of Ethereum addresses of the tokens - most be lowercased, as Ethereum addresses in our raw data are.

  • pairs (DataFrame) –

Return type:

DataFrame