AI-Powered Crypto Trading Signal Agent β Lablab.ai AI Trading Agents Hackathon 2026
QuantTrader Lite is a fully working, end-to-end AI crypto trading signal agent. It fetches live prices from multiple sources, asks Gemini 2.0 Flash for a BUY / SELL / HOLD signal with a reason, and executes paper trades via Kraken CLI β all visible live on a clean Streamlit dashboard.
Live Price β Gemini AI β Signal + Reason β Kraken CLI (sandbox) β Dashboard
π Try it live: https://quant-trader-lite.streamlit.app/
| Feature | Description |
|---|---|
| π‘ Multi-source price data | CoinGecko β Binance β CryptoCompare fallback chain β never fails silently |
| π€ Trend-aware AI signals | Gemini 2.0 Flash analyzes live price + session trend for smarter signals |
| π’π΄π‘ BUY / SELL / HOLD | Color-coded signals with full AI reasoning visible on every trade |
| π 4 coins supported | Bitcoin, Ethereum, Solana, BNB β each with chart tab and Kraken pair |
| π Full trade log | Every signal logged to JSON with timestamp, price, signal, and order result |
| π Auto-refresh | Toggle 60-second auto-refresh for hands-free live agent operation |
| βοΈ Kraken CLI sandbox | Paper trades via Kraken CLI β no real money, full execution flow |
git clone https://github.com/your-team/quanttrader-lite
cd quanttrader-litepip install -r requirements.txtexport GEMINI_API_KEY=your_gemini_key_here
export KRAKEN_API_KEY=your_kraken_key # optional for sandbox
export KRAKEN_API_SECRET=your_kraken_secret # optional for sandboxstreamlit run streamlit_app.pyOpen http://localhost:8501 and click β‘ Run Agent Now.
quanttrader-lite/
βββ streamlit_app.py # Main app β price fetch + Gemini AI + Kraken + dashboard
βββ requirements.txt # All Python dependencies
βββ trade_log.json # Auto-generated trade history (gitignored)
βββ index.html # Landing page for the project
βββ README.md # This file
| Layer | Tool | Why |
|---|---|---|
| AI Signal Engine | Gemini 2.0 Flash | Fast, reliable, free API tier available |
| Fallback AI | Groq (llama3) | Ultra-fast inference backup |
| Market Data (primary) | CoinGecko API | Free, no key needed, reliable |
| Market Data (fallback 1) | Binance Public API | No key needed, high uptime |
| Market Data (fallback 2) | CryptoCompare | Free tier, good historical data |
| Trading Execution | Kraken CLI | Pre-built binary, full sandbox support |
| Dashboard UI | Streamlit | Python-only, no frontend skills needed |
| Language | Python 3.11+ | Simple, fast, well-supported |
User clicks β‘ Run Agent Now
β
βΌ
[1] Fetch Price
Try CoinGecko β if fail β Try Binance β if fail β Try CryptoCompare
β
βΌ
[2] Compute Trend
Load trade_log.json β analyze last 10 prices for this coin
β Direction: UPTREND / DOWNTREND / SIDEWAYS
β Session High / Low / Avg / % Move
β
βΌ
[3] Ask Gemini AI
Send: coin, price, 24h change, trend context
Receive: SIGNAL: BUY/SELL/HOLD | RISK: LOW/MEDIUM/HIGH | REASON: ...
β
βΌ
[4] Execute Trade (Kraken CLI Sandbox)
BUY β kraken order buy <pair> <amount> --sandbox
SELL β kraken order sell <pair> <amount> --sandbox
HOLD β no order placed
β
βΌ
[5] Log Trade
Append to trade_log.json:
{ timestamp, coin, price, change_24h, signal, trade, source }
β
βΌ
[6] Update Dashboard
Metrics Β· Trend panel Β· AI reasoning box Β· Charts Β· Trade table
Toggle ON "π Auto-refresh every 60s"
β
βΌ
Dashboard sleeps 60 seconds
β
βΌ
st.rerun() triggers full page reload
β
βΌ
Agent pipeline runs again automatically
β
βββββ loops indefinitely until toggle OFF
Request price for coin
β
βΌ
CoinGecko API ββββ success βββΆ return (price, change, "CoinGecko")
β
fail
β
βΌ
Binance API ββββββ success βββΆ return (price, change, "Binance")
β
fail
β
βΌ
CryptoCompare ββββ success βββΆ return (price, change, "CryptoCompare")
β
fail
β
βΌ
RuntimeError: "All price sources failed" β show error in dashboard
Gemini AI follows these rules when generating signals:
| Condition | Signal |
|---|---|
| Trend = UPTREND and 24h change > +1% | π’ BUY |
| Trend = DOWNTREND and 24h change < -1% | π΄ SELL |
| Sideways, uncertain, or mixed signals | π‘ HOLD |
| Any condition | Max 2% portfolio risk enforced |
| Coin | CoinGecko ID | Binance Pair | Kraken Pair |
|---|---|---|---|
| Bitcoin | bitcoin |
BTCUSDT |
XBTUSD |
| Ethereum | ethereum |
ETHUSDT |
ETHUSD |
| Solana | solana |
SOLUSDT |
SOLUSD |
| BNB | binancecoin |
BNBUSDT |
BNBUSD |
| Service | Required | Where to get |
|---|---|---|
| Gemini API | β Yes | aistudio.google.com |
| Groq API | Optional (fallback AI) | console.groq.com |
| CryptoCompare | Optional (price fallback) | cryptocompare.com/cryptopian/api-keys |
| CoinMarketCap | Optional (extra data) | coinmarketcap.com/api |
| Messari | Optional (market intel) | messari.io/api |
| CoinGecko | β Free, no key | Built-in |
| Binance | β Free, no key | Built-in |
| Kraken CLI | For real trades | kraken.com/u/security/api |
- Working Streamlit app (AI + Kraken CLI + price feeds)
- Multi-source price fallback (CoinGecko β Binance β CryptoCompare)
- Gemini AI signal with trend context and reasoning
- Kraken CLI sandbox trade execution
- Trade log (JSON) with full history
- Live dashboard with charts, metrics, signal distribution
- GitHub repository (public)
- Live deployment: quant-trader-lite.streamlit.app
- Demo video (2β3 min screen recording)
- Social media post (X / LinkedIn)
- Register on early.surge.xyz
- Submit on Lablab.ai before April 12
| Member | Role |
|---|---|
| Member 1 | Python Dev β AI agent, Kraken CLI, price APIs |
| Member 2 | Dashboard β Streamlit UI, charts, signal display |
| Member 3 | Presenter β Demo video, README, pitch |
MIT License β free to use, modify, and distribute.
QuantTrader Lite Β· Lablab.ai AI Trading Agents Hackathon 2026 Β· Kraken CLI Challenge
π Live Demo Β· π Hackathon Page Β· π Prize Registration