Contents Menu Expand Light mode Dark mode Auto light/dark mode
Trading Strategy documentation
  • Documention home
  • Getting started
  • Overview
    • About Trading Strategy
    • Vault data
    • Supported markets and venues
    • Accessing market data
    • Tooling
    • Oracles
  • Developing strategies
    • Setting up development environment
      • Github Codespaces
      • Visual Studio Code Dev Container for Jupyter Notebooks
      • Docker development image
      • PyCharm
      • Local Python installation
      • Google Colab
      • Binder development
    • Trading strategy examples
    • Code examples
      • Getting started coding tutorial (old)
      • Drawing DEX prices using OHLCV candle charts
      • Interactive charts
      • Technical analysis
      • Exploring trading pairs
      • Finding low fee trading pairs
      • Preface
      • Liquidity analysis
      • Price impact estimation
      • Query pool liquidity on a decentralised exchange
      • Dataset download
      • Charts and diagrams (old)
      • Lending protocols and short/long leverage data
      • Loading exchange, pair, and candlestick data for Uniswap V3
      • Streaming JSONL data
    • Market data format details
      • Market data client
      • OHLCV Candle format
      • Tracked trading pairs and tokens
      • US dollar price conversion
      • Trading pair naming conventions
      • Internal ids
      • Token tax and deflationary tokens
      • Good trading pairs to start with
      • Wrapped tokens
      • Profitability calculations
    • Troubleshooting
    • Internal development process
  • Architecture
    • Architecture overview
    • Command line application
    • Webhook server
    • Strategy types
    • Serialisation
    • Unit testing
  • Deploying live trading strategies
    • Trade-executor command
    • Live trading modes
    • Strategy metadata
    • Hot wallet deployment
    • Vault deployment
    • Website and monitoring
    • Managing Docker images
    • Turning backtest to an executable live trading strategy
    • Troubleshooting live trade execution deployments
    • Repairing frozen trading positions
    • Vault manual transactions
  • Learn algorithmic trading
    • To follow
    • Conference presentations and videos
    • Books on algorithmic trading
    • Online courses on algorithmic trading
    • Tutorials on algorithmic trading
    • AI and machine learning
    • Papers about algorithmic trading
    • Statistical Arbitrage Papers
    • Blog posts about algorithmic trading
    • Python
    • Jupyter Notebook learning material
    • Algorithmic trading frameworks for Python
    • Communities around algorithmic trading
    • Develop tools and Jupyter Notebook environments
    • Charting solutions for Python
    • Additional algorithmic trading links
    • Developing portfolio construction trading strategies
  • Glossary
  • API reference
    • Market data client
      • client
        • BaseClient
        • Client
      • chain
        • ChainId
      • exchange
        • Exchange
        • ExchangeType
        • ExchangeUniverse
      • pair
        • DEXPair
        • LegacyPairUniverse
        • PandasPairUniverse
        • generate_address_columns
        • resolve_pairs_based_on_ticker
      • candle
        • Candle
        • CandleResult
        • GroupedCandleUniverse
        • TradingPairDataAvailability
        • is_candle_green
        • is_candle_red
      • liquidity
        • GroupedLiquidityUniverse
        • LiquidityResult
        • ResampledLiquidityUniverse
        • XYLiquidity
      • trade
        • Trade
      • timebucket
        • TimeBucket
      • token
        • Token
      • reader
        • read_parquet
      • priceimpact
        • HistoricalXYPriceImpactCalculator
        • LiquiditySampleMeasure
        • PriceImpact
        • estimate_xyk_price_impact
      • stablecoin
        • is_stablecoin_like
      • types
      • utils
        • aggregate_ohlcv
          • AggregateId
          • aggregate_ohlcv_across_pairs
          • build_aggregate_map
          • calculate_volume_weighted_ohlcv
          • make_aggregate_id
        • columnar
          • iterate_columnar_dicts
        • df_index
          • flatten_dataframe_datetime_index
          • get_timestamp_index
        • flexible_pickle
          • BrokenEnumValue
          • FlexibleUnpickler
          • filter_broken_enum_values
          • flexible_load
          • flexible_loads
        • format
          • format_duration_days_hours_mins
          • format_percent
          • format_percent_2_decimals
          • format_price
          • format_value
          • string_to_eth_address
        • forward_fill
          • fill_future_gap
          • fill_future_gap_multi_pair
          • forward_fill
          • forward_fill_ohlcv_single_pair
          • generate_future_filler_data
          • pad_dataframe_to_frequency
          • resample_candles
          • resample_candles_multiple_pairs
          • xxx_forward_fill
        • gap
          • Gap
          • detect_frequency
          • detect_timestamp_gaps
          • equalise_timestamp_index
          • fill_missing_ohlcv
        • groupeduniverse
          • PairGroupedUniverse
          • filter_for_pairs
          • filter_for_single_pair
          • resample_dataframe
          • resample_price_series
          • resample_rolling
          • resample_series
        • jupyter
          • JupyterOutputMode
          • display_with_styles
          • format_links_for_html_output
          • get_notebook_output_mode
          • is_pyodide
          • make_clickable
        • liquidity_filter
          • build_liquidity_summary
          • get_liquidity_today
          • get_somewhat_realistic_max_liquidity
          • get_top_liquidity_pairs_by_base_token
          • prefilter_pairs_with_tvl
        • logging_retry
          • LoggingRetry
        • mapper
        • schema
          • append_to_columnar_work_buffer
          • create_columnar_work_buffer
          • create_pyarrow_schema_for_dataclass
          • map_field_to_arrow
          • unmappable
        • time
          • assert_compatible_timestamp
          • ceil_month
          • floor_month
          • floor_pandas_month
          • floor_pandas_week
          • from_iso
          • generate_monthly_timestamps
          • get_prior_timestamp
          • is_compatible_timestamp
          • naive_utcfromtimestamp
          • naive_utcnow
          • to_int_unix_timestamp
          • to_iso
          • to_unix_timestamp
        • token_extra_data
          • filter_scams
          • load_extra_metadata
          • load_token_metadata
        • token_filter
          • StablecoinFilteringMode
          • add_base_quote_address_columns
          • deduplicate_pairs_by_volume
          • filter_by_token_sniffer_score
          • filter_for_base_tokens
          • filter_for_blacklisted_tokens
          • filter_for_chain
          • filter_for_derivatives
          • filter_for_exchange
          • filter_for_exchange_ids
          • filter_for_exchange_slugs
          • filter_for_exchanges
          • filter_for_nonascii_tokens
          • filter_for_quote_tokens
          • filter_for_rebases
          • filter_for_selected_pairs
          • filter_for_stablecoins
          • filter_for_trading_fee
          • filter_pairs_default
          • is_derivative
          • is_rebase
        • wrangle
          • examine_anomalies
          • examine_price_between_time_anomalies
          • filter_bad_wicks
          • fix_bad_wicks
          • fix_dex_price_data
          • fix_prices_in_between_time_frames
          • heal_anomalies
          • normalise_volume
          • remove_min_max_price
          • remove_zero_candles
      • transport
        • base
          • BaseTransport
        • cache
          • CacheStatus
          • CachedHTTPTransport
          • OHLCVCandleType
        • cache_utils
          • wait_other_writers
        • data_trigger
          • wait_for_data
        • jsonl
          • load_candles_jsonl
          • load_token_metadata_jsonl
          • load_trading_strategy_like_jsonl_data
        • pair_candle_cache
          • PairCandleCache
          • PairCandleInfo
          • PairCandleMetadata
          • PairFetchPartition
        • progress_enabled_download
          • download_with_tqdm_progress_bar
        • pyodide
        • token_cache
          • TokenCacheEntry
          • calculate_token_cache_summary
          • display_token_metadata
          • read_token_cache
      • charting
        • candle_chart
          • VolumeBarMode
          • create_label
          • make_candle_labels
          • validate_ohclv_dataframe
          • validate_plot_info
          • visualise_ohlcv
      • testing
        • mock_client
          • MockClient
      • top
        • TopPairData
        • TopPairMethod
        • TopPairsReply
      • binance
        • constants
          • split_binance_symbol
        • downloader
          • BinanceDownloader
          • clean_time_series_data
          • get_binance_interval
          • get_indices_of_uneven_intervals
        • utils
          • add_info_columns_to_ohlc
          • generate_exchange_for_binance
          • generate_exchange_universe_for_binance
          • generate_lending_reserve_for_binance
          • generate_pair_for_binance
          • generate_pairs_for_binance
      • alternative_data
        • coingecko
          • CoingeckoClient
          • CoingeckoEntry
          • CoingeckoUniverse
          • categorise_pairs
          • fetch_top_coins
        • vault
          • convert_vault_prices_to_candles
          • convert_vaults_to_trading_pairs
          • create_vault_universe
          • load_multiple_vaults
          • load_single_vault
          • load_vault_database
          • load_vault_database_with_metadata
          • load_vault_price_data
      • qstrader
        • DEXAsset
        • TradingStrategyDataSource
        • analyse_portfolio_development
        • analyse_trade_history
        • create_portfolio_snapshot
        • prepare_candles_for_qstrader
      • direct_feed
        • conversion
          • CurrencyConversion
          • convert_to_float
        • dash
        • direct_feed_pair
        • ohlcv_aggregate
          • OHLCVCandle
          • get_feed_for_pair
          • resample_trades_into_ohlcv
          • truncate_ohlcv
        • timeframe
          • Timeframe
        • trade_store
          • ParquetFileStore
          • TradeFeedStore
        • warn
          • disable_pandas_warnings
    • Trade execution engine
      • state
        • other_data
          • OtherData
        • pickle_over_json
          • decode_pickle_over_json
          • encode_pickle_over_json
        • position_internal_share_price
          • PositionInternalSharePriceState
        • revaluation
          • RevalueEvent
        • trigger
          • Trigger
          • TriggerCondition
          • TriggerType
        • types
        • valuation
          • ValuationUpdate
      • strategy
        • chart
          • standard
        • default_routing_options
          • TradeRouting
        • engine_version
        • freqtrade
          • config
            • AsterExchangeConfig
            • FreqtradeConfig
            • FreqtradeDepositMethod
            • FreqtradeWithdrawalMethod
            • HyperliquidExchangeConfig
            • OnChainTransferExchangeConfig
            • OrderlyExchangeConfig
          • freqtrade_client
            • FreqtradeClient
        • pandas_trader
        • qstrader
        • reserve_currency
          • ReserveCurrency
        • strategy_cycle_trigger
          • StrategyCycleTrigger
        • strategy_type
          • StrategyType
        • tag
          • StrategyTag
        • weighting
          • check_normalised_weights
          • clip_to_normalised
          • normalise_weights
          • weight_by_1_slash_n
          • weight_by_1_slash_signal
          • weight_by_blend
          • weight_by_log
          • weight_by_softmax
          • weight_equal
          • weight_passthrouh
      • analysis
        • curve
          • CurveType
        • grid_search_format
          • build_format_dict
          • build_gradient_colour_map
          • generate_grey_alpha
          • get_group_colour_palette
          • normalise_enum_values
        • regime
          • Regime
          • RegimeRegion
          • get_regime_signal_regions
      • visual
        • bullbear
          • visualise_market_regime_filter
          • visualise_raw_market_regime_indicator
        • custom_indicators
          • calculate_on_balance_volume
        • image_output
          • open_bytes_in_browser
          • open_plotly_figure_in_browser
          • render_plotly_figure_as_image_file
        • palette
          • format_blog_post_figure
          • generate_sepia_palette
          • hacker_crt_green_palette
        • qs_wrapper
          • import_quantstats_wrapped
      • backtest
        • notebook
      • ethereum
        • aave_v3
        • cctp
        • cowswap
        • enzyme
        • one_delta
        • revert
          • clean_revert_reason_message
        • uniswap_v2
        • uniswap_v3
        • vault
      • cli
        • commands
          • pair_mapping
            • construct_identifier_from_pair
            • parse_pair_data
          • shared_options
            • PositionType
            • TradeType
            • parse_comma_separated_list
            • required_option
        • discord
          • get_discord_logging_handler
          • post_logging_discord_image
        • latest_release
          • main
        • log
          • get_ring_buffer_handler
          • setup_custom_log_levels
          • setup_discord_logging
          • setup_file_logging
          • setup_in_memory_logging
          • setup_logging
          • setup_logstash_logging
          • setup_notebook_logging
          • setup_pytest_logging
          • setup_sentry_logging
          • setup_strategy_logging
          • setup_telegram_logging
        • version_info
          • VersionInfo
        • watchdog
          • WatchdogMode
          • check_hung_workers
          • create_watchdog_registry
          • get_last_ping
          • get_timeout
          • get_watched_workers
          • mark_alive
          • register_worker
          • start_background_watchdog
          • stop_watchdog
          • suicide
      • utils
        • accuracy
          • ensure_exact_zero
          • setup_decimal_accuracy
          • snap_to_epsilon
          • sum_decimal
        • cpu
          • get_safe_max_workers_count
          • is_running_in_ipython
        • crossover
          • contains_cross_over
          • contains_cross_under
        • dataclass
          • EthereumAddress
          • UTCFriendlyDataClassJsonMixin
        • dedent
          • dedent_any
          • strip_except_newlines
        • default_strategies
          • get_default_strategies_path
        • format
          • calculate_percentage
        • fullname
          • get_object_full_name
        • hex
          • hexbytes_to_hex_str
        • increasing
          • is_monotonically_decreasing
          • is_monotonically_increasing
        • jupyter_notebook_folder
          • get_strategies_folder
        • jupyter_notebook_name
          • get_notebook_file_from_within_notebook
          • get_notebook_id
          • path
        • list
          • get_linearly_sampled_items
        • notebook
          • OutputMode
          • display_dataframe_with_html
          • interactive_plotly_renderer
          • set_large_plotly_chart_font
          • set_notebook_logging
          • setup_charting_and_output
        • price
          • is_legit_price_value
        • profile
          • profiled
        • python_function
          • hash_function
        • python_module_loader
          • extract_module_members
          • import_python_source_file
        • ring_buffer_logging_handler
          • ExportedRecord
          • RingBufferHandler
        • slippage
          • get_slippage_in_bps
        • sort
          • unique_sort
        • summarydataframe
          • Format
          • Value
          • as_bars
          • as_decimal
          • as_dollar
          • as_duration
          • as_integer
          • as_missing
          • as_percent
          • create_summary_table
          • format_value
          • format_values
        • timestamp
          • convert_and_validate_timestamp
          • convert_and_validate_timestamp_as_float
          • convert_and_validate_timestamp_as_int
          • json_decode_timedelta
          • json_encode_timedelta
        • token
        • typing
        • url
          • get_url_domain
          • redact_url_password
      • webhook
        • error
          • convert_to_api_error_response
          • error_tween_factory
          • exception_response
          • exception_view
        • events
          • add_cors_headers
        • json_helper
          • NaNToNullEncoder
      • testing
        • pytest_helpers
          • is_failed_test
        • synthetic_ethereum_data
          • generate_random_ethereum_address
      • monkeypatch
        • cloudpickle_patch
          • reducer_override
        • plotly
          • fix_trace_x_axis_dates
        • quantstats
    • Technical analysis
      • Statistics
        • entropy
        • kurtosis
        • mad
        • median
        • skew
        • stdev
        • tos_stdevall
        • variance
        • zscore
      • Overlap and moving averages
        • alma
        • dema
        • ema
        • fwma
        • hilo
        • hl2
        • hlc3
        • hma
        • hwma
        • ichimoku
        • jma
        • kama
        • linreg
        • ma
        • mcgd
        • midpoint
        • midprice
        • ohlc4
        • pwma
        • rma
        • sinwma
        • sma
        • ssf
        • supertrend
        • swma
        • t3
        • tema
        • trima
        • vidya
        • vwap
        • vwma
        • wcp
        • wma
        • zlma
      • Trend indicators
        • adx
        • amat
        • aroon
        • chop
        • cksp
        • decay
        • decreasing
        • dpo
        • increasing
        • long_run
        • psar
        • qstick
        • short_run
        • tsignals
        • ttm_trend
        • vhf
        • vortex
        • xsignals
      • Momentum indicators
        • ao
        • apo
        • bias
        • bop
        • brar
        • cci
        • cfo
        • cg
        • cmo
        • coppock
        • cti
        • dm
        • er
        • eri
        • fisher
        • inertia
        • kdj
        • kst
        • macd
        • mom
        • pgo
        • ppo
        • psl
        • pvo
        • qqe
        • roc
        • rsi
        • rsx
        • rvgi
        • slope
        • smi
        • squeeze
        • squeeze_pro
        • stc
        • stoch
        • stochrsi
        • td_seq
        • trix
        • tsi
        • uo
        • willr
      • Volatility indicators
        • aberration
        • accbands
        • atr
        • bbands
        • donchian
        • hwc
        • kc
        • massi
        • natr
        • pdist
        • rvi
        • thermo
        • true_range
        • ui
      • Volume based indicators
        • ad
        • adosc
        • aobv
        • cmf
        • efi
        • eom
        • kvo
        • mfi
        • nvi
        • obv
        • pvi
        • pvol
        • pvr
        • pvt
        • vp
      • Candle pattern indicators
        • cdl_doji
        • cdl_inside
        • cdl_pattern
        • cdl_z
        • ha
      • Market cycles
        • ebsw
      • Portfolio performance
        • drawdown
        • log_return
        • percent_return
    • Web3 Ethereum DeFi
Back to top
Edit this page

exchange#

API documentation for tradingstrategy.exchange Python module in Trading Strategy.

Module description#

Exchange information and analysis.

Exchanges are presented by

  • Exchange class

To download the pairs dataset see

  • tradingstrategy.client.Client.fetch_exchange_universe()

Classes#

Exchange

A decentralised exchange.

ExchangeType

What kind of an decentralised exchange, AMM or other the pair is trading on.

ExchangeUniverse

Exchange manager.

Next
Exchange
Previous
ChainId

Trading Strategy is in beta and still under development. Any documentation is preliminary and not final.

Contents
  • exchange
    • Module description
    • Classes