TOKREPO · ARSENAL
New · this week

Crypto + DeFi Trading AI — On-Chain Data + Automation Stack

Ten picks for crypto and DeFi traders running their own venue mix: CCXT for the exchange layer, Freqtrade/Jesse for automated strategies, Backtrader for honest backtests, TradingAgents for LLM-driven research, Web3 + Smart Contract auditors for on-chain risk, Wealthfolio for the cold-wallet view, Ledger for tax-ready books. Editorial. Not financial advice.

10 assets

What's in this pack

This is the stack for the crypto and DeFi trader who runs their own mix of CEX accounts, on-chain wallets, and the occasional LP position — and is tired of stitching together a TradingView chart, a Telegram bot, a Discord alpha leak, and a spreadsheet. Not a 50-link Anon list of 'AI alpha bots'. Every pick here does one specific job in the crypto trading loop: pull exchange data, run an automated strategy without losing the keys, backtest before you commit, audit the contracts you're about to interact with, track positions across CEX + cold wallets locally, and keep enough of a paper trail that tax season is one weekend instead of three.

The pack is built around one principle: AI accelerates the research and the boring ops; the signing key and the tax record stay yours. That's why the exchange layer is CCXT (open-source, you own the keys) instead of a SaaS bot platform. That's why the on-chain risk layer is two Claude Code agents (Smart Contract Auditor, Web3 Integration Specialist) reading code instead of paying for a 'safety oracle' API that goes down on the day you need it. And it's why the ledger is plain-text (Ledger) so you can hand a single file to a crypto-savvy accountant in April.

The five layers

  • Data (exchange + on-chain)CCXT — unified API across 100+ CEX/DEX venues; on-chain side handled in the Web3 layer.
  • Trading (automation + algo strategy)Freqtrade, Jesse — production-grade crypto bots, both open-source, both keep keys local.
  • Backtest + researchBacktrader, TradingAgents, awesome-trading-agents — replay strategies honestly, let an LLM desk write the memo.
  • Risk (smart-contract + Web3)Smart Contract Auditor (Web3 Security), Web3 Integration Specialist — agents that read the contract before you approve the spend.
  • Portfolio + taxWealthfolio, Ledger — local cold-wallet view + plain-text journal for cost-basis math at year end.

Install in this order (exchange data → automation → backtest → on-chain risk → portfolio + tax)

  1. CCXT — Universal Cryptocurrency Exchange Trading Library — start here. CCXT is the unified Python/JS API across 100+ centralized exchanges (Binance, Bybit, Coinbase, OKX, Kraken, Bitfinex, Hyperliquid via adapters, etc.) and a growing set of DEXes. Use it in read-only mode first to fetch prices, order books, and your own balances. Only enable trading-scope keys after a long paper-trade window. This is the data + execution spine the rest of the trading stack reads from.
  2. Freqtrade — Open-Source Crypto Trading Bot — the most-adopted open-source crypto bot. Strategy classes in Python, dry-run mode out of the box, hyperopt for parameter search, Telegram control bot. Run it in dry-run for at least 30 days before you flip a single live key. Bigger community than Jesse; easier to find strategy examples on GitHub. The trade-off is the strategy API is bulkier.
  3. Jesse — Advanced Crypto Algo-Trading Framework — the crypto-native alternative to Backtrader. Cleaner strategy syntax than Freqtrade, accurate fee/slippage simulation, genetic optimizer, same code runs live. PostgreSQL backend for candle storage. Pick Jesse over Freqtrade when you care more about clean research code than community size; pick both and decide after a month if you can't.
  4. Backtrader — Python Algorithmic Trading Framework — the general-purpose backtester. Even if you run Freqtrade or Jesse live, Backtrader is the second opinion on the backtest itself — if a strategy makes money in one framework but breaks in another, you've found a framework-specific bug, not alpha. Pair with CCXT for the data feed.
  5. TradingAgents — Multi-Agent LLM Financial Trading Framework — a research-grade multi-agent setup that simulates an analyst desk (fundamentals, sentiment, news, technicals, risk). For crypto, the 'fundamentals' role morphs into protocol health (TVL, fee revenue, token unlocks); 'sentiment' is on-chain whale activity + CT noise. Use it the way you'd use a junior team: it produces a memo, you decide. Do not wire it to a live order ticket on day one.
  6. awesome-trading-agents — Trading Agents + MCP List — the index. Curated list of trading agent frameworks and MCP servers worth tracking — useful when picking 5's actual configuration, and for finding crypto-specific MCPs (DEX aggregator, on-chain data, alt-data feeds) as new ones land. Bookmark, re-scan monthly.
  7. Claude Code Agent: Smart Contract Auditor (Web3 Security) — the agent you point at any contract before you approve a spend or LP into a new pool. Reads Solidity/Vyper for re-entrancy, integer overflow, access control bugs, oracle manipulation patterns, and proxy-upgrade backdoors. Not a substitute for a professional audit on serious capital, but for retail position sizes it catches the obvious traps that lose money to copy-paste rug contracts.
  8. Claude Code Agent: Web3 Integration Specialist — the agent that reviews the integration side: how your bot, dApp, or wallet interacts with chain RPC, multicall patterns, gas estimation, nonce management, MEV exposure on the transactions you broadcast. Pairs with #7 — auditor reads the contract you're calling, integration specialist reads the code that's calling it. Both readings before you ship a trading bot to mainnet.
  9. Wealthfolio — Private Local-First Portfolio Tracker — your positions across CEX accounts, hot wallets, and cold wallets, on your machine, no cloud. Multi-account, multi-currency, manual entry or import. The right answer when you don't want a tracker SaaS to see (and potentially leak) your full on-chain footprint. Crypto-friendly without being crypto-only — works for the mixed equity + crypto book most serious traders actually have.
  10. Ledger — Double-Entry Accounting via the Command Line — the tax/audit backbone. Every fill (CEX trade, DEX swap, LP deposit, LP withdraw, claim, airdrop, gas fee, bridge) lands as a double-entry posting in a plain-text journal. At tax time you have one file your crypto accountant can read in any decade, no proprietary export needed. This is the deliverable Koinly/CoinTracker import from when they get a year wrong and you have to redo it.

How they fit together

     CEX APIs                    On-chain RPC
     (Binance, Bybit, OKX,       (Alchemy / Infura /
      Coinbase, Hyperliquid)      your own node)
            │                            │
            ▼                            ▼
     ┌─────────────┐              ┌───────────────────┐
     │    CCXT     │              │  Web3 client      │
     │ (read +     │              │  (viem / web3.py  │
     │  execute)   │              │   / ethers)       │
     └─────┬───────┘              └─────────┬─────────┘
           │                                │
           └───────────┬────────────────────┘
                       ▼
             ┌─────────────────────┐
             │  AI research desk   │
             │  TradingAgents      │ ← signals, memos
             │  awesome-trading-   │ ← catalog
             │   agents (index)    │
             └──────────┬──────────┘
                        │
                        ▼
          ┌──────────────────────────┐
          │   Automation / strategy  │
          │   Freqtrade  ◇  Jesse    │ ← run live (dry-run first)
          │   Backtrader             │ ← independent backtest
          └──────────┬───────────────┘
                     │
         pre-trade   │
         risk gate   ▼
     ┌─────────────────────────────────┐
     │  Smart Contract Auditor (W3S)   │ ← reads target contract
     │  Web3 Integration Specialist    │ ← reads your bot's tx code
     └──────────┬──────────────────────┘
                │
        only if both clear:
                │
                ▼
           SIGN + BROADCAST
                │
          every fill / swap
                │
     ┌──────────┴───────────┐
     ▼                      ▼
Wealthfolio              Ledger
(positions, P&L,         (plain-text journal,
 cold + CEX view)         cost basis, tax export)

The critical join is the pre-trade risk gate: before the trading framework actually broadcasts a transaction that interacts with a new contract, both Claude Code agents read the target contract and the calling code. For pure CEX strategies (CCXT → Binance) the on-chain leg is moot, but the moment you touch a new DEX pool, lending market, or perp DEX, the gate runs. No agent ever holds the signing key. Read-only AI on auditable data and code is the safe shape for crypto self-custody.

Tradeoffs you'll hit

  • CEX vs DEX — CEX (Binance, Bybit via CCXT) gives you tight spreads, real liquidity, and a single point of failure that has rugged its customers more than once. DEX (Uniswap, Hyperliquid, GMX) gives you self-custody and 24/7 markets at the cost of MEV exposure, RPC reliability, and contract risk. Most serious books are mixed: CEX for size and speed, DEX for tokens that don't list on CEX yet. The pack supports both — CCXT for CEX, the Web3 + audit agents for DEX.
  • Automation vs manual — Freqtrade/Jesse running 24/7 catches setups while you sleep and removes emotion. It also amplifies a buggy strategy at 3am with nobody watching. Manual trading is bounded by your attention but bounded by your attention. The pragmatic split: automate the boring (DCA, grid, rebalance), keep human-in-the-loop for the discretionary (narrative trades, event-driven, new launches).
  • High-frequency vs swing — HFT in retail crypto is a money-burning hobby; you're competing with co-located market makers on Binance and getting your fills picked off. Swing (hold hours to weeks) and position (hold weeks to months) is where retail edge actually exists, and where this pack is calibrated. If you find yourself optimizing for sub-second latency, you're in the wrong market.
  • Safe vs degen — the same CCXT + Freqtrade + Backtrader stack can run a boring BTC/USDT mean-reversion strategy or a leveraged altcoin perp scalper. The tools don't moralize; you do. The audit agents and risk gate are how you stop your degen self from approving an infinite-mint contract because the chart looked good. Position sizing is your real risk control. The pack just stops you from sizing into something obviously broken.

Common pitfalls

  • Rugpulls and copy-paste scam contracts — most retail losses on DEXes come from approving spend allowance to a malicious contract that drains the wallet the moment a balance arrives. The Smart Contract Auditor agent catches the obvious patterns (hidden mint functions, owner-can-pause-transfers, fake LP locks). Never approve max allowance on a fresh contract; use exact-amount approvals and revoke after the trade via revoke.cash. No agent catches everything — if the project is anonymous, audit-less, and shilled by 12-hour-old accounts, walk.
  • MEV and slippage — broadcasting a large swap to mempool is broadcasting your trade to every searcher; expect sandwich attacks on anything material on Ethereum mainnet. Mitigations: private RPC (Flashbots Protect, MEV-Blocker), tight slippage tolerance (0.5%-1% for liquid pairs), batch via 1inch/CoW Swap that already routes around MEV, and on aggressive L2s use the chain's native MEV-shielded routes when available.
  • Private key leakage — the single most expensive bug class in this whole stack. Rules: hardware wallet for any address holding more than you'd lose without flinching, separate hot wallet with capped balance for the trading bot, .env files in .gitignore and .cursorignore and .aider-ignore, never paste a seed phrase into any LLM chat including this one, and chmod 600 on every key file. Test the bot on testnet (Sepolia, Base Sepolia) before you fund it on mainnet.
  • API key permission too broad — the most common mistake is creating one CEX API key with withdraw permission for both the trading bot and the portfolio tracker. Wrong. Trading bot key: trade-only, no withdraw, IP-restricted to the box it runs on. Portfolio tracker key: read-only, no trade, no withdraw. Wealthfolio and most read-only trackers need only a read key. If a tool asks for withdraw permission, that's the answer: don't give it.
  • Tax jurisdiction differences — Ledger is a generic accounting tool; it doesn't know your country's crypto rules. In the US, every trade is a taxable event (FIFO or specific-ID), staking rewards are income at receipt, and DeFi LP entry/exit triggers complex disposition events. In Germany, >1 year held is tax-free. In Portugal until 2023, crypto was tax-free for individuals; now it's not. The pack gives you the data; your accountant applies the rules. Do not ship a crypto tax return out of an LLM. Find a crypto-specialist CPA.

Disclaimer

