Automate scheduled token purchases on Uniswap V3 using the 1Shot API, and optionally receive Telegram notifications when swaps complete.
The AI agent automates end-to-end dollar-cost averaging trades into a chosen token on Uniswap V3 using 1Shot API. It configures scheduling, manages ERC-20 approvals and custody delegation, executes swaps with TWAP-based pricing, and logs results. Optionally, it can send Telegram alerts after each swap and maintains custody through Metamask Delegation.
A compact, automated DCA workflow from config to confirmation.
Schedule ongoing DCA cadence for chosen tokens.
Configure input/output tokens and per-purchase amount.
Establish ERC-20 approvals and custody delegation for swaps.
Execute swaps on Uniswap V3 via the 1Shot API and TWAP pricing.
Monitor on-chain results and log every trade.
Notify via Telegram when a swap completes (optional).
Before: manual scheduling and monitoring; repeated ERC-20 approvals; custody management risks; susceptibility to timing and slippage; no automatic logs or completion alerts. After: trades run automatically on schedule; single approvals cover all purchases; custody stays with you via delegation; TWAP pricing reduces slippage; automatic logs and alerts after swaps.
Three-step, easy-to-understand flow.
Define frequency, input/output tokens, and per-purchase amount, and connect your 1Shot API credentials.
Create ERC-20 approvals and establish a custody delegation for SwapRouter02 and the pool tokens.
On schedule, the AI agent calls 1Shot API to perform the swap on Uniswap V3, verifies the transaction, logs results, and sends an optional notification.
One realistic scenario that shows daily ops.
Scenario: A retail investor sets up a weekly DCA to convert USDC into ETH on Uniswap V3 via 1Shot API. Frequency: every Monday at 09:00 UTC. Amount per purchase: $50. After execution, the system logs the transaction hash and sends an optional Telegram alert with the new token balance. Result: a consistent weekly purchase is completed without manual intervention.
Roles that gain concrete value from this AI agent.
Prefer hands-off, scheduled buys to build exposure gradually.
Automate recurring allocations across multiple tokens at scale.
Ensure consistent DCA with custody control and auditable logs.
Use a ready-to-extend workflow to integrate into apps.
Simplify multi-user oversight with delegated wallet access.
Reduce manual steps and stabilize purchase timings.
Core tools that power the AI agent’s workflow.
Authenticates and executes DCA trades; provides on-chain function calls for swaps and TWAP data.
Performs the token swap and retrieves price data to ensure TWAP-aligned execution.
Allows performing swaps from a custody-controlled account without exporting private keys.
Sends a swap completion alert and balance update when configured.
Practical scenarios that benefit from automated DCA on Uniswap V3.
Common questions about this AI agent and its workflow.
The agent relies on Uniswap V3 and 1Shot API integrations; tokens supported depend on pools and the 1Shot-enabled networks. It requires proper approvals and delegation configured in advance. You can target any pool with a valid SwapRouter02 and QuoterV2 setup. Custom tokens may require additional configuration to ensure TWAP can be computed accurately. Ensure your 1Shot API key has permissions for the relevant chain and token.
Custody remains with you through Metamask Delegation; private keys are not exported to the automation flow. Delegation grants limited, specific permissions to required contracts only. The workflow uses a server wallet to relay transactions, reducing direct exposure of keys. Always ensure your delegation scopes are restricted to the necessary contracts. You retain control and can revoke delegation at any time.
The included workflow uses community nodes compatible with self-hosted n8n instances. This means you’ll need a self-hosted setup to run the exact steps. If you use a hosted environment, verify compatibility and security implications. The agent is designed to work with your existing automation stack when self-hosted. If you cannot self-host, consider using a compliant alternative.
Swaps leverage TWAP to minimize slippage by averaging price across a short window. The 1Shot API and Uniswap Quoter provide price data to determine a fair execution point. The SwapRouter02 contract handles the actual trade with the determined parameters. You can adjust TWAP duration and pool selection to align with your risk tolerance. Always test with small allocations when starting.
Yes. Telegram notifications are supported and optional; you can enable alerts to receive the transaction hash, amount purchased, and remaining balance instantly. Alerts help you monitor progress without logging into wallets. Notifications are configurable per-swap and per-campaign. Disabling alerts keeps the flow quiet while still logging results.
You need a self-hosted n8n instance, a 1Shot API account with an API key, and a server wallet funded for gas. You must import the Uniswap contracts (QuoterV2, SwapRouter02, pool) into 1Shot per chain and set up the required approvals. Configure delegation for SwapRouter02 and the ERC-20 token from your pool. Finally, connect the DCA workflow to a trigger node to set frequency and activation.
If a swap fails, the agent logs the error with details and the transaction is not marked as completed. It can retry according to configured policies or alert you for manual intervention. All failures are recorded in the log for audit purposes and debugging. You can adjust Slippage tolerance, TWAP settings, and pool parameters to mitigate failures. Ensure your delegation permissions and wallet balance are sufficient before retries.
Automate scheduled token purchases on Uniswap V3 using the 1Shot API, and optionally receive Telegram notifications when swaps complete.