filter_for_exchange#

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

filter_for_exchange(pairs, exchange_slug)[source]#

Extract trading pairs for specific exchange(s).

Example:

# Pick only pairs traded on Uniswap v3
df = filter_for_exchange(df, "uniswap-v3")

With two exchanges:

# Pick only pairs traded on Uniswap v3 or Quickswap df = filter_for_exchange(df, {“uniswap-v3”, “quickswap”})

Parameters: