filter_for_exchanges#
API documentation for tradingstrategy.utils.token_filter.filter_for_exchanges Python function.
- filter_for_exchanges(pairs, exchanges)[source]#
Filter dataset so that it only contains data for the trading pairs from a certain exchange.
Useful as a preprocess step for creating
tradingstrategy.candle.GroupedCandleUniverse
ortradingstrategy.liquidity.GroupedLiquidityUniverse
.- Parameters:
pairs (DataFrame) –
exchanges (Collection[Exchange]) –
- Return type:
DataFrame