This pack is editorial guidance about an AI-assisted crypto + DeFi trading workflow. It is not investment, tax, or legal advice. Tools mentioned have their own terms of service, regional restrictions, and risk profiles — review them before use. Crypto trading carries substantial risk including total loss of capital. Smart-contract interactions are irreversible. Backtest results are not predictive of future performance. Past performance is not a guarantee of future returns. Talk to a licensed advisor and a crypto-aware accountant before any material decision.

INSTALL · ONE COMMAND
$ tokrepo install pack/crypto-defi-trading-ai
hand it to your agent — or paste it in your terminal
What's inside

10 assets in this pack

Skill#01
CCXT — Universal Cryptocurrency Exchange Trading Library

A unified API for connecting to over 100 cryptocurrency exchanges in Python, JavaScript, and PHP, enabling automated trading, market data retrieval, and portfolio management across platforms.

by Script Depot·18 views
$ tokrepo install ccxt-universal-cryptocurrency-exchange-trading-library-9add158b
Skill#02
Freqtrade — Open-Source Crypto Trading Bot

A free and open-source crypto trading bot written in Python that supports backtesting, strategy optimization, and live trading across major exchanges.

by AI Open Source·24 views
$ tokrepo install freqtrade-open-source-crypto-trading-bot-ab180c52
Skill#03
Jesse — Advanced Crypto Algo-Trading Framework

A Python framework for developing and backtesting cryptocurrency trading strategies with a focus on simplicity, performance, and research-friendly design.

by Script Depot·21 views
$ tokrepo install jesse-advanced-crypto-algo-trading-framework-d742be64
Skill#04
Backtrader — Python Algorithmic Trading Framework

A feature-rich Python framework for backtesting and live trading strategies with support for multiple data feeds, brokers, and advanced analytics.

by AI Open Source·20 views
$ tokrepo install backtrader-python-algorithmic-trading-framework-c91240a2
Skill#05
TradingAgents — Multi-Agent LLM Financial Trading Framework

An open-source multi-agent framework that simulates a trading firm with specialized LLM agents for market analysis, risk management, and trade execution.

by Script Depot·75 views
$ tokrepo install tradingagents-multi-agent-llm-financial-trading-framework-488cac73
Skill#06
awesome-trading-agents — Trading Agents + MCP List

Curated list of trading agents, market-data MCPs, and skills, with “If you only read three” starters and bilingual docs. Verified 114★; pushed 2026-05-11.

by Agent Toolkit·103 views
$ tokrepo install awesome-trading-agents-trading-agents-mcp-list
Skill#07
Claude Code Agent: Smart Contract Auditor — Web3 Security

Claude Code agent for auditing Solidity smart contracts. Reentrancy, overflow, access control, gas optimization, and best practices.

by Skill Factory·195 views
$ tokrepo install claude-code-agent-smart-contract-auditor-web3-security-bdf1e117
Skill#08
Claude Code Agent: Web3 Integration Specialist

Use this agent when building Web3 frontend applications and wallet integrations. Specializes in blockchain connectivity, wallet interactions (RainbowKit, Reown, WalletConnect),...

by TokRepo精选·29 views
$ tokrepo install claude-code-agent-web3-integration-specialist-c05f56f3
Skill#09
Wealthfolio — Private Local-First Portfolio Tracker

Beautiful desktop app for tracking investments, net worth, and spending with all data stored locally on your machine.

by AI Open Source·46 views
$ tokrepo install wealthfolio-private-local-first-portfolio-tracker-5d04b403
Skill#10
Ledger — Double-Entry Accounting via the Command Line

A powerful plain-text accounting system that uses a simple text file format for double-entry bookkeeping, budgeting, and financial reporting from the terminal.

by AI Open Source·34 views
$ tokrepo install ledger-double-entry-accounting-via-command-line-0413334e
FAQ

Frequently asked questions

Hummingbot vs Freqtrade vs Jesse — which automation framework should I pick?

