1inch API
Overview
1inch is a decentralized exchange (DEX) aggregator that finds the best swap routes across protocols like Uniswap, SushiSwap, and Curve. The API lets you query optimal swap paths, get token prices, and fetch liquidity pool data across multiple EVM-compatible chains including Ethereum, BSC, and Polygon. No API key is required for basic queries, making it one of the easiest DeFi APIs to start with.
Beginner Tip
Start with the `/price` endpoint to get token prices in USD without needing any wallet connection or signing. All amounts in the 1inch API are expressed in the token's smallest unit (wei for ETH), so divide by 10^18 to get human-readable ETH values.
Available Data
Example Response
{
"id": "bitcoin",
"symbol": "btc",
"current_price": 65432.1,
"market_cap": 1280000000000,
"price_change_24h": 1250.5,
"price_change_percentage_24h": 1.95,
"total_volume": 28500000000
} Field Reference
0x...address The queried token contract address as the key, with its USD price as the value. toAmount Amount of destination token you would receive in the token's smallest unit (divide by 10^decimals for human-readable value). fromToken.symbol Ticker symbol of the source token (e.g., "ETH", "USDC"). toToken.symbol Ticker symbol of the destination token. protocols List of DEX protocols and the route through them that 1inch selected to achieve the best swap rate. Implementation Example
// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://1inch.io/api/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Alternatives to 1inch
Technical alternatives for different use cases.
Professional-grade DEX aggregation with RFQ system
Institutional DeFi trading with RFQ liquidity
Multi-chain swap aggregation convenience
Similar APIs
View All →0x
0x provides programmatic access to api for querying token and pool stats across various liquidity pools via REST API.
Bitcambio
⭐ Beginner's PickBitcambio is a Brazilian cryptocurrency exchange that exposes a public REST API to retrieve all currently traded asset pairs and their market data.
BitcoinCharts
⭐ Beginner's PickBitcoinCharts provides financial and technical data about the Bitcoin network, including historical market data from dozens of exchanges worldwide.
CoinCap
⭐ Beginner's PickCoinCap delivers real-time cryptocurrency prices and market data for thousands of assets through a straightforward REST API.
CoinDesk
CoinDesk provides programmatic access to coindesk's bitcoin price index (bpi) in multiple currencies via REST API.