-
Notifications
You must be signed in to change notification settings - Fork 29
/
pyproject.toml
212 lines (181 loc) · 6.3 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
[tool.poetry]
name = "trade-executor"
version = "0.3.1"
description = "Algorithmic trading backtesting and live trading engine for decentralised finance"
authors = ["Mikko Ohtamaa <[email protected]>"]
homepage = "https://tradingstrategy.ai"
repository = "https://github.com/tradingstrategy-ai/trade-executor"
license = "APGL"
readme = "README.md"
keywords = ["algorithmic trading", "ethereum", "cryptocurrency", "uniswap", "quantitative finance", "binance", "coinbase", "pancakeswap"]
packages = [
{ include = "tradeexecutor" },
]
[tool.poetry.dependencies]
python = ">=3.11,<=3.12"
# Use these during development
# TODO: FileLock, Parquet None issueset
trading-strategy = {path = "deps/trading-strategy", develop = true}
# trading-strategy = "^0.22.6"
requests = "^2.27.1"
matplotlib = "^3.6.0"
jupyterlab = "^4.0.7"
pandas = "<3"
pandas-ta = "^0.3.14b" # Unmaintained, still stick to old Pandas
tqdm-loggable = "^0.2"
numpy = "<2" # https://stackoverflow.com/a/78638258/315168
web3-ethereum-defi = {path = "deps/web3-ethereum-defi", develop = true, extras=["data", "test"]}
#web3-ethereum-defi = {version="0.24.6", extras=["data", "test"]}
# tqdm progress bar doesn't show up in VScode Jupyter with ipywidgets>=8
# https://github.com/microsoft/vscode-jupyter/issues/11014
# ipywidgets = ">=7.0,<8.0"
# https://github.com/apache/arrow/pull/35412
# Last checked 2023-07, still broken
urllib3 = "<2"
# Breaks OpenAPI package for now 2023-09
# AttributeError: module 'jsonschema._utils' has no attribute 'load_schema'
jsonschema = "4.17.3"
#
# Execution deps
#
typer = {version="^0.12.3", optional = true}
colorama = {version="^0.4.4", optional = true}
coloredlogs = {version="^15.0.1", optional = true}
prompt-toolkit = {version = "^3.0.31", optional = true}
APScheduler = {version="^3.9.1"}
#python-logstash-tradingstrategy = {version="^0.5.0", optional = true}
python-logstash-tradingstrategy = "0.5.1"
python-logging-discord-handler = {version="^0.1.3", optional = true}
python-dotenv = {version="^0.21.0", optional = true}
kaleido = {version="0.2.1"}
beautifulsoup4 = {version="^4.12.2", optional = true} # Needed to export HTML reports
#
# Web server deps
#
pyramid = {version="^2.0", optional = true}
pyramid-openapi3 = {version="^0.16.0", optional = true}
waitress = {version="^2.0.0", optional = true}
WebTest = {version="^3.0.0", optional = true}
# python-openapi3 incompatible with newer versions
openapi-core = {version = "<0.17", optional = true}
#
# Legacy strategy deps
#
trading-strategy-qstrader = {version="^0.5", optional = true}
#
# quantstats package for generating
# advanced statistical reports
#
quantstats = {version="^0.0.62"}
# Needed for Plotly Express scatter(trendline="ols)
# https://www.statsmodels.org/stable/index.html
statsmodels = {version="^0.14.0"}
#
# This package is to be used in various environemnts
# - Execution oracles (makes trades)
# - Client side Python within a browser
# - Web server
#
# Note: in the future execution may exist without a web server,
# e.g. in-browser bots.
#
tqdm = "^4.64.1"
tblib = "^1.7.0"
cloudpickle = "^3.0.0"
scikit-optimize = "^0.10.2"
#
# TrendsSpotter and sentiment data analysis integration
#
#
gcsfs = {version="^2024.6.1", optional = true}
google-cloud-storage = {version="^2.17.0", optional = true}
fsspec = {version="^2024.6.1", optional = true}
google-auth = {version="^2.32.0", optional = true}
zstandard = "^0.23.0"
pytest-timeout = "^2.3.1"
#
# Demeter
# https://github.com/zelos-alpha/demeter
#
# TODO: Disabled. Install wiht pip until dependency version incompatibilies are solved.
zelos-demeter = {version="^0.7.4", optional = true}
# https://github.com/arynyklas/telegram_bot_logger/pull/1
telegram-bot-logger = {git = "https://github.com/tradingstrategy-ai/telegram_bot_logger.git", branch="patch-bleeding-edges", optional = true}
[tool.poetry.extras]
# Legacy strats
qstrader = ["trading-strategy-qstrader"]
# Only needed when running live trades
execution = [
"python-logging-discord-handler",
"telegram-bot-logger",
"python-logstash-tradingstrategy",
"typer",
"colorama",
"coloredlogs",
"prompt-toolkit",
"python-dotenv",
"setuptools",
"beautifulsoup4",
"web3-ethereum-defi",
]
# These dependencies are not neededon the client side code
web-server = [
"pyramid",
"WebTest",
"openapi-core",
"pyramid-openapi3",
"waitress"
]
# Trendspotter and sentiment data integration
trendsspotter = [
"gcsfs",
"google-cloud-storage",
"fsspec",
"google-auth"
]
# for generating advanced statistical reports
# quantstats = ["quantstats"]
# Demeter LP backtesting integration
demeter = [
"zelos-demeter",
]
[tool.poetry.dev-dependencies]
pytest = "^7.2.2"
ipdb = "^0.13.9"
flaky = "^3.7.0"
[tool.poetry.group.dev.dependencies]
pytest-reverse = "^1.5.0"
pytest-mock = "^3.11.1"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
trade-executor = 'tradeexecutor.cli.main:app'
get-latest-release = 'tradeexecutor.cli.latest_release:main'
prepare-docker-env = 'tradeexecutor.cli.prepare_docker_env:main'
[tool.pytest.ini_options]
addopts = "-s --tb=native"
testpaths = [
"tests",
]
# Do not let pytest to crawl into deps/ subprojects
# that contain tests and are independent from us
# https://stackoverflow.com/a/58306308/315168
norecursedirs="deps/*"
markers = [
"slow_test_group: manually separated group of tests that take individually long time to run"
]
filterwarnings = [
# python_openapi complaint
"ignore:::.*.jsonschema",
# DeprecationWarning: Subclassing validator classes is not intended to be part of their public API. A future version will make doing so an error, as the behavior of subclasses isn't guaranteed to stay the same between releases of jsonschema. Instead, prefer composition of validators, wrapping them in an object owned entirely by the downstream library.
"ignore:::.*.validators",
"ignore:::.*.codec",
"ignore::DeprecationWarning:openapi_spec_validator.*:",
# DeprecationWarning: abi.decode_single() is deprecated and will be removed in version 4.0.0 in favor of abi.decode()
"ignore::DeprecationWarning:eth_abi.*:",
"ignore::DeprecationWarning:eth_tester.*:",
"ignore::DeprecationWarning:pandas.*:",
"ignore::DeprecationWarning:quantstats.*:",
"ignore::DeprecationWarning:pkg_resources.*:",
]