[](https://badge.fury.io/py/trading-strategy)
[](https://github.com/tradingstrategy-ai/trading-strategy/actions/workflows/python-app.yml)
[](https://github.com/tradingstrategy-ai/trading-strategy/actions/workflows/pip-install.yml)
<a href="https://tradingstrategy.ai">
<img src="https://raw.githubusercontent.com/tradingstrategy-ai/trading-strategy/master/logo.svg" width="384">
</a>
# Trading Strategy framework for Python
Trading Strategy framework is a Python framework for algorithmic trading on decentralised exchanges.
- Download decentralised finance market data sets
- Develop and backtest trading strategies in Jupyter Notebook
- Live trade execution for onchain trading
- Smart contract vault support for turning your trading strategy to a third-party investable vault
The `trading-strategy` library provides data fetching for backtesting and live trading.
It is using [backtesting data](https://tradingstrategy.ai/trading-view/backtesting) and [real-time price feeds](https://tradingstrategy.ai/trading-view)
from [Trading Strategy Protocol](https://tradingstrategy.ai/).
# Use cases
* Analyse cryptocurrency investment opportunities on [decentralised exchanges (DEXes)](https://tradingstrategy.ai/trading-view/exchanges)
* Creating trading algorithms and trading bots that trade on DEXes
* Deploy trading strategies as on-chain smart contracts where users can invest and withdraw with their wallets
# Features
* Supports multiple blockchains like [Ethereum mainnet](https://tradingstrategy.ai/trading-view/ethereum),
[Binance Smart Chain](https://tradingstrategy.ai/trading-view/binance) and
[Polygon](https://tradingstrategy.ai/trading-view/polygon)
* Access trading data from on-chain decentralised exchanges like
[SushiSwap](https://tradingstrategy.ai/trading-view/ethereum/sushi), [QuickSwap](https://tradingstrategy.ai/trading-view/polygon/quickswap) and [PancakeSwap](https://tradingstrategy.ai/trading-view/binance/pancakeswap-v2)
* Integration with Jupyter Notebook for easy manipulation of data.
See [example notebooks](https://tradingstrategy.ai/docs/programming/code-examples/index.html).
* Write [algorithmic trading strategies](https://tradingstrategy.ai/docs/programming/strategy-examples/index.html) for decentralised exchange
# Getting started
See [the Getting Started repository](https://github.com/tradingstrategy-ai/getting-started) and the rest of the [Trading Strategy documentation](https://tradingstrategy.ai/docs/).
# Prerequisites
* Python 3.10
* [Understanding Python package management and installation](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/)
(unless using Dev Container from teh above)
# Installing the package
You can install this package with
[Poetry](https://python-poetry.org/) as a dependency:
```shell
poetry add trading-strategy -E direct-feed
```
Poetry, local development:
```shell
poetry install -E direct-feed
```
Pip:
```shell
pip install "trading-strategy[direct-feed]"
```
**Note**: `trading-strategy` package provides trading data
download and management functionality only. If you want to [developed
automated trading strategies you need to install trade-executor package as well](https://github.com/tradingstrategy-ai/trade-executor/).
# Documentation
- [Documentation](https://tradingstrategy.ai/docs/).
- [Getting started](https://tradingstrategy.ai/docs/getting-started.html).
Community
---------
* [Trading Strategy website](https://tradingstrategy.ai)
* [Blog](https://tradingstrategy.ai/blog)
* [Twitter](https://twitter.com/TradingProtocol)
* [Discord](https://tradingstrategy.ai/community#discord)
* [Telegram channel](https://t.me/trading_protocol)
* [Changelog and version history](https://github.com/tradingstrategy-ai/trading-strategy/blob/master/CHANGELOG.md)
[Read more documentation how to develop this package](https://tradingstrategy.ai/docs/programming/development.html).
# License
GNU AGPL 3.0.
Raw data
{
"_id": null,
"home_page": "https://tradingstrategy.ai",
"name": "trading-strategy",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.10",
"maintainer_email": null,
"keywords": "algorithmic trading, ethereum, polygon, avalanche, aave, arbitrum, cryptocurrency, uniswap, quantitative finance, binance, blockchain, pancakeswap, polygon, web3",
"author": "Mikko Ohtamaa",
"author_email": "mikko@tradingstrategy.ai",
"download_url": "https://files.pythonhosted.org/packages/4c/5c/a7f42cf1c6abd557e11ef5c3ad91e141941848a16e292f8c90c81c262e39/trading_strategy-0.25.4.tar.gz",
"platform": null,
"description": "[](https://badge.fury.io/py/trading-strategy)\n\n[](https://github.com/tradingstrategy-ai/trading-strategy/actions/workflows/python-app.yml)\n\n[](https://github.com/tradingstrategy-ai/trading-strategy/actions/workflows/pip-install.yml)\n\n<a href=\"https://tradingstrategy.ai\">\n <img src=\"https://raw.githubusercontent.com/tradingstrategy-ai/trading-strategy/master/logo.svg\" width=\"384\">\n</a>\n\n# Trading Strategy framework for Python\n\nTrading Strategy framework is a Python framework for algorithmic trading on decentralised exchanges. \n\n- Download decentralised finance market data sets\n- Develop and backtest trading strategies in Jupyter Notebook\n- Live trade execution for onchain trading\n- Smart contract vault support for turning your trading strategy to a third-party investable vault\n\nThe `trading-strategy` library provides data fetching for backtesting and live trading.\n\nIt is using [backtesting data](https://tradingstrategy.ai/trading-view/backtesting) and [real-time price feeds](https://tradingstrategy.ai/trading-view)\nfrom [Trading Strategy Protocol](https://tradingstrategy.ai/). \n\n# Use cases\n\n* Analyse cryptocurrency investment opportunities on [decentralised exchanges (DEXes)](https://tradingstrategy.ai/trading-view/exchanges)\n\n* Creating trading algorithms and trading bots that trade on DEXes\n\n* Deploy trading strategies as on-chain smart contracts where users can invest and withdraw with their wallets\n\n# Features\n\n* Supports multiple blockchains like [Ethereum mainnet](https://tradingstrategy.ai/trading-view/ethereum), \n [Binance Smart Chain](https://tradingstrategy.ai/trading-view/binance) and \n [Polygon](https://tradingstrategy.ai/trading-view/polygon)\n\n* Access trading data from on-chain decentralised exchanges like\n [SushiSwap](https://tradingstrategy.ai/trading-view/ethereum/sushi), [QuickSwap](https://tradingstrategy.ai/trading-view/polygon/quickswap) and [PancakeSwap](https://tradingstrategy.ai/trading-view/binance/pancakeswap-v2)\n\n* Integration with Jupyter Notebook for easy manipulation of data.\n See [example notebooks](https://tradingstrategy.ai/docs/programming/code-examples/index.html).\n\n* Write [algorithmic trading strategies](https://tradingstrategy.ai/docs/programming/strategy-examples/index.html) for decentralised exchange \n\n# Getting started \n\nSee [the Getting Started repository](https://github.com/tradingstrategy-ai/getting-started) and the rest of the [Trading Strategy documentation](https://tradingstrategy.ai/docs/).\n\n# Prerequisites\n\n* Python 3.10\n\n* [Understanding Python package management and installation](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/)\n (unless using Dev Container from teh above)\n\n# Installing the package\n\nYou can install this package with \n\n[Poetry](https://python-poetry.org/) as a dependency:\n\n```shell\npoetry add trading-strategy -E direct-feed\n```\n\nPoetry, local development:\n\n```shell\npoetry install -E direct-feed\n```\n\nPip:\n\n```shell\npip install \"trading-strategy[direct-feed]\" \n```\n\n**Note**: `trading-strategy` package provides trading data\ndownload and management functionality only. If you want to [developed\nautomated trading strategies you need to install trade-executor package as well](https://github.com/tradingstrategy-ai/trade-executor/).\n\n# Documentation\n\n- [Documentation](https://tradingstrategy.ai/docs/).\n\n- [Getting started](https://tradingstrategy.ai/docs/getting-started.html).\n\nCommunity\n---------\n\n* [Trading Strategy website](https://tradingstrategy.ai)\n\n* [Blog](https://tradingstrategy.ai/blog)\n\n* [Twitter](https://twitter.com/TradingProtocol)\n\n* [Discord](https://tradingstrategy.ai/community#discord) \n\n* [Telegram channel](https://t.me/trading_protocol)\n\n* [Changelog and version history](https://github.com/tradingstrategy-ai/trading-strategy/blob/master/CHANGELOG.md)\n\n[Read more documentation how to develop this package](https://tradingstrategy.ai/docs/programming/development.html).\n\n# License\n\nGNU AGPL 3.0. \n",
"bugtrack_url": null,
"license": "AGPL",
"summary": "Algorithmic trading data for cryptocurrencies and DEXes like Uniswap, Aave and PancakeSwap",
"version": "0.25.4",
"project_urls": {
"Changelog": "https://github.com/tradingstrategy-ai/web3-ethereum-defi/blob/master/CHANGELOG.md",
"Discord": "https://discord.gg/5M88m9nM8H",
"Documentation": "https://tradingstrategy.ai/docs/",
"Homepage": "https://tradingstrategy.ai",
"Repository": "https://github.com/tradingstrategy-ai/trading-strategy",
"Sponsor": "https://tradingstrategy.ai",
"Twitter": "https://twitter.com/tradingprotocol",
"Youtube": "https://www.youtube.com/@tradingstrategyprotocol"
},
"split_keywords": [
"algorithmic trading",
" ethereum",
" polygon",
" avalanche",
" aave",
" arbitrum",
" cryptocurrency",
" uniswap",
" quantitative finance",
" binance",
" blockchain",
" pancakeswap",
" polygon",
" web3"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "22c31bf4b149e6ff353515995e0aa134829695ac9c229a2173943e2a468e0ccc",
"md5": "5d4883f4b157e8fb8f2f603235f11faa",
"sha256": "d52c58f564054cd8380d725f26b79b1fa12671830e082360524e36ad99275949"
},
"downloads": -1,
"filename": "trading_strategy-0.25.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5d4883f4b157e8fb8f2f603235f11faa",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.10",
"size": 27939861,
"upload_time": "2025-02-13T20:15:49",
"upload_time_iso_8601": "2025-02-13T20:15:49.361079Z",
"url": "https://files.pythonhosted.org/packages/22/c3/1bf4b149e6ff353515995e0aa134829695ac9c229a2173943e2a468e0ccc/trading_strategy-0.25.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4c5ca7f42cf1c6abd557e11ef5c3ad91e141941848a16e292f8c90c81c262e39",
"md5": "0fa5495b0663a673b896236c851af98c",
"sha256": "5f7e2414879c27efa2a831df0f82ea1e5d011422e5df2a23def68ad3e700ebd6"
},
"downloads": -1,
"filename": "trading_strategy-0.25.4.tar.gz",
"has_sig": false,
"md5_digest": "0fa5495b0663a673b896236c851af98c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.10",
"size": 27051013,
"upload_time": "2025-02-13T20:15:58",
"upload_time_iso_8601": "2025-02-13T20:15:58.520177Z",
"url": "https://files.pythonhosted.org/packages/4c/5c/a7f42cf1c6abd557e11ef5c3ad91e141941848a16e292f8c90c81c262e39/trading_strategy-0.25.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-13 20:15:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tradingstrategy-ai",
"github_project": "web3-ethereum-defi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "trading-strategy"
}