Skip to content
Back to skills

2537 Basic 1a39036b

ASecurity

Build a complete swap integration using the Uniswap Trading API.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
testingtypescriptnodeapibackend

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2537-basic_1a39036b --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2537 Basic 1a39036b?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2537 Basic 1a39036b
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2537-basic-1a39036b/badge)](https://www.skillsdirectory.com/skills/tools-only-2537-basic-1a39036b)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Basic Swap Integration Test Case

Build a complete swap integration using the Uniswap Trading API.

## Context

- TypeScript/Node.js backend script
- Need to swap USDC to ETH on Ethereum mainnet
- Using the Uniswap Trading API (not SDK)
- Have a private key for signing

## Requirements

1. Check token approval status via /check_approval endpoint
2. Get a quote via /quote endpoint with proper parameters
3. Execute the swap via /swap endpoint with correct request body format
4. Handle Permit2 fields correctly (strip null permitData)
5. Validate swap response before broadcasting

## Constraints

- Must use the Uniswap Trading API (<https://trade-api.gateway.uniswap.org/v1>)
- Must handle the 3-step flow: check_approval -> quote -> swap
- Must strip null permitData fields from the swap request
- Must validate swap.data is non-empty before broadcasting
- Should include error handling for API failures

## Expected Output

A working TypeScript implementation that demonstrates the complete Trading API swap flow with proper null field handling, Permit2 rules, and pre-broadcast validation.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.