From 1a241e8b7b86e8f5877fc8fa6cbd86aace3c9ec9 Mon Sep 17 00:00:00 2001 From: choijaewook Date: Fri, 20 Mar 2026 17:44:45 +0900 Subject: [PATCH] Add project setup: dependencies, config, and package scaffolding - requirements.txt with all core dependencies (streamlit, binance, ta, anthropic, praw, etc.) - .env.example template for all required API keys - .gitignore covering secrets, caches, db files, and logs - config.py loading env vars with trading defaults and signal weights - tests/conftest.py with sys.path fix for imports - Empty __init__.py files for tests, data, agents, engine, dashboard, scheduler packages Co-Authored-By: Claude Sonnet 4.6 --- .env.example | 9 +++++++++ .gitignore | 6 ++++++ agents/__init__.py | 0 config.py | 36 ++++++++++++++++++++++++++++++++++++ dashboard/__init__.py | 0 data/__init__.py | 0 engine/__init__.py | 0 requirements.txt | 11 +++++++++++ scheduler/__init__.py | 0 tests/__init__.py | 0 tests/conftest.py | 3 +++ 11 files changed, 65 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 agents/__init__.py create mode 100644 config.py create mode 100644 dashboard/__init__.py create mode 100644 data/__init__.py create mode 100644 engine/__init__.py create mode 100644 requirements.txt create mode 100644 scheduler/__init__.py create mode 100644 tests/__init__.py create mode 100644 tests/conftest.py diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..1143aea --- /dev/null +++ b/.env.example @@ -0,0 +1,9 @@ +BINANCE_API_KEY= +BINANCE_SECRET= +CRYPTOPANIC_API_KEY= +NEWS_API_KEY= +TWITTER_BEARER_TOKEN= +REDDIT_CLIENT_ID= +REDDIT_SECRET= +REDDIT_USER_AGENT=crypto_signal_bot/1.0 +ANTHROPIC_API_KEY= diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae55124 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.env +__pycache__/ +*.pyc +*.db +logs/ +.superpowers/ diff --git a/agents/__init__.py b/agents/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/config.py b/config.py new file mode 100644 index 0000000..9424e72 --- /dev/null +++ b/config.py @@ -0,0 +1,36 @@ +import os +from dotenv import load_dotenv + +load_dotenv() + +# API Keys +BINANCE_API_KEY = os.getenv("BINANCE_API_KEY", "") +BINANCE_SECRET = os.getenv("BINANCE_SECRET", "") +CRYPTOPANIC_API_KEY = os.getenv("CRYPTOPANIC_API_KEY", "") +NEWS_API_KEY = os.getenv("NEWS_API_KEY", "") +TWITTER_BEARER_TOKEN = os.getenv("TWITTER_BEARER_TOKEN", "") +REDDIT_CLIENT_ID = os.getenv("REDDIT_CLIENT_ID", "") +REDDIT_SECRET = os.getenv("REDDIT_SECRET", "") +REDDIT_USER_AGENT = os.getenv("REDDIT_USER_AGENT", "crypto_signal_bot/1.0") +ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY", "") + +# Defaults +DB_PATH = os.path.join(os.path.dirname(__file__), "crypto_signals.db") +LOG_DIR = os.path.join(os.path.dirname(__file__), "logs") +TOP_N_COINS = 50 +SURGE_VOLUME_MULTIPLIER = 3.0 +MAX_POSITIONS = 5 +INITIAL_CAPITAL = 200.0 +STOP_LOSS_PCT = -0.08 +TAKE_PROFIT_1_PCT = 0.15 +TAKE_PROFIT_2_PCT = 0.25 +MIN_POSITION_USD = 15.0 +ANALYSIS_INTERVAL_MINUTES = 15 + +# Default weights +DEFAULT_WEIGHTS = { + "technical": 0.6, + "news": 0.2, + "social": 0.1, + "ai": 0.1, +} diff --git a/dashboard/__init__.py b/dashboard/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/data/__init__.py b/data/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/engine/__init__.py b/engine/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d86805e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,11 @@ +streamlit>=1.30.0 +python-binance>=1.0.19 +pandas>=2.1.0 +ta>=0.11.0 +plotly>=5.18.0 +anthropic>=0.40.0 +praw>=7.7.0 +httpx>=0.27.0 +apscheduler>=3.10.0 +python-dotenv>=1.0.0 +pytest>=8.0.0 diff --git a/scheduler/__init__.py b/scheduler/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..ee2b037 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,3 @@ +import sys +import os +sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))