resolve_pairs_based_on_ticker#

API documentation for tradingstrategy.pair.resolve_pairs_based_on_ticker Python function.

resolve_pairs_based_on_ticker(df, chain_id=None, exchange_slug=None, pairs=None, sorting_criteria_by=('fee', 'buy_volume_all_time'), sorting_criteria_ascending=(True, False))[source]#

Resolve symbolic trading pairs to their internal integer primary key ids.

Uses pair database described DEXPair Pandas dataframe to resolve pairs to their integer ids on a single exchange.

Warning

For popular trading pairs, there will be multiple scam pairs with the same ticker name. In this case, one with the highest all-time buy volume is chosen.

Note

Pair ids are not stable and may change long term. Always resolve pair ids before a run.

Example:

Alternative Example:

Parameters:
Returns:

DataFrame with filtered pairs.

Warning: If you give a pair that is not found there is no error. Check that you get right amount of pairs out.

Return type:

DataFrame