Open‑source trading bot that accumulates target assets over time. Quotes via the Minswap Aggregator API and optional backtesting via TapTools. Run safely in dry mode, then go live with PM2.
Not financial advice. Use at your own risk. Understand slippage, fees, and wallet security.
[env] DRY_RUN(resolved)= true
[tick] mid≈ 0.508182 STRIKE/ADA | band [0.4945, 0.5106] | center≈ 0.5026
[trade] BUY 10 ADA → STRIKE at edge; slippage guard 0.50%; fees ≤ 0.20%A configurable bot that watches a trading pair and executes swaps when price moves outside an adaptive band around an Exponential Moving Average. The band widens or tightens using BAND_ALPHA and BAND_BPS, with an execution edge set by EDGE_BPS. Quotes route through the Minswap Aggregator for best‑path pricing.
Risk controls include slippage caps, fee caps, cooldowns, minimum notional outputs, and reserves. It can run in dry mode to simulate fills before going live.
Dynamic bands around EMA with execution edge. Tunable via BAND_ALPHA, BAND_BPS, and EDGE_BPS.
Uses Minswap Aggregator for pathfinding and pricing with ONLY_VERIFIED pool option.
Slippage and fee caps, cooldowns, min notional out, reserve ADA, and min trade sizes.
TapTools‑powered backtests and parameter sweeps to discover robust settings.
CSV fills and rolling band centre file for analysis and dashboards.
Run under PM2 with separate pair‑specific .env files.
Security tip: keep your hot wallet balance minimal and rotate keys.
# 1) Clone
git clone https://github.com/pbwebdev/cardano-trading-bot
cd cardano-trading-bot
# 2) Install deps
pnpm i # or: npm i
# 3) Copy an example env
cp .env.example.dry-mode .env.ada-strike
# 4) Edit .env.ada-strike with your pair and keys# Run a pair in dry mode
$env:DOTENV_CONFIG_PATH=".env.ada-strike" # PowerShell
DOTENV_CONFIG_PATH=.env.ada-strike pnpm tsx src/bot-twoway.tsWatch the console and CSV fills. Tweak band size, edge, cooldown, and trade sizes until behaviour matches your intent.
# Example (see ecosystem.config.cjs in repo)
pm2 start ecosystem.config.cjs
pm2 logs bot:ada-strikeUse separate .env files per pair. Keep DRY_RUN=false only when you are ready.
See the repository README for a commented example env and advanced options.
Use TapTools data to simulate the EMA‑band rules with fees, slippage, and cooldowns. Run parameter sweeps to locate robust regimes, then promote those settings to live.
# Example backtest run (see scripts in repo)
pnpm tsx src/backtest-taptools.ts
pnpm tsx src/backtest-sweep.tsNo. This is research software. You are responsible for your own risk. Test in dry mode first and start small.
Routing and pricing use the Minswap Aggregator API. Pools can be restricted to verified only.
Set SLIPPAGE_PCT and FEE_CAP_PCT. Consider higher cooldowns and minimum notionals to avoid churn in low‑liquidity periods.
The bot signs with an ed25519 private key file. Do not place primary funds in this wallet. No mnemonic operations are required.
Yes. Use COOLDOWN_MS and POLL_MS. You can target 4‑hour rhythm or slower to avoid over‑trading.
Check your CSV fills (LOG) and the band centre file (CENTER_FILE). You can chart these for performance review.
Star the repository, open issues, and share sweep results and configs. PRs that improve safety, docs, or performance are welcome.