Accessing market data#

To efficiently trade, a high quality information about markets is needed. Trading Strategy provides various market data feeds that trades can use to trade on DeFi markets and decentralised exchanges.

Explore data#

You can explore the available data on Trading Strategy market data pages. You will find the lists of decentralised exchanges, trading pairs, price charts and metadata.

Not all trading pairs and tokens are included in the dataset. See Tracked trading pairs and tokens for more information about inclusion criteria.

Data flavours#

Real-time API#

Real-time API for live trading and price charts.

See OpenAPI explorer for available APIs.

Backtesting datasets API#

Backtesting datasets for testing strategies.

Microsoft Excel data files#

For some datasets, like the best performing trading pairs, there is direct Microsoft Excel export available.

See PancakeSwap trading pairs as an example.

Accessing data#

You can access market data

  • Programmatically using API

  • Download datasets manually

Programmatic access may require an API key

  • Real-time API does not require authentication

  • Backtesting data requires authentication by an API key due to large size of served files

API key registration#

You can get a free API key with a newsletter subscription.

Datasets manual download#

After you have obtained an API key you can download datasets from the backtesting page.

Downloading programmatically#

See Dataset download for examples.

API endpoints#

Datasets can be downloaded over authenticated HTTPS API endpoints.

At the moment, all API endpoints are served by a private beta server https://tradingstrategy.ai/api.

APIs are described by Python dataclasses. For more information about the dataset data structure, see the API documentation and the relevant source code.

Parquet endpoints#

These take HTTP GET parameter bucket. See available values in tradingstrategy.timebucket.TimeBucket. They return a Parquet file download.

/pair-universe
/candles-all
/liquidity-all

JSON endpoints#

These do not take parameters. They return a JSON file download.

/exchanges