pair#

tradingstrategy.pair module.

Module description#

Trading pair information and pair datasets.

The core classes to understand the data are

To download the pairs dataset see

Classes#

DEXPair

Trading pair information for a single pair.

LegacyPairUniverse

The queries universe, as returned by the server.

PandasPairUniverse

A pair universe implementation that is created from Pandas dataset.

StablecoinFilteringMode

How to filter pairs in stablecoin filtering.

Functions#

filter_for_exchanges(pairs, exchanges)

Filter dataset so that it only contains data for the trading pairs from a certain exchange.

filter_for_quote_tokens(pairs, ...)

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

filter_for_stablecoins(pairs, mode)

Filter dataset so that it only contains data for the trading pairs that are either stablecoin pairs or not.

resolve_pairs_based_on_ticker(df, chain_id, ...)

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