filter_pairs_default#

API documentation for tradingstrategy.utils.token_filter.filter_pairs_default Python function.

filter_pairs_default(pairs_df, verbose_print=<function <lambda>>, max_trading_pair_fee_bps=100, blacklisted_token_symbols=None, good_quote_tokes=('USDC', 'USDT', 'WETH', 'WMATIC', 'WAVAX', 'WBNB', 'WARB'), exchanges=None, exchange_ids=None, pair_ids_in_candles=None, chain_id=None)[source]#

Filter out pairs that are not interested for trading.

  • Does not perform liquidity filtering you need to perform separately

This includes

Parameters:
  • max_trading_pair_fee_bps (int | None) – Limit to pairs with less pool fee than this

  • verbose_print – Output function to print out information about narroving the dataset

  • good_quote_tokes (Collection[str]) – Only allow trading pairs that trade against these tokens.

  • blacklisted_token_symbols (Optional[Collection[str]]) – Avoid these base tokens for some reason or another

  • exchanges (Optional[Collection[Exchange]]) –

    Limit trading pairs to these dexes.

    Use Exchange objects.

  • exchange_ids (Optional[Collection[int]]) –

    Limit trading pairs to these dexes.

    Use Exchange primary keys.

  • pair_ids_in_candles (Optional[Union[Collection[int], Series]]) –

    Filter based on loaded candle data.

    Remove trading pairs that do not appear in the candle data.

  • chain_ids – Take trading pairs only on these chains

  • pairs_df (DataFrame) –

  • chain_id (tradingstrategy.chain.ChainId | None) –

Returns:

DataFrame for trading pairs

Return type:

DataFrame