尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證GrgTrading,您的 AI 交易機器人。
AI 翻譯
GrgTrading, your AI trading bot.
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
An AI-driven crypto trading bot built to run 24/7. It uses a machine-learning
model (gradient boosting) trained on technical indicators, wrapped in strict
risk management, and can trade on any exchange supported by
ccxt (Binance, Bybit, OKX, Kraken, ...).
Read this before using real money.
No bot guarantees profit, and most automated strategies lose money after
fees. The bot starts in paper mode (simulated money on real prices) by
default. Run a backtest first, then paper-trade for a few weeks, and only
switch to live with an amount you can afford to lose completely.檢視完整 README ↗An AI-driven crypto trading bot built to run 24/7. It uses a machine-learning model (gradient boosting) trained on technical indicators, wrapped in strict risk management, and can trade on any exchange supported by ccxt (Binance, Bybit, OKX, Kraken, ...).
Read this before using real money. No bot guarantees profit, and most automated strategies lose money after fees. The bot starts in paper mode (simulated money on real prices) by default. Run a
backtestfirst, then paper-trade for a few weeks, and only switch tolivewith an amount you can afford to lose completely.
SYMBOLS.grgtrading/features.py).grgtrading/model.py): a HistGradientBoostingClassifier
estimates the probability that price rises over the next 6 candles by
enough to cover fees. It retrains automatically every 12 hours.BUY_THRESHOLD; sells when it drops below SELL_THRESHOLD.grgtrading/risk.py):
MAX_POSITION_PCT of equity per position, at most MAX_OPEN_POSITIONS;cp .env.example .env # edit your settings
pip install -r requirements.txt
python -m grgtrading backtest # test the strategy on ~1 year of history
python -m grgtrading check # verify connection, keys, balance and exchange minimums
python -m grgtrading run # start the bot (paper trading by default)
python -m grgtrading status # equity, open positions, recent trades
model_tradeable_share = 0 means the model found no edge; it would not trade live either.total_return_pct with buy_and_hold_pct. If the bot does worse than
simply holding, it is not worth running.max_drawdown_pct is the worst drop along the way. Expect the same or worse live.trades, the result may just be luck.cp .env.example .env
docker compose up -d --build
docker compose logs -f
docker compose exec bot python -m grgtrading status
restart: unless-stopped brings it back after a crash or reboot.
Data (state, models, trade journal, logs) lives in ./data.
Works on a Raspberry Pi 4/5 and, with 512 MB RAM, on a Pi Zero 2 W. Flash Raspberry Pi OS Lite (64-bit) (the 32-bit OS would have to compile pandas and scikit-learn for hours), enable SSH and Wi-Fi in Raspberry Pi Imager, then:
sudo apt-get install -y git
git clone https://github.com/monescuteodor/GrgTrading
cd GrgTrading
bash deploy/install-pi.sh # venv, dependencies, systemd service
nano .env # settings (paper mode by default)
sudo systemctl start grgtrading # runs now and after every reboot
journalctl -u grgtrading -f # live log
The same script works on any Linux PC or laptop with systemd (Debian/Ubuntu,
Arch/BlackArch, Fedora). On rolling-release distros like Arch, a Python upgrade can
break the virtual environment: delete venv and run the script again.
On a Pi Zero 2 W, keep SYMBOLS to one or two pairs. If the bot is killed while
retraining (out of memory), give it 1 GB of swap.
MODE=live, SANDBOX=true and the testnet keys. Testnet prices and
liquidity are not realistic, so use it to check that orders work, not to
judge profit..env:
MODE=live
SANDBOX=false
API_KEY=...
API_SECRET=...
LIVE_CONFIRM=I_UNDERSTAND_THE_RISKS
For a first live run, consider tighter limits: RISK_PER_TRADE=0.005,
MAX_OPEN_POSITIONS=1, MAX_DRAWDOWN_PCT=0.10, DAILY_LOSS_LIMIT_PCT=0.03.python -m grgtrading check to confirm the keys work and your balance
clears the exchange minimums, then start the bot.Stops are managed by the bot (checked every POLL_SECONDS), not placed as
orders on the exchange, so open positions are unprotected while the server is down.
Exchanges reject orders below a minimum value (on Binance typically around
5 USDT per order; check shows the exact figure for your exchange and pairs).
The bot also keeps a 25% margin above that minimum so a stop-loss sell after a
price drop is still accepted. So:
check. Below that, no bot can place a trade on that exchange.SMALL_ACCOUNT_MODE=true to buy the minimum
instead. Each trade then puts most of the account at stake.SYMBOLS=BTC/USDT) and keep MAX_OPEN_POSITIONS=1.STARTING_BALANCE=7;
paper mode applies the real exchange minimums.python -m grgtrading dashboard serves a page on port 8080. The Raspberry Pi
installer runs it as the grgtrading-dashboard service; open
http://grgtrading.local:8080 from a device on the same network.
data/). Forgot it? Delete data/dashboard_auth.json over SSH and restart
the dashboard service..env, and the bot restarts itself to apply them; open
positions are kept. Mode, exchange and API keys are not editable here, so a
leaked dashboard password can never switch the bot to real money.Your numbers stay on the machine and are not part of the repository. Never forward this port on your router.
Create a bot with @BotFather, put TELEGRAM_TOKEN
and TELEGRAM_CHAT_ID in .env, and you'll get a message for every buy and
sell, repeated errors, and the kill switch.
| Variable | Default | What it does |
|---|---|---|
MODE | paper | paper or live |
SANDBOX | false | in live mode, use the exchange testnet |
EXCHANGE | binance | any ccxt exchange id |
SYMBOLS | BTC/USDT,ETH/USDT | pairs to trade (same quote currency) |
TIMEFRAME | 1h | candle interval |
BUY_THRESHOLD / SELL_THRESHOLD | 0.60 / 0.45 | probability thresholds |
RISK_PER_TRADE | 0.01 | share of equity lost if a stop is hit |
SMALL_ACCOUNT_MODE | false | trade the exchange minimum on tiny balances |
MAX_DRAWDOWN_PCT | 0.20 | kill-switch threshold |
DAILY_LOSS_LIMIT_PCT | 0.05 | pause for the rest of the day |
Full list: grgtrading/config.py and .env.example.
website/ holds a static landing page (HTML, CSS, JS, no build step). To host it
on Cloudflare Pages: connect the repo, leave the build command empty and set the
output directory to website. Or upload the folder via "Direct Upload".
pip install -r requirements-dev.txt
pytest
grgtrading/
config.py settings from .env
features.py technical indicators and training labels
model.py the AI model and walk-forward validation
risk.py position sizing, stops, kill switch
broker.py paper trading and real orders via ccxt
bot.py the 24/7 loop
backtest.py walk-forward backtest with fees
storage.py bot state and trade journal (SQLite)
notify.py Telegram notifications