Uniswap trading agent with dashboard for dynamic quotes, swaps, and DCA strategy automation.
This project is a full-stack Uniswap trading agent designed for both developers and non-technical users who want to execute token swaps with automation. It provides a Node.js + Express backend connected to the Uniswap Trade API, plus a local dashboard UI to manage trading without manual cURL commands.
The backend supports dynamic quote generation, live trade execution, and a DCA strategy endpoint for repeated buys at intervals. It handles real execution flow: request quote, build swap transaction, process required approvals, send signed transactions from the configured wallet, and return transaction hashes/receipts. The app also supports human-readable amounts (like 1.5 USDC), auto token decimals lookup, and multi-chain presets (mainnet, Base, Arbitrum).
Environment-based configuration keeps deployment flexible (UNISWAP_API_KEY, RPC_URL, WALLET_PRIVATE_KEY, etc.), and the project has been prepared for both local runtime and Vercel deployment. It is built to be extended with risk controls, PnL analytics, alerts, and advanced strategy modules.
I built this as a modular Node.js service with Express as the API layer and a lightweight static HTML/CSS/JS dashboard for local interaction. The backend uses Axios to call Uniswap Trade API endpoints (/quote and /swap), Ethers.js for wallet signing and transaction broadcasting, Zod for strict payload validation, and Dotenv for runtime configuration.
The trade flow is intentionally production-shaped: validate request -> normalize chain and amount -> request quote -> request swap payload -> execute approval tx(s) if required -> execute final swap -> wait for receipts -> return structured response. I added support for both raw token amounts and human-readable amounts (amountHuman) by resolving token decimals on-chain through an ERC-20 contract call when decimals aren’t supplied. That makes the API much easier to use from a UI.
To make it practical, I added a DCA endpoint (/strategy/dca) that runs multiple swaps with configurable intervals, plus chain presets for Mainnet, Base, and Arbitrum. The dashboard is served from the same Express app and calls backend routes directly, so there’s no separate frontend build system.
A notable “hacky but useful” choice is dual runtime support: the same code works locally with app.listen and on Vercel serverless by exporting the Express app and routing everything through api/index.js + vercel.json. This avoided maintaining two different backend codebases while keeping deployment simple.

