swap-integration

Automate Uniswap swap integration via Trading API and Universal Router.

223|34|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/Uniswap/uniswap-ai --skill swap-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swap-integration
Source: https://github.com/Uniswap/uniswap-ai/tree/main/packages/plugins/uniswap-trading/skills/swap-integration
Command: npx skills add https://github.com/Uniswap/uniswap-ai --skill swap-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Integrate Uniswap swaps into applications, removing the need to implement cross-chain routing and quote logic from scratch for reliable on-chain trading.

Core Features & Use Cases

  • Trading API integration (check_approval, quote, swap) for frontend apps, backend scripts, and smart-contract interactions.
  • Direct Universal Router usage for full control over swap calls and path encoding.
  • Support for multiple routing types (CLASSIC, DUTCH_V2/V3, PRIORITY, WRAP/UNWRAP) and cross-chain workflows.

Quick Start

Use this skill to enable a new swap feature in your app by fetching a quote and submitting a swap, with optional Permit2-based approvals for seamless UX.

Frequently Asked Questions about swap-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate Uniswap swaps into my app?

Uniswap swap integration automates the end-to-end process of embedding swaps into applications, handling quotes, approvals, and execution via the Trading API and Universal Router without building cross-chain routing from scratch.

How do I handle token approvals for Uniswap Trading API swaps?

Token approvals for Uniswap swaps can be handled via the Trading API's check_approval function, with optional Permit2-based approvals to provide a seamless user experience during swap execution.

Does the Uniswap Universal Router support cross-chain workflows?

The Uniswap Universal Router supports cross-chain workflows and multiple routing types, including CLASSIC, DUTCH_V2, DUTCH_V3, PRIORITY, and WRAP/UNWRAP, for full control over swap calls and path encoding.

Can I use the Uniswap swap integration for both frontend and smart-contract interactions?

Uniswap swap integration supports frontend apps, backend scripts, and smart-contract interactions, providing Trading API endpoints and Universal Router usage for reliable on-chain trading across different application layers.

What's the best way to execute multi-route swaps with Uniswap?

Executing multi-route swaps with Uniswap is best handled through the Universal Router for direct swap call control, or the Trading API for automated quotes and execution across supported routing types.

Are there limitations when using Uniswap Universal Router for custom path encoding?

Direct Universal Router usage requires manual path encoding for swap calls, while the Trading API automates quote and approval workflows, trading full low-level control for robust error handling and simpler integration.