Add core infrastructure: config, Binance adapter, docs, and auto-setup
- Add Pydantic settings with trading mode validation (paper/testnet/live) - Implement Binance USDⓈ-M Futures adapter with hedge mode, isolated margin - Add type definitions for orders, positions, and market data - Create documentation (PLAN.md, ARCHITECTURE.md, SECURITY.md) - Add setup.sh with uv/pip auto-detection for consistent dev environments - Configure Docker multi-stage build and docker-compose services - Add pyproject.toml with all dependencies and tool configs
This commit is contained in:
123
pyproject.toml
Normal file
123
pyproject.toml
Normal file
@@ -0,0 +1,123 @@
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "tradefinder"
|
||||
version = "0.1.0"
|
||||
description = "Automated crypto trading system with regime detection, multi-strategy allocation, and risk management"
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
requires-python = ">=3.11"
|
||||
authors = [
|
||||
{ name = "TradeFinder Team" }
|
||||
]
|
||||
keywords = ["trading", "crypto", "bitcoin", "algorithmic-trading", "binance"]
|
||||
classifiers = [
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
]
|
||||
|
||||
dependencies = [
|
||||
# Exchange connectivity
|
||||
"ccxt>=4.2.0",
|
||||
"websockets>=12.0",
|
||||
"aiohttp>=3.9.0",
|
||||
|
||||
# Data processing
|
||||
"pandas>=2.1.0",
|
||||
"numpy>=1.26.0",
|
||||
"polars>=0.20.0",
|
||||
"duckdb>=0.10.0",
|
||||
|
||||
# Technical analysis
|
||||
"pandas-ta>=0.3.14b",
|
||||
"ta-lib>=0.4.28",
|
||||
|
||||
# Optimization
|
||||
"optuna>=3.5.0",
|
||||
|
||||
# Configuration & validation
|
||||
"pydantic>=2.5.0",
|
||||
"pydantic-settings>=2.1.0",
|
||||
"python-dotenv>=1.0.0",
|
||||
"pyyaml>=6.0.1",
|
||||
|
||||
# Web UI
|
||||
"streamlit>=1.30.0",
|
||||
"plotly>=5.18.0",
|
||||
|
||||
# Async & scheduling
|
||||
"asyncio-throttle>=1.0.2",
|
||||
"apscheduler>=3.10.4",
|
||||
|
||||
# Logging & monitoring
|
||||
"structlog>=24.1.0",
|
||||
"rich>=13.7.0",
|
||||
|
||||
# HTTP client
|
||||
"httpx>=0.26.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest>=7.4.0",
|
||||
"pytest-asyncio>=0.23.0",
|
||||
"pytest-cov>=4.1.0",
|
||||
"ruff>=0.1.0",
|
||||
"mypy>=1.8.0",
|
||||
"pre-commit>=3.6.0",
|
||||
]
|
||||
email = [
|
||||
"jinja2>=3.1.0",
|
||||
"weasyprint>=60.0",
|
||||
"aiosmtplib>=3.0.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
tradefinder = "tradefinder.core.main:main"
|
||||
tf-backtest = "tradefinder.core.backtest:main"
|
||||
tf-optimize = "tradefinder.core.optimize:main"
|
||||
|
||||
[project.urls]
|
||||
Documentation = "https://github.com/owner/tradefinder#readme"
|
||||
Issues = "https://github.com/owner/tradefinder/issues"
|
||||
Source = "https://github.com/owner/tradefinder"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/tradefinder"]
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py311"
|
||||
line-length = 100
|
||||
select = [
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"B", # flake8-bugbear
|
||||
"C4", # flake8-comprehensions
|
||||
"UP", # pyupgrade
|
||||
]
|
||||
ignore = [
|
||||
"E501", # line too long (handled by formatter)
|
||||
"B008", # do not perform function calls in argument defaults
|
||||
]
|
||||
|
||||
[tool.ruff.isort]
|
||||
known-first-party = ["tradefinder"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.11"
|
||||
strict = true
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
plugins = ["pydantic.mypy"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
testpaths = ["tests"]
|
||||
addopts = "-v --cov=tradefinder --cov-report=term-missing"
|
||||
Reference in New Issue
Block a user