Three different shapes. Freqtrade is the largest community, best documentation, strongest strategy/example ecosystem on GitHub; trade-off is the strategy API is bulkier and the default UI is heavier than research-grade. Jesse has the cleanest strategy syntax (it reads like research notebook code) and a built-in genetic optimizer; trade-off is smaller community, requires PostgreSQL, fewer ready-made strategies to crib. Hummingbot (not in this pack because it's a different shape) is market-making-first — built around limit-order strategies and inventory management on a single venue, less natural for directional swing strategies. Practical sequence: run Freqtrade dry-run for 30 days to learn the shape of automated trading, then if you want cleaner research code, port to Jesse. Don't try to learn two frameworks the first week.

Is on-chain wallet tracking legal?

Yes, in every jurisdiction we're aware of. Public blockchain addresses are public data — anyone can read them, Etherscan does it for free, Dune builds a SaaS on it. Wealthfolio and similar trackers just aggregate what's already on-chain into a local view. What can become legally messy: (a) tracking other people's wallets and publishing their identities (doxxing), (b) using on-chain data to front-run someone (market manipulation in some jurisdictions), (c) using analytics to evade sanctions (OFAC compliance). Tracking your own wallets to manage your own book is unambiguous. Read-only analytics on public addresses for research purposes is also fine. When in doubt, the rule of thumb is: read = always legal, act-on-someone-else's-data = check local law.

How do I actually defend against MEV?

Layered defense. Layer 1: don't broadcast public mempool transactions for anything material on Ethereum mainnet. Use Flashbots Protect RPC, MEV-Blocker, or your wallet's built-in MEV protection (MetaMask added this; Rabby has it native). Layer 2: tight slippage. Default 1% on a $10k swap is a $100 invitation. Use 0.3-0.5% for liquid pairs (ETH/USDC, WBTC/USDC); if the swap fails, it failed for a reason — usually a sandwich attempt. Layer 3: route through MEV-aware aggregators. CoW Swap batches orders and settles them with no MEV exposure; 1inch Fusion does similar. Layer 4: use L2s and intent-based DEXes for size — Arbitrum, Base, and Hyperliquid have different (often friendlier) MEV economics than mainnet. None of these are perfect; combined they cut typical retail MEV losses by 80-95%.

How do I do crypto taxes when every DEX trade is a taxable event?

Two-part problem and the pack handles part one. Part 1, data: CCXT pulls your CEX trade history; your Web3 client (web3.py, viem, ethers) pulls on-chain transactions from your address; both feed into Ledger as plain-text postings with timestamp, asset, quantity, fiat value at execution, and gas/fee. This gives you a complete, queryable, machine-readable trade log that survives any tool change. Part 2, tax rules: jurisdiction-specific. US: crypto-to-crypto is a taxable event, FIFO or specific-ID cost basis, staking and airdrops are income at fair value at receipt, LP entry/exit triggers complex disposition events. UK: section 104 pooling, different rules for income vs CGT. Germany: hold >1 year, tax-free for individuals (this rule keeps changing — check current year). Don't guess. Don't ship a tax return out of an LLM. Use a crypto-specific tool (Koinly, CoinTracker, CoinLedger) that knows your jurisdiction's rules and import the Ledger journal as the source of truth. Pay a crypto-specialist CPA for anything material; the alternative is an IRS letter.

Can I run an automated trading bot from a Ledger hardware wallet?

Technically possible but a bad shape, and it's a category confusion worth resolving. A hardware wallet (Ledger Nano, Trezor, GridPlus) is designed to sign infrequent, deliberate transactions with physical confirmation. An automated trading bot wants to sign thousands of transactions per day with no human in the loop. Those goals are opposite. The correct architecture: hardware wallet holds the cold balance (95%+ of your book); a hot wallet — software, with capped balance, on the same box as the bot — holds the trading float. Top up the hot wallet from cold periodically with a deliberate, hardware-signed transaction. If the hot wallet gets drained (bug, key leak, malicious contract), you lose the float, not the book. Some setups add a third layer: a smart-contract wallet (Safe, Argent) with session keys that grant the bot scoped permissions for a limited time. That's a real upgrade once your book is large enough to justify the complexity. For everything else: cold for storage, hot for trading, never the same key for both.

MORE FROM THE ARSENAL

12 packs · 80+ hand-picked assets

Browse every curated bundle on the home page

Back to all